-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support for additional citation packages for md --> tex #3811
Comments
It's not that simple. There are many differences between natbib and biblatex besides which package to use and which citation commands to use. (E.g. what command to use for the bibliography, and where this command goes.) Note also that with biblatex a variety of commands is used, not just two. Why not just use pandoc-citeproc and an appropriate csl file that fits your journal's standards? |
Well, mainly because the journal expects a .tex file for submission that uses their template... so they expect the What about just adding support for base LaTeX |
Learning more about filters...that's probably the way to go for supporting arbitrary LaTeX citation packages. User could select the citation package closest to the one they actually want to use (e.g. natbib or biblatex) and then use a filter to reformat citations into the actual style of the intended package. I still think it would be valuable to support base LaTeX citations in this case to provide maximum flexibility. |
Using pandoc-citeproc you can produce a tex file, but the formatting might not be exactly as the journal expects, if they use bibtex. As for supporting base LaTeX citations: I can't recall the details of |
Prefixes, suffixes and locators are supported with |
Sorry for reviving an old issue, let me know if a separate issue would be best to track this. I just happen to have run into this today while trying to set up a template to use with markdown -> LaTeX. My case is similar to #2392, where the conference template still uses BiBTeX's |
I'm open to adding a |
I have to say that I don't know enough about the internals of BiBTeX/pandoc to know if there's a way to do that. In my field, that's usually not needed (since my citations are always numeric), but based on this the only thing that is possible is to specify details for the locator using After an extremely quick search on the BiBTeX docs there might be two options (keep in mind that I don't know how hard/problematic this is to implement):
|
Hi! This requirement fits my use case too - many journals require a Also, are there any filters available that could serve the purpose? |
You could just add this to the top of your file (untested):
|
This didn't work for my use case: trying to get Pandoc output to work with an up-to-date Tufte-latex (using BibLaTeX with this update: Tufte-LaTeX/tufte-latex#176). Tufte-latex looks for \ExecuteBibliographyOptions{autocite=footnote} This puts |
Would love to have a built-in option for the native |
Pandoc currently supports
natbib
andbiblatex
for LaTeX output, but no other citation methods, including the default\cite
command. It would be great to see Pandoc provide flexible support for citation packages, such as the cite package. This functionality would be useful for e.g. generating tex files for journals that restrict use ofnatbib
orbiblatex
.It may be possible to use pandoc variables to support virtually any citation package. My understanding is that Pandoc markdown supports two types of citations: parenthetical
[@citation]
and textual@citation
(difference is the[]
). Perhaps Pandoc could use two variables for LaTeX templates, e.g.$citeparen$
and$citetext$
, which allow users to specify what LaTeX commands to use. So current functionality fornatbib
in the YAML header would look like:and
biblatex
would (I think?) look like:Pandoc would use those variables to populate the .tex file. A third variable
$citepackageoptions$
could also be added to allow users to specify options in[]
, e.g.\usepackage[$citepackageoptions$]{$citation-package$}
.It would of course be up to the user to correctly specify which commands to use. A possible complication arises with citations like
[e.g. @citation; see also @another]
but again, it's up to the user if they want to use a package with more restrictive functionality than what pandoc provides (then again, pandoc seems to do fine with ignoring the extra text when I use a superscript-based bibliography format withnatbib
, so maybe not a difficult issue after all).The text was updated successfully, but these errors were encountered: