Recent Changes
Recent Changes · Search:

Bibliographies.Typesetting History

Hide minor edits - Show changes to output

17 April 2007 at 03:47 PM by John Rankin - note use of BibTeX and natbib
Changed lines 9-10 from:
In "normal" usage, Latex determines the text to use in a citation. The author writes '@\cite{key}@' and Latex uses the key to determine the cite text from the corresponding '@\bibitem{key}@' entry in the '@thebibliography@' environment. In wiki usage, the wiki determines the appropriate citation text, so we need to instruct Latex ''not'' to do its normal processing.
to:
In "normal" usage, Latex determines the text to use in a citation. The author writes '@\cite{key}@' and Latex uses the key to determine the cite text from the corresponding '@\bibitem{key}@' entry in the '@thebibliography@' environment. packages such as BibTeX and natbib can be used to augment the basic LaTeX functionality. In wiki usage, the wiki determines the appropriate citation text, so we need to instruct Latex ''not'' to do its normal processing.
09 April 2007 at 06:18 PM by John Rankin - uncited references need spaced paragraphs
Changed lines 84-85 from:
In Latex, this should work like a normal paragraph hanging indent. Alternatively, we could generate a bibliography block and items with no id, then transform this into a '@abibliography@' environment, with a variant of '@\abibitem@' without an id.
to:
In Latex, this should work like a normal paragraph hanging indent, with vertical space separating paragraphs. Alternatively, we could generate a bibliography block and items with no id, then transform this into an '@abibliography@' environment, with a variant of '@\abibitem@' without an id.
Changed lines 94-95 from:
We need to make sure that '@\newblock@' works in paragraphs for uncited references, as well as in '@thebibliography@' and '@abibliography@' environments. Or put uncited references in a bibliography environment.
to:
We need to make sure that '@\newblock@' works in paragraphs for uncited references, as well as in '@thebibliography@' and '@abibliography@' environments. Or put uncited references in an '@abibliography@' environment.
05 April 2007 at 07:39 PM by John Rankin - clarify why sic
Changed lines 15-16 from:
We will transform this into the new Latex command '@\citesic[link text]{key}@' where the new command is defined to produce a link to the item in the bibliography corresponding to "key" using only the "link text". The ''sic'', meaning thus, indicates quoted text which may contain an error.
to:
We will transform this into the new Latex command '@\citesic[link text]{key}@' where the new command is defined to produce a link to the item in the bibliography corresponding to "key" using only the "link text". The ''sic'', meaning thus, indicates quoted text which may contain an error (although we expect the wiki to get it right).
05 April 2007 at 11:56 AM by John Rankin - clarify the specification
Changed lines 9-10 from:
In "normal" usage, Latex determines the text to use in a citation. The author writes \cite{key} and Latex uses the key to determine the cite text from the corresponding entry in \thebibliography. In wiki usage, the wiki determines the appropriate citation text, so we need to instruct Latex ''not'' to do its normal processing.
to:
In "normal" usage, Latex determines the text to use in a citation. The author writes '@\cite{key}@' and Latex uses the key to determine the cite text from the corresponding '@\bibitem{key}@' entry in the '@thebibliography@' environment. In wiki usage, the wiki determines the appropriate citation text, so we need to instruct Latex ''not'' to do its normal processing.
Changed lines 15-16 from:
We will transform this into the new Latex command '@\citesic[link text]{key}@' where the new command is defined to produce a link to the item in the bibliography corresponding to "key" using only the "link text".
to:
We will transform this into the new Latex command '@\citesic[link text]{key}@' where the new command is defined to produce a link to the item in the bibliography corresponding to "key" using only the "link text". The ''sic'', meaning thus, indicates quoted text which may contain an error.
Changed lines 77-78 from:
We need to define the '@abibliography@' environment and '@\abibitem@' command. By using 2 environments, we can support the case of a numbered list of references and author`-year list of further reading on the same page.
to:
We need to define the '@abibliography@' environment and '@\abibitem@' command. By using 2 environments, we can support a numbered list of references ''and'' an author`-year list, without redefining the '@\bibitem@' command.
Changed lines 84-85 from:
In Latex, this should work like a normal paragraph hanging indent. Alternatively, we could generate a bibliography block and items with no id.
to:
In Latex, this should work like a normal paragraph hanging indent. Alternatively, we could generate a bibliography block and items with no id, then transform this into a '@abibliography@' environment, with a variant of '@\abibitem@' without an id.
Changed lines 94-95 from:
We need to make sure that '@\newblock@' works in paragraphs for uncited references, as well as in '@thebibliography@' and '@abibliography@' blocks
to:
We need to make sure that '@\newblock@' works in paragraphs for uncited references, as well as in '@thebibliography@' and '@abibliography@' environments. Or put uncited references in a bibliography environment.
Changed lines 99-100 from:
When typesetting the bibliography at the end of a book, we need to change the opening tag to
to:
When typesetting the bibliography at the end of a book via the [=(:typeset-book:)=] directive, we need to change the opening tag to
Changed lines 107-108 from:
This requires a DTD change to add '0' to the list of allowed values for the 'level' attribute of the 'h' element.
to:
This preserves the book style and requires a DTD change to add '0' to the list of allowed values for the 'level' attribute of the 'h' element.
04 April 2007 at 07:20 PM by John Rankin - add uncited references
Changed line 41 from:
The output depends on whether references are numbered or author`-year. It requires a DTD change to add:
to:
The output depends on whether the references are numbered, author`-year, or a list of uncited references. It requires a DTD change to add:
Added lines 79-85:
!!!!Uncited references
The proposed solution is to generate the following XML:

