You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -321,13 +539,48 @@ This experimental package allows SILE to read and process BibTeX \code{.bib} fil
321
539
322
540
To load a BibTeX file, issue the command \autodoc:command{\loadbibliography[file=<whatever.bib>]}
323
541
542
+
\smallskip
543
+
\noindent
544
+
\em{Producing citations and references (legacy commands)}
545
+
\novbreak
546
+
547
+
\indent
324
548
To produce an inline citation, call \autodoc:command{\cite{<key>}}, which will typeset something like “Jones 1982”.
325
549
If you want to cite a particular page number, use \autodoc:command{\cite[page=22]{<key>}}.
326
550
327
551
To produce a full reference, use \autodoc:command{\reference{<key>}}.
328
552
329
-
Currently, the only supported bibliography style is Chicago referencing, but other styles should be easy to implement.
330
-
Adapt \code{packages/bibtex/styles/chicago.lua} as necessary.
553
+
Currently, the only supported bibliography style is Chicago referencing.
554
+
555
+
\smallskip
556
+
\noindent
557
+
\em{Producing citations and references (CSL implementation)}
558
+
\novbreak
559
+
560
+
\indent
561
+
While an experimental work-in-progress, the CSL (Citation Style Language) implementation is more powerful and flexible than the legacy commands.
562
+
563
+
You must first invoke \autodoc:command{\bibliographystyle[style=<style>, lang=<lang>]}, where \autodoc:parameter{style} is the name of the CSL style file (without the \code{.csl} extension), and \autodoc:parameter{lang} is the language code of the CSL locale to use (e.g., \code{en-US}).
564
+
565
+
The command accepts a few additional options:
566
+
567
+
\begin{itemize}
568
+
\item{\autodoc:parameter{localizedPunctuation} (default \code{false}): whether to use localized punctuation – this is non-standard but may be useful when using a style that was not designed for the target language;}
569
+
\item{\autodoc:parameter{italicExtension} (default \code{true}): whether to convert \code{_text_} to italic text (“à la Markdown”);}
570
+
\item{\autodoc:parameter{mathExtension} (default \code{true}): whether to recognize \code{$formula$} as math formulae in (a subset of the) TeX-like syntax.}
571
+
\end{itemize}
572
+
573
+
The locale and styles files are searched in the \code{csl/locales} and \code{csl/styles} directories, respectively, in your project directory, or in the Lua package path.
574
+
For convenience and testing, SILE bundles the \code{chicago-author-date} and \code{chicago-author-date-fr} styles, and the \code{en-US} and \code{fr-FR} locales.
575
+
If you don’t specify a style or locale, the author-date style and the \code{en-US} locale will be used.
576
+
577
+
To produce an inline citation, call \autodoc:command{\csl:cite{<key>}}, which will typeset something like “(Jones 1982)”.
578
+
579
+
To produce a full reference, use \autodoc:command{\csl:reference{<key>}}.
580
+
581
+
To produce a complete bibliography, use \autodoc:command{\printbibliography}.
582
+
As of yet, this command is for testing purposes only.
583
+
It does not handle sorting or filtering of the bibliography.
331
584
332
585
\smallskip
333
586
\noindent
@@ -376,7 +629,9 @@ If no such abbreviation is found, the value is considered to be a string literal
376
629
377
630
String values are assumed to be in the UTF-8 encoding, and shall not contain (La)TeX commands.
378
631
Special character sequences from TeX (such as \code{`} assumed to be an opening quote) are not supported.
379
-
There are exceptions to this rule. Notably, the \code{~} character can be used to represent a non-breaking space (when not backslash-escaped), and the \code{\\&} sequence is accepted (though this implementation does not mandate escaping ampersands).
632
+
There are exceptions to this rule.
633
+
Notably, the \code{~} character can be used to represent a non-breaking space (when not backslash-escaped), and the \code{\\&} sequence is accepted (though this implementation does not mandate escaping ampersands).
634
+
With the CSL renderer, see also the non-standard extensions above.
380
635
381
636
Values can also be composed by concatenating strings, using the \code{#} character.
0 commit comments