]> git.lyx.org Git - lyx.git/blobdiff - lib/citeengines/jurabib.citeengine
Adapt citengine to current layout format.
[lyx.git] / lib / citeengines / jurabib.citeengine
index 50c74bdb050003c6af79572a7511143a66c95fda..881deeef2aa776c944df86f7b2a25b940a3c2f61 100644 (file)
@@ -4,11 +4,10 @@
 #   and the Humanities. It includes localizations for English, German, French, Dutch,
 #   Spanish and Italian.
 # DescriptionEnd
-# Excludes: basic | natbib | biblatex
 
 # Author: Julien Rioux <jrioux@lyx.org>
 
-Format 63
+Format 64
 
 Requires jurabib
 
@@ -44,6 +43,8 @@ MaxCiteNames 3
 #
 # Note further:
 #
+# * The LyXName "keyonly" has a special meaning: only the citation key,
+#   without any latex command, is output.
 # * Capitalization indicates that the command also has a capitalized
 #   form (\Latexcmd vs. \latexcmd). These usually enforce upcasing of
 #   name prefixes (von Goethe => Von Goethe).
@@ -94,6 +95,7 @@ CiteEngine authoryear
        citeyearpar [][]
        fullcite [][]
        nocite
+       keyonly
 End
 
 #
@@ -104,18 +106,30 @@ End
 # (inset button and citation dialog) as well as in XHTML, docbook and
 # plain text output.
 #
+
+# Input standard format definitions for the bibliography
+Input stdciteformats.inc
+
 CiteFormat authoryear
        #
        # 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
        _fullcite bibliography entry
        _bibentry Bibliography entry.
        _before before
        _shorttitle short title
+       # The following are handled by BiblioInfo
+       _etal  et al.
+       _namesep /
+       _lastnamesep /
+       _pairnamesep /
 
        #
        # 2. Macros re-used in the style definitions
@@ -123,16 +137,24 @@ CiteFormat authoryear
        !open (
        !sep ;
        !close )
+       !obracket [
+       !cbracket ]
 
        # 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>!}
 
-       # "ShortAuthor" or "??"
-       !shortauthor {%shortauthor%[[%shortauthor%]][[??]]}
-       # "... ShortTitle" (button) / "... ShortTitle <short title>" (dialog)
-       !shorttitle {%shorttitle%[[ %shorttitle%]][[{%dialog%[[ <%_shorttitle%>]]}]]}
+       # "ShortAuthor", "Author" or "??"
+       !shortauthor {%shortauthor%[[%shortauthor%]][[{%abbrvciteauthor%[[%abbrvciteauthor%]][[??]]}]]}
+       # "... ShortTitle"
+       !shorttitle {%shorttitle%[[ %shorttitle%]][[{%dialog%[[ <%_shorttitle%>]][[%!makejurashorttitle%]]}]]}
+       # Title or "??"
+       !maketitle {%title%[[ %title%]][[ ??]]}
+       # "Journal Volume [Year]"
+       !jurashorttitle {%journal%[[ %journal%]]}{%volume%[[ %volume%]]}{%year%[[ %!obracket%%year%%!cbracket%]]}
+       # Handle short title fallback
+       !makejurashorttitle {%ifentrytype:article%[[%!jurashorttitle%]][[{%ifentrytype:periodical%[[%!jurashorttitle%]][[ %!maketitle%]]}]]}
        # "prenote "
        !textbefore {%textbefore%[[%textbefore% ]]}
        # "/prenote" (button) / "/prenote/<before>" (dialog)
@@ -212,4 +234,6 @@ CiteFormat authoryear
        fullcite {%dialog%[[%_bibentry%]][[{%label%[[%!fullcite%]][[%key%%!nextkey% (%_fullcite%)]]}]]}
        # "Add to bibliography only." (dialog) / "Key; Key ... (not cited)" (button)
        nocite {%dialog%[[%_addtobib%]][[%key%%!nextkey% (%_notcited%)]]}
+       # Output only the key
+       keyonly {%dialog%[[%_keyonly%]][[%_key%: %key%%!nextkey%]]}
 End