Skip to content
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

Add citation style file. #67

Open
guifsdev opened this issue Jul 21, 2020 · 3 comments
Open

Add citation style file. #67

guifsdev opened this issue Jul 21, 2020 · 3 comments

Comments

@guifsdev
Copy link

guifsdev commented Jul 21, 2020

First of all, I would like to say thank you to everyone involved in this amazing project.

I'm sorry if this is already implemented. I couldn't locate in the docs.
I would like to use ABNT as a citation style in my document. Normally I would include a .csl file in the metadata section of the markdown file I'm editing. Is it somehow possible to do with this package?

@Witiko
Copy link
Owner

Witiko commented Jul 24, 2020

Hello @guifsdev,

using the Citation Style Language (CSL) is currently not supported. Using the CSL is natural for software that only uses LaTeX as the typesetting backend, such as pandoc. By contrast, the markdown package provides only markdown parsing and a thin API: all formatting and styling is done in LaTeX. For bibliography styling, this amounts to using BibTeX, NatBib, or BibLaTeX, see the example below. If there ever exists support for the CSL in LaTeX, I should be able to add it to the markdown package easily. However, that's not the case at the moment.

\documentclass{article}
\usepackage{filecontents}
\begin{filecontents*}{document.bib}
@book{knuth:tex,
  author    = "Knuth, Donald Ervin",
  title     = "The \TeX book, volume A of Computers and typesetting",
  publisher = "Addison-Wesley",
  year      = "1984"
}
\end{filecontents*}
\usepackage[backend=biber]{biblatex}
\addbibresource{document.bib}
\usepackage[citations]{markdown}
\begin{document}

\begin{markdown}
The TeXbook [@knuth:tex, p. 123 and 130] was written by @knuth:tex.
\end{markdown}

\printbibliography
\end{document}

Example above was taken from the user manual. To learn how to change citation styles with BibLaTeX, see the tutorial on Overleaf.

@guifsdev
Copy link
Author

@Witiko Thank you very much for the clarification. I'll be looking forward for this feature.

@zepinglee
Copy link

If there ever exists support for the CSL in LaTeX, I should be able to add it to the markdown package easily. However, that's not the case at the moment.

I'm currently working on https://github.com/zepinglee/citeproc-lua which is aimed to provide CSL support for LaTeX. It will be published to CTAN soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants