EnglishFrenchSpanish

OnWorks favicon

hxmkbib - Online in the Cloud

Run hxmkbib in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command hxmkbib that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


hxmkbib - create bibliography from a template

SYNOPSIS


hxmkbib [ -s separator ] [ -a auxfile ] [ -n maxauthors ] [ -r moreauthors ] bibfile [
templatefile ]

DESCRIPTION


The hxmkbib commands reads a list of bibliographic keys (labels) from auxfile, finds the
corresponding entries in bibfile and creates a bibliography, using templatefile as a
model. The auxfile may, e.g., have been created by hxcite(1). It consists of labels, one
per line. The bibfile is a refer(1) style database. hxmkbib looks for entries with a %L
field equal to a key in the auxfile.

The templatefile consists of three parts:

preamble The preamble is the part up to the first occurrence of %{. The preamble is
copied to the output unchanged, except for occurrences of %. To create a single
% in the output, there must be two in the preamble (%%). All other occurrences
of % followed by another letter are not copied, but are collected into a string
called the "sort order." and use to sort the entries, as explained below.

template The template starts with %{L: and ends with a matching %}. The text in between
is copied as often as there are bibliographic entries in bibfile that correspond
to keys in auxfile. Variables in the template are replaced by the corresponding
field in the bibliographic entry: all occurrences of %x will be replaced by the
field %x of the entry. Parts of the text may be enclosed in %{x: and %}. This
means that the text in between should only be output if the current entry has a
field x. Text that is enclosed in %{!x: and %} will only be output if the entry
does not have a field x. Both kinds of conditional sections may also be nested.

postamble The text after the %} is copied unchanged to the output, after all bibliographic
entries have been processed.

By default bibliographic entries are copied to the output in the order of the keys in
auxfile, except that keys that occur more than once are only used once. If the preamble
contains occurrences of %x (where x is neither "%" nor "{") then these together determine
the sort order. E.g., if the preamble contains %A%D then the entries will be sorted first
on field A (author) and then on field D (date).

Here is an example of template file that creates a bibliography in HTML format:

<html>
<title>Bibliography</title>
<!--%A%D sorted on author, then date -->
<dl>
%{L:
<dt id="%L">%{A:A%}%{!A:%{E:E%}%{!E:%{Q:Q%}%{!Q:-%}%}%}</dt>
<dd>%{B:"%T"
in: %{E:%E (eds)
%}<cite>%B.</cite>%{V: %V.%}
%}%{J:"%T"
in: %{E:%E (eds)
%}<cite>%J.</cite>%{V: %V.%}%{N: %N.%}%{P: pp. %P.%}
%}%{!B:%{!J:<cite>%T.</cite>
%}%}%{I:%I.
%}%{D:%D.
%}%{C:%C.
%}%{R:%R.
%}%{S:%S.
%}%{O:%O
%}%{U:<a href="/%U">%U</a>
%}</dd>
%}
</dl>
</html>

This template starts with four lines of preamble, including the sort string %A%D on line
3. The sort string itself will not be output, but the rest of the comment will.

From the line %{L: to the line %} is the template. E.g., the line that starts with <dt
id=... contains a complex conditional text that prints the authors (%A) if there are any,
otherwise the editors (%E) if there are any, otherwise the institution that is the author
(%Q), if any, and a dash otherwise. Note how the parts are nested, Most of the text is
inside %{!A:...%}, meaning that that part will only be effective if there is no author
field (%A).

The final two lines are the postamble and will simply be copied unchanged.

A bibliographic entry that looks like this in bibfile:

%L Java
%A Gosling, James
%A Joy, Bill
%A Steele, Guy
%T The Java language specification
%D 1998
%I Addison-Wesley
%U http://java.sun.com/docs/books/jls/index.html

will be printed by the template above as:

<dt id="Java">Gosling, James; Joy, Bill; Steele, Guy</dt>
<dd><cite>The Java language specification.</cite>
Addison-Wesley.
1998.
<a href="/http://java.sun.com/docs/books/jls/index.html">http://java.sun.com/docs/books/jls/index.html</a>
</dd>

OPTIONS


The following options are supported:

-a auxfile
The file that contains the list of keys (labels) for which bibliographic entries
should be printed. If the option is absent, the name of this file is formed from
the templatefile argument by removing the last extension and adding .aux. If no
templatefile is given, the default auxfile is aux.aux.

-s separator
If there are multiple authors or editors in an entry, their names will be listed
with a separator in between. By default the separator is "; " (i.e., a semicolon
and a space). With this option the separator can be changed.

-n maxauthors
If there are more than maxauthors authors in an entry, only the first author
will be printed and the others will be replaced by the string moreauthors. The
default is 3.

-r moreauthors
The string to print if there are more than maxauthors authors. The default is
"et al.".

OPERANDS


The following operands are supported:

bibfile The name of a bibliographic database must be given. It must be a file in
refer(1) format and every entry must have at least a %L field, which is used as
key. (Entries without such a field will be ignored.)

templatefile
The name of the input file is optional. If absent, hxmkbib will read the
template from stdin.

DIAGNOSTICS


The following exit values are returned:

0 Successful completion.

> 0 An error occurred. Usually this is because a file could not be opened or because
the %{ and %} pairs are not properly nested. Very rarely it may also be an out
of memory error. Some of the possible error messages:

missing ':' in pattern
hxmkbib found a %{ but the second or third letter after it was not a colon.

no '%{' in template file
The template file is unusable, because it contains no template.

unbalanced %{..%} in pattern
There are more %{ than %}.

Use hxmkbib online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    Phaser
    Phaser
    Phaser is a fast, free, and fun open
    source HTML5 game framework that offers
    WebGL and Canvas rendering across
    desktop and mobile web browsers. Games
    can be co...
    Download Phaser
  • 2
    VASSAL Engine
    VASSAL Engine
    VASSAL is a game engine for creating
    electronic versions of traditional board
    and card games. It provides support for
    game piece rendering and interaction,
    and...
    Download VASSAL Engine
  • 3
    OpenPDF - Fork of iText
    OpenPDF - Fork of iText
    OpenPDF is a Java library for creating
    and editing PDF files with a LGPL and
    MPL open source license. OpenPDF is the
    LGPL/MPL open source successor of iText,
    a...
    Download OpenPDF - Fork of iText
  • 4
    SAGA GIS
    SAGA GIS
    SAGA - System for Automated
    Geoscientific Analyses - is a Geographic
    Information System (GIS) software with
    immense capabilities for geodata
    processing and ana...
    Download SAGA GIS
  • 5
    Toolbox for Java/JTOpen
    Toolbox for Java/JTOpen
    The IBM Toolbox for Java / JTOpen is a
    library of Java classes supporting the
    client/server and internet programming
    models to a system running OS/400,
    i5/OS, o...
    Download Toolbox for Java/JTOpen
  • 6
    D3.js
    D3.js
    D3.js (or D3 for Data-Driven Documents)
    is a JavaScript library that allows you
    to produce dynamic, interactive data
    visualizations in web browsers. With D3
    you...
    Download D3.js
  • More »

Linux commands

Ad