]> git.lyx.org Git - lyx.git/blobdiff - lib/citeengines/basic.citeengine
Adapt citengine to current layout format.
[lyx.git] / lib / citeengines / basic.citeengine
index 26d5ba379b0fb28e0385c0844f90e18c3f2e332c..5bccaf767e56bd2d775759d43d4354d7f0bed941 100644 (file)
@@ -3,43 +3,93 @@
 #   The basic citation capabilities provided by BibTeX.
 #   Mainly simple numeric styles primarily suitable for science and maths.
 # DescriptionEnd
-# Excludes: jurabib | natbib | biblatex
 
 # Author: Julien Rioux <jrioux@lyx.org>
 
-Format 62
+Format 64
 
+# The framework (biblatex|bibtex)
 CiteFramework bibtex
+
+# Cite style variants (default|authoryear|natbib)
+# We provide only default citations
 CiteEngineType default
+
+# Default style file
 DefaultBiblio  plain
 
+#
+# CITE COMMAND DEFINITIONS for either engine type
+#
+# (cf. natbib.citeengine for a decription of the syntax)
+
 CiteEngine default
        cite[]
        nocite
+       keyonly
 End
 
+
+#
+# CITE FORMAT
+#
+
+# Input standard format definitions for the bibliography
+Input stdciteformats.inc
+
+# The following defines how the commands are represented in the GUI
+# (inset button and citation dialog) as well as in XHTML, docbook and
+# plain text output.
+#
 CiteFormat default
-       # translatable bits
+       #
+       # MACROS
+       #
+       # 1. Translatable bits (need to be marked by _ prefix)
+       #    Note that preceding and trailing spaces matter.
+       #
        _notcited not cited
        _addtobib Add to bibliography only.
+       _keyonly Key only.
+       _key Key
 
-       # macros
+       #
+       # 2. Macros re-used in the style definitions
+       #
        !open [
        !sep ,
        !close ]
+       # Modify scheme of the first author in the bibliography
+       !firstnameform %prename% {%prefix%[[%prefix% ]]}%surname%{%suffix%[[, %suffix%]]}
+       # Modify scheme of other authors in the bibliography
+       !othernameform %prename% {%prefix%[[%prefix% ]]}%surname%{%suffix%[[, %suffix%]]}
 
+       # A link that lets us jump to the bibliography entry in LyXHTML
+       # %clean:key% will be substituted by the cite key to give a unique id
        !startlink {!<a href='#LyXCite-%clean:key%'>!}
        !endlink {!</a>!}
 
-       !cite %!startlink%{%label%[[%label%]][[{%numericallabel%[[%numericallabel%]][[#%key%]]}]]}%!endlink%%!nextcite%
+       # "ID..."
+       !makecite %!startlink%{%label%[[%label%]][[{%numericallabel%[[%numericallabel%]][[#%key%]]}]]}%!endlink%%!nextcite%
 
-       !nextcite {%next%[[%!sep% %!cite%]]}
+       # "..., NextID..."
+       !nextcite {%next%[[%!sep% %!makecite%]]}
+       # FIXME: what is this?
        !nexthashkey {%next%[[%!sep% #%key%%!nexthashkey%]]}
+       # "..., NextKey..."
        !nextkey {%next%[[%!sep% %key%%!nextkey%]]}
 
+       # ", postnote"
        !textafter {%textafter%[[, %textafter%]]}
 
-       # cite styles
-       cite %!open%{%dialog%[[#ID]][[%!cite%]]}%!textafter%%!close%
+       #
+       # ACTUAL STYLE DEFINITIONS
+       #
+
+       # "[ID, NextID, ..., p. xx]"
+       cite %!open%{%dialog%[[#ID]][[%!makecite%]]}%!textafter%%!close%
+       # "Add to bibliography only." (dialog) / "[ID] (not cited)" (button)
        nocite {%dialog%[[%_addtobib%]][[%key%%!nextkey% (%_notcited%)]]}
+       # Output only the key
+       keyonly {%dialog%[[%_keyonly%]][[%_key%: %key%%!nextkey%]]}
 End