Open alfureu opened 9 years ago
These are very easy to add in general. You can see an example of how cite
is implemented here.
Thanks @mpickering, though have no idea how to make a patch for this. Anybody can help with this?
Looked into the link you provided. While few of the citation formats are simply missing (i.e. they are easy to add), I could not figure out how to introduce the \citetitle
command. Could somebody here have a look into this please?
If \citetitle
prints the title of the citation, then
there's no way to do this with current pandoc-citeproc
architecture.
+++ DOFfactory [Jul 31 15 05:56 ]:
Looked into the link you provided. While few of the citation formats are simply missing (i.e. they are easy to add), I could not figure out how to introduce the \citetitle command. Could somebody here have a look into this please?
— Reply to this email directly or [1]view it on GitHub.
References
Why not to add it? We have a bib(la)tex file, all the data are there ... Just as one calls the author, one should be able to call the title from the same file.
It would be a large change, including changes to the underlying pandoc types. (We'd need to modify CitationMode, which now includes AuthorInText, SuppressAuthor, and NormalCitation to include something like TitleOnly. We'd need to think about whether there was some natural markdownish syntax for this. And we'd need to modify pandoc-citeproc to handle the additional CitationMode.)
+++ DOFfactory [Aug 06 15 13:11 ]:
Why not to add it? We have a bib(la)tex file, all the data are there ... Just as one calls the author, one should be able to call the title from the same file.
— Reply to this email directly or [1]view it on GitHub.
References
@DOFfactory, it would help if you were more specific about what is "not working" in your list, and how.
\footcite
and footcitetext
do get parsed as citations in notes.
As I've indicated, \citeauthor
and \citetitle
can't be done without signficant changes in pandoc and pandoc-citeproc architecture. (Though we could parse them as regular citations, which would be better than doing nothing.) \fullcite
is probably in the same boat, though I'm not really sure what it's supposed to do. \Cite
should be easy enough to add.
Hi @jgm, I attached the screenshots. You are right, \footcite
and \footcitetext
does get parsed, my bad. \Cite
should be also easily implemented.
What this ticket initially supposed to point out was that biblatex
is getting to be used widely in the LaTeX-using community. It would be great if biblatex
commands would be parsed straightforward in pandoc
because, I believe, a big group this community (mostly from academia) will then use pandoc
and markdown for conversion/writing.
I've implemented \Cite
. Getting \fullcite
, \citeauthor
, and \citetitle
would require major architectural changes in pandoc and pandoc-citeproc.
Many thanks! Since I do not have an expertise to re-write your pandoc-citeproc code either, I will leave this issue open as a reminder and future reference for others. It would be great to have fully implemented biblatex for the reasons mentioned above. Thanks again.
It would be nice to have an equivalent of \fullcite
in markdown, though.
In a syllabus, e.g., you might want to use an author-date style in general, but still occasionally give the full details of a recommended textbook, or of the reading for a particular date in the text itself, like:
Blah blah blah. The recommended textbook for this course is:
Knox, Paul L., and Steven Pinch. 2006. Urban Social Geography: An Introduction. 5th ed. Harlow: Pearson/Prentice Hall.
Blah blah blah.
Since this would just have to copy the entry that is being generated anyway for the list of references, this might not be too difficult.
As to syntax, we’d have to invent something; maybe a plus sign (+) before the @ would do, like [+@knox]
, or just +@knox
.
Thoughts?
Since @ref gives the author's name, [@ref] the actual reference, then maybe "@ref" is a good syntax for the title (i.e. \citetitle)?
For others following this issue, I have found a work-around that might suit your purposes (e.g. writing syllabi like @dbosk). You can trick Pandoc and CSL into rendering full citations in-text (ala \fullcite
) throughout the whole document by doing the following:
class="note"
to class="in-text"
in the XML's root <style>
element.CSL makes such a strong distinction between in-text and (foot)note styles that apparently changing that class
attribute will change one to the other (see cs:style
in the CSL spec). Unfortunately it's all or nothing, though.
The Zotero CSL repository has several full-note styles. I've tried this with Chicago 17th Edition (full note) and Chicago 17th Edition (full note, short title subsequent), and it seems to work just fine.
I generated the following using the Chicago short-title-subsequent CSL.
Input:
> Lorem ipsum let's say I'm in the middle of my text and I want a full citation to an IoT paper:
>
> @Bittencourt2018IotFogAndCloud
>
> Now another one:
>
> @AbdelBaky20178ComputingInTheContinuum
>
> Now back to the first again for a short title:
>
> @Bittencourt2018IotFogAndCloud
Command (the inline sed
command makes the class change on the fly as the CSL file is fed into Pandoc):
pandoc --filter pandoc-citeproc \
--bibliography syllabus.bib \
--csl <(sed '2s/class="note"/class="in-text"/' \
chicago-fullnote-bibliography-short-title-subsequent.csl) \
-M suppress-bibliography=true \
demo.md --to gfm -o demo-out.md
Output:
Lorem ipsum I'm in the middle of a syllabus table...
Luiz Bittencourt et al. "The Internet of Things, Fog and Cloud Continuum: Integration and Challenges," Internet of Things 3-4 (2018): 134--55, https://doi.org/https://doi.org/10.1016/j.iot.2018.09.005.
M. AbdelBaky et al. "Computing in the Continuum: Combining Pervasive Devices and Services to Support Data-Driven Applications," in 2017 Ieee 37th International Conference on Distributed Computing Systems (Icdcs), 2017, 1815--24, https://doi.org/10.1109/ICDCS.2017.323.
Here is a repeated citation with the short-title form:
Bittencourt et al. "The Internet of Things, Fog and Cloud Continuum."
This isn't a full solution because it's so all-or-nothing and can't be chosen on a per-citation basis, but it's useful for me and I thought I'd share.
Very useful indeed, thanks for sharing!
Note: \notecite
is critical for the APA Style. For instance, \notecite[5]{something}
should produce “p. 5” and \pnotecite[5]{something}
should produce “(p. 5)”.
P.S. Further, \textquote
/\blockquote
and \textcquote
/\blockcquote
from csquotes
would be awesome. (They tie together quoting and citations.)
When this support get added, will it work in markdown/html conversion too?
Perhaps this could be done simply by using a Lua filter to look up the bibliography data and replace \citetitle
and \citeauthor
occurrences with their appropriate values. I am still a beginner with Lua, but I might give it a try in the holidays.
Perhaps this could be done simply by using a Lua filter to look up the bibliography data and replace \citetitle and \citeauthor occurrences with their appropriate values. I am still a beginner with Lua, but I might give it a try in the holidays.
That sounds feasible to me.
Hi - just to say +1 for \fullcite!
Perhaps this could be done simply by using a Lua filter to look up the bibliography data and replace \citetitle and \citeauthor occurrences with their appropriate values. I am still a beginner with Lua, but I might give it a try in the holidays.
That sounds feasible to me.
@jgm, can you think of any existing script that seems similar or close enough to this that I could use as a blueprint or starting point?
EDIT: I have some experience editing and adapting Lua scripts (that seem close enough to ruby, which I use more often), but not starting them from scratch and, so far, I couldn't find anything close enough that I successfully managed to adapt.
To anyone interested in citeauthor
, citetitle
, citefield
and so on (not fullcite
), see: https://github.com/bcdavasconcelos/citefield
+1 for \fullcite for me. It's a bit debilitating. I use LaTeX to prepare syllabi and then have to pandoc them over to Word for accessibility issues.
I would like to report the issue that basic (and critical) biblatex commands are not converted from TeX > docx with pandoc. These commands are:
1. Creating a MWE with the following code in file
pandoc.tex
:The commands are from the official
biblatex
manual http://mirrors.ctan.org/macros/latex/contrib/biblatex/doc/biblatex.pdf2. Typed in command line:
Using
pandoc 1.15.0.6
the following commands are not working (highlighted in bold):\cite
\Cite
\parencite
\Parencite
\footcite
\footcitetext
\textcite
\Textcite
\smartcite
\Smartcite
\fullcite
\footfullcite
\citeauthor
\Citeauthor
\citetitle
\citeyear
Could you, please, provide functionality for the missing
biblatex
commands? IMHO\citetitle
,\footcite
and\fullcite
are pretty critical.EDIT: Attached screenshots
4. Result in LaTeX
5. Result from
pandoc
in DOCX