OnWorks favicon

hxcite-mkbib - Online in the Cloud

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

This is the command hxcite-mkbib 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



hxcite-mkbib - expand references and create bibliography


hxcite-mkbib [ -b base ] [ -p pattern ] [ -s separator ] bibfile [ file ]


The hxcite-mkbib commands copies file to standard output, looking for strings of the form
"[[label]]" and for a template for a bibliography. The label may not include white space
and the double pair of square brackets must enclose the label without any spaces in
between. If hxcite-mkbib finds the label in the bibfile, the string is replaced by the
pattern. The pattern can include certain variables. If the label is not found in bibfile,
it is left unchanged.

The default pattern replaces the string with a hyperlink, but if the -p option is used,
the replacement can be any pattern. The input doesn't even have to be HTML.

The file consists of three parts:

preamble The preamble is the part up to the first occurrence of %{. The preamble is
copied to the output once (with bracketed labels ("[[label]]") expanded). The
character % is treated specially. 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 used 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 bracketed labels in file. 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 labels in
file, except that labels 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 a file that creates a bibliography in HTML format:

... text with [[references]] here...
<!--%A%D sorted on author, then date -->
<dt id="%L">%{A:A%}%{!A:%{E:E%}%{!E:%{Q:Q%}%{!Q:-%}%}%}</dt>
in: %{E:%E (eds)
%}<cite>%B.</cite>%{V: %V.%}
in: %{E:%E (eds)
%}<cite>%J.</cite>%{V: %V.%}%{N: %N.%}%{P: pp. %P.%}
%}%{U:<a href="/%U">%U</a>

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>
<a href="/http://java.sun.com/docs/books/jls/index.html">http://java.sun.com/docs/books/jls/index.html</a>


The following options are supported:

-p pattern
Specifies the pattern by which the string [[label]] is replaced. The pattern
may include the variables %b (which will be replaced by the value of the -b
option) and %L (which will be replaced by the label). The default pattern is

<a href="/%b#%L" rel="biblioentry">[%L]</a>

-b base Sets the value for the %b variable in the pattern. Typically this is set to a
relative or absolute URL. By default this value is an empty string.

-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.


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 compared
to the bracketed labels. (Entries without such a field will be ignored.)

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


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 hxcite-mkbib online using onworks.net services

Free Servers & Workstations

Download Windows & Linux apps

  • 1
    OpenFOAM - The Open Source CFD Toolbox.
    OpenFOAM is a generic, programmable
    software tool for Computational Fluid
    Dynamics (CFD). For more information,
    see: - ...
    Download OpenFOAM
  • 2
    PostInstallerF will install all the
    software that Fedora Linux and others
    doesn't include by default, after
    running Fedora for the first time. Its
    easy for...
    Download PostInstallerF
  • 3
    The strace project has been moved to
    https://strace.io. strace is a
    diagnostic, debugging and instructional
    userspace tracer for Linux. It is used
    to monitor a...
    Download strace
  • 4
    JasperReports Library
    JasperReports Library
    JasperReports Library is the
    world's most popular open source
    business intelligence and reporting
    engine. It is entirely written in Java
    and it is able to ...
    Download JasperReports Library
  • 5
    Numerical Python
    Numerical Python
    NEWS: NumPy 1.11.2 is the last release
    that will be made on sourceforge. Wheels
    for Windows, Mac, and Linux as well as
    archived source distributions can be fou...
    Download Numerical Python
  • 6
    CMU Sphinx
    CMU Sphinx
    CMUSphinx is a speaker-independent large
    vocabulary continuous speech recognizer
    released under BSD style license. It is
    also a collection of open source tools ...
    Download CMU Sphinx
  • 7
    Old Feren OS Repositories
    Old Feren OS Repositories
    This was the Official Repository for
    Feren OS. To add the latest one, run
    this command: (16.04-based) echo
    "deb ...
    Download Old Feren OS Repositories
  • More »

Linux commands