This plugin adds new rewrite rules to use the following documents in your pages:

Stog-writing is available in Opam. With opam installed, just type the following command to install stog-writing: opam install stog-writing

Stog-writing is hosted on Github.

  • 0.11.0 [2014/03/20]:
    • note handles an id attribute used instead of the one forged from the note number,
    • follow changes in Stog 0.11.0 (hids->paths, documents instead of elements),
    • use doc tag to generate links to bibliography references.
  • 0.10.0 [2014/01/21]:
    • Upgrade to new Stog 0.10.0 architecture,
    • Add class for footnote links,
    • Handle multiple references in cite,
    • Apply base rules when bulding bib entries,
    • Use template bib-entry.tmpl instead of bib_entry.tmpl,
    • Fix: generate paragraph link code even for paragraphs with predefined ids,
    • Simplify auto id generation.
  • 0.8.0 [2013/03/19]: Upgrade to Stog 0.8.0.
  • 0.7.0 [2013/02/13]: Minor fixes.
  • 0.6: First numbered release.

To install:

git clone git@github.com:zoggy/stog-writing.git cd stog-writing make all install

(you must have Menhir installed). This will install the stog-writing package with ocamlfind.

To use:

stog --package stog-writing ...

Footnotes are defined with the following syntax:

...

As usual, you can put any xml in the <note> node, it will be rewritten using the current environment.

For this to work, all the XML tree containing notes must be included in a node

...

At last, all footnotes are inserted when a <notes/> node is encountered. Numbering is automatic.

Example:

... bla bla blaHey, this is a footnote. ... pim pam poumThis is a second note.. ...

Bibliographies can be defined in any document header, with the following syntax:

... ]]>

The <bibliographies> node can have the following attributes:

  • sort="...": the items in each bibliography will be sorted by default, according to the given list of comma-separated fields,
  • reverse="true": the items in each bibliography will be sorted in reverse order,
  • prefix="...": a default string to use as prefix for ids of entries read from bibtex files.

Each <bibliography> node can have the following attributes:

  • name="...": the name of the bibliography, for further reference; default name is "default"; each bibliography must have a site-wide unique name,
  • files="...": a comma-separated list of filenames, in bibtex format; filenames are relative to the document source file,
  • sort, reverse and prefix: can be used to override the same attributes of the <bibliographies> node.

Using attribute bib-files="file1.bib,file2.bib,..." in an document header is a shortcut for

In your pages and posts, you can use this syntax to cite an entry:

The format of the reference can be set by various means, in order of priority:

  • in the children of the <cite> node, for example: ,
  • using the format attribute, for example:
  • setting cite-format in the environment, for example in the header of the page/article: ,

These examples will display the contents of the fields author and title of the entry as text for the reference link.

The default format is [].

The rank is the position of the item in its bibliography.

To include the complete list of entries of a bibliography, use the following node:

The attribute name="..." can be used to specify the name of the bibliography to insert. Default name is "default".

The <bibliography> node will reduced into the list of its entries, each entry being inserted using the bib_entry.tmpl template. You can use the bib_entry.tmpl file included as an example. You will have to place it in your stog template directory.