lyx_mirror/lib/citeengines/basic.citeengine

97 lines
2.5 KiB
Plaintext
Raw Normal View History

# \DeclareLyXCiteEngine{Basic (BibTeX)}
# DescriptionBegin
# The basic citation capabilities provided by BibTeX.
# Mainly simple numeric styles primarily suitable for science and maths.
# DescriptionEnd
# Author: Julien Rioux <jrioux@lyx.org>
2019-03-26 16:46:21 +00:00
Format 72
2017-01-04 12:30:50 +00:00
# The framework (biblatex|bibtex)
CiteFramework bibtex
2017-01-04 12:30:50 +00:00
# Cite style variants (default|authoryear|natbib)
# We provide only default citations
CiteEngineType default
2017-01-04 12:30:50 +00:00
# Default style file
DefaultBiblio plain
2017-01-04 12:30:50 +00:00
#
# CITE COMMAND DEFINITIONS for either engine type
#
# (cf. natbib.citeengine for a decription of the syntax)
CiteEngine default
cite[]
nocite
keyonly
End
2017-01-04 12:30:50 +00:00
#
# CITE FORMAT
#
# Input standard format definitions for the bibliography
Input stdciteformats.inc
2017-01-04 12:30:50 +00:00
# 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
2017-01-04 12:30:50 +00:00
#
# MACROS
#
# 1. Translatable bits (need to be marked by _ prefix, if translated to the GUI language,
# or B_, if translated to the buffer language)
# Note that preceding and trailing spaces matter.
2017-01-04 12:30:50 +00:00
#
_notcited not cited
_addtobib Add to bibliography only.
_keyonly Key only.
_key Key
2017-01-04 12:30:50 +00:00
#
# 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>!}
2017-01-04 12:30:50 +00:00
# "ID..."
!makecite %!startlink%{%label%[[%label%]][[{%numericallabel%[[%numericallabel%]][[#%key%]]}]]}%!endlink%%!nextcite%
2017-01-04 12:30:50 +00:00
# "..., NextID..."
!nextcite {%next%[[%!sep% %!makecite%]]}
# FIXME: what is this?
!nexthashkey {%next%[[%!sep% #%key%%!nexthashkey%]]}
2017-01-04 12:30:50 +00:00
# "..., NextKey..."
!nextkey {%next%[[%!sep% %key%%!nextkey%]]}
2017-01-04 12:30:50 +00:00
# ", postnote"
!textafter {%textafter%[[, %textafter%]]}
2017-01-04 12:30:50 +00:00
#
# ACTUAL STYLE DEFINITIONS
#
# "[ID, NextID, ..., p. xx]"
cite %!open%{%dialog%[[#ID]][[%!makecite%]]}%!textafter%%!close%
2017-01-04 12:30:50 +00:00
# "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