<p style='hanging'> item text </p>

In Latex, this should work like a normal paragraph hanging indent. Alternatively, we could generate a bibliography block and items with no id.
Added lines 94-95:
We need to make sure that '@\newblock@' works in paragraphs for uncited references, as well as in '@thebibliography@' and '@abibliography@' blocks
04 April 2007 at 02:43 PM by John Rankin - draft typesetting specification
Added lines 3-4:
(:typeset-page parasep=space:)
Changed lines 53-54 from:
Normally,'label' contains the wiki-generated number. We will transform this into the following Latex code:
to:
Normally, 'label' contains the wiki-generated number. We will transform this into the following Latex code:
04 April 2007 at 01:02 PM by John Rankin - draft typesetting specification
Added lines 1-105:
Given "suitable" Wikibook XML for citations, how should this be transformed into Latex and published?

(:toc:)

!!!Challenge: the wiki defines the citation link text

In "normal" usage, Latex determines the text to use in a citation. The author writes \cite{key} and Latex uses the key to determine the cite text from the corresponding entry in \thebibliography. In wiki usage, the wiki determines the appropriate citation text, so we need to instruct Latex ''not'' to do its normal processing.

The proposed solution is to generate the following XML:

<cite kind='sic' refid='key'>link text</cite>

We will transform this into the new Latex command '@\citesic[link text]{key}@' where the new command is defined to produce a link to the item in the bibliography corresponding to "key" using only the "link text".

This requires a DTD change to add 'sic' to the list of allowed values for the 'kind' attribute of the 'cite' element.

!!!Challenge: the wiki defines the reference text

In "normal" usage, Latex determines the sort order, citation numbering (if applicable), and reference text layout (including a suitable heading), for example by using Bibtex. In wiki usage, the wiki does this as part of rendering a page in HTML, so again we need to instruct Latex ''not'' to do its normal processing. The wiki produces 3 kinds of reference list, for a single page or page collection:
* items cited in the text, either numbered or in author`-year mode
* an author`-year bibliography, with no citations
* items cited in the text plus a bibliography of uncited items

The proposed solution is to generate the following XML for single pages:

<references class='sic'><h level='1'>References for '/Page Name/'</h>
...
</references>

Or for page collections (illustrated for a single level page list):

<references class='sic'><h level='1'>Bibliography</h>
<h level='2'>References for '/Page Name 1/'</h>
...
<h level='2'>References for '/Page Name 2/'</h>
...
</references>

The output depends on whether references are numbered or author`-year. It requires a DTD change to add:
* a '@bibliography@' element, containing '@(item)*@'
* '@bibliography@' to the allowed content of '@references@'

!!!!Numbered references
The proposed solution is to generate the following XML ("longestlabel" is the text of the longest label in the list):

<bibliography style='longestlabel'>
<item id='key' style='label'>item text</item>
...
</bibliography>

Normally,'label' contains the wiki-generated number. We will transform this into the following Latex code:

\begin{thebibliography}{longestlabel}
\bibitem[label]{key} item text
...
\end{thebibliography}

We need to redefine the '@thebibliography@' environment to suppress the automatically-generated heading.

!!!!Author`-year references
The proposed solution is to generate the following XML:

<bibliography>
<item id='key'>item text</item>
...
</bibliography>

We will transform this into the following Latex code:

\begin{abibliography}
\abibitem{key} item text
...
\end{abibliography}

We need to define the '@abibliography@' environment and '@\abibitem@' command. By using 2 environments, we can support the case of a numbered list of references and author`-year list of further reading on the same page.

!!!Additional features

!!!!Formatting the item text
It is good practice to use extra horizontal space between the logical blocks of a reference, for example after the list of authors. To achieve this, we will:
* detect end of line continuation markers -- the \ character
* transform these into '@<hspace dim='-`' />@' XML (the '-`' is a new special case)
* transform these into '@\newblock@' TeX commands

This requires no DTD change.

!!!!Book bibliographies
When typesetting the bibliography at the end of a book, we need to change the opening tag to

<references class='sic'><h level='0'>Bibliography</h>

We will transform this into

\chapter*{Bibliography}

This requires a DTD change to add '0' to the list of allowed values for the 'level' attribute of the 'h' element.

!!!New wikibib.sty file

We will put the environment and command definitions required to support wiki-generated citations into a new wikibib.sty file. The style file will:
* define the '@\citesic[link text]{key}@' command
* redefine the '@thebibliography@' environment
* define the '@abibliography@' environment
* define the '@\abibitem{key}@' command
* possibly, define the '@\newblock@' command, as it appears not to work in some installations
Page last modified on 17 April 2007 at 03:47 PM