Skip to content

Set CSS class for bibtex fields #36

Description

@MLopez-Ibanez

In the HTML output, every field should be enclosed in an appropriate CSS class. This would ease a lot defining a custom layout. For example, given the bibtex entry:

@Book{texbook,
    author = "Donald E. Knuth",
    title= "The {{\TeX}book}",
    publisher = "Addison-Wesley",
    year = 1984
}

The desired output HTML would be something like:

<dl>
<dt>
[<a name="texbook">1</a>]
</dt>
<dd class="Book">
<span class="author">Donald E. Knuth</span>.
<span class="title">The TeXbook.</span>
  <span class="publisher">Addison-Wesley</span>, <span 
class="year">2005</span>.<br>

<pre class="bibtex" id="texbook">
@BookK{texbook,
    author = "Donald E. Knuth",
    title= "The {{\TeX}book}",
    publisher = "Addison-Wesley",
    year = 1984
}
</pre>
</dd>
</dl>

The <span>, class and id tags don't do anything by themselves. However, they allow to modify the layout easily using CSS. For example, I would be able to use something like this:

.author {
	font-weight: bold;
}
.title {
	font-variant: italic;
}
pre.bibtex {
	overflow: auto; /* if larger than maximum width, will produce scrollbars */
}

Moreover, implementing layout properties of different bibliographic styles will be rather straightforward since the CSS can be embedded in the header of the html file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions