ulyngs / oxforddown

Template for writing an Oxford University thesis in R Markdown; uses the OxThesis LaTeX template and was inspired by thesisdown.
https://ulyngs.github.io/oxforddown/
MIT License
220 stars 80 forks source link

Original date of publication #45

Closed tomislavmedak closed 2 years ago

tomislavmedak commented 2 years ago

First, thank you for generating this thesisdown template. As I'm new to latex and rstudio from the markdown territory, I'm struggling a bit to get some things to work. My biggest bugbear is the original date of publication. It seems that the current chicago author-year style for biblatex does not support the original date of publication, e.g. (Marx and Engels [1848] 2010, 488). I'm not able to figure out how to disable biblatex and use pandoc-citeproc, as the latter pandoc-citeproc what I expect in docx and gitbook formats. As you recommend in the Customisations chapter of your guide, I comment out all bib and natbib lines in template.tex and get an error. Neither am I able to get biblatex-chicago, which supports origdate, to work in oxforddown. I'm a bit out of my depth.

ulyngs commented 2 years ago

thanks for flagging this, I will do a bit of digging -- I would like oxforddown to support pandoc-citeproc, so will implement this when I get a bit of free time

tomislavmedak commented 2 years ago

thank you, that's more than I expected. I am currently revising the chapters before I merge them into a single file and let my supervisors go at it, but as soon as I am done, I will tinker some more. and, if of any use, I can contribute a docx template that approximates your latex template more than the default pandoc template.

On Mon, Mar 28, 2022 at 2:01 PM Ulrik Lyngs @.***> wrote:

thanks for flagging this, I will do a bit of digging -- I would like oxforddown to support pandoc-citeproc, so will implement this when I get a bit of free time

— Reply to this email directly, view it on GitHub https://github.com/ulyngs/oxforddown/issues/45#issuecomment-1080562649, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHGME3CQLTLWNYGGHGNYIYLVCGNRDANCNFSM5RZODXLA . You are receiving this because you authored the thread.Message ID: @.***>

ulyngs commented 2 years ago

I don't seem to be ablt to reproduce the problem with original date of publication and biblatex.

With this bibtex entry:

@book{Mill1965,
  author = {Mill, John Stuart},
  Location = {London},
  Publisher = {Longmans},
  Title = {A System of Logic, Ratiocinative and Inductive},
  Subtitle = {Being a Connected View of the Principles of Evidence and the Methods of Scientific Investigation},
  Year = {1965 [1843]}
}

And this markdown citation in the Introduction:

This is great [@Mill1965]

I get this output:

image

Can you show me how to reproduce the problems you're encountering with biblatex?

ulyngs commented 2 years ago

Hi Tomis,

can you download/pull the latest version and kick the tires a bit?

I just enabled use of pandoc for citations (a0a3158068ea960a77109385a69fcf6e8dbdffd7) -- in fact, I changed the default to use pandoc instead of biblatex, because pandoc CSL citations is the ordinary default for R Markdown, and because it tends to cause less fuss.

tomislavmedak commented 2 years ago

Dear Ulrik, works like a charm, including linking to references.

[image: Screenshot from 2022-04-05 11-52-18.png]

On Mon, Apr 4, 2022 at 12:37 PM Ulrik Lyngs @.***> wrote:

Hi Tomis,

can you download/pull the latest version and kick the tires a bit?

I just enabled use of pandoc for citations (a0a3158 https://github.com/ulyngs/oxforddown/commit/a0a3158068ea960a77109385a69fcf6e8dbdffd7) -- in fact, I changed the default to use pandoc instead of biblatex, because pandoc CSL citations is the ordinary default for R Markdown, and because it tends to cause less fuss.

— Reply to this email directly, view it on GitHub https://github.com/ulyngs/oxforddown/issues/45#issuecomment-1087391959, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHGME3CCU3VAP7O4N5XRIKTVDLA7DANCNFSM5RZODXLA . You are receiving this because you authored the thread.Message ID: @.***>

tomislavmedak commented 2 years ago

Thank you for following up on this.

This is the relevant biblatex entry:

@incollection{marx_manifesto_1848, title = {Manifesto of the {{Communist Party}}}, booktitle = {Marx - {{Engels}}}, author = {Marx, Karl and Engels, Friedrich}, date = {2010}, origdate = {1848}, series = {Karl {{Marx}}, {{Frederick Engels}}: {{Collected Works}}}, volume = {6}, pages = {477--519}, publisher = {{Lawrence \& Wishart}}, location = {{London}}, isbn = {978-1-84327-980-8}, langid = {english}, volumes = {50}, }

I use origdate tag to indicate the original date of publication. This might though not be a universal solution though, as there seems to be no convention around this. I found it on the interwebs when I was first looking at the problem of how to cite inline the original date of the publication -- and it worked perfectly for my needs: adding the original date in Zotero, getting it exported into a biblatex file, and then outputing it through pandoc with the Chicago author-date. It might be though specific to Chicago.

In oxforddown I use chicago-author-date.csl to generated docx files, that's probably why it works in docx and not pdf export. Therefore, I guess, I would have to force oxforddown to generated PDF with pandoc-citeproc or have to use biblatex-chicago instaed of biblatex package to generate references. Do you have maybe pointers to do one or the other? I tried various things, but it did not work.

On Sat, Apr 2, 2022 at 6:21 PM Ulrik Lyngs @.***> wrote:

I can't reproduce the problem with original date of publication and biblatex?

With this bibtex entry:

@book{Mill1965, author = {Mill, John Stuart}, Location = {London}, Publisher = {Longmans}, Title = {A System of Logic, Ratiocinative and Inductive}, Subtitle = {Being a Connected View of the Principles of Evidence and the Methods of Scientific Investigation}, Year = {1965 [1843]} }

And this markdown citation in the Introduction:

This is great @.***

I get this output:

[image: image] https://user-images.githubusercontent.com/23137032/161391889-18fa0154-05ff-4ebd-953e-a4fa4ae6efa5.png

Can you show me how to reproduce this as not working

— Reply to this email directly, view it on GitHub https://github.com/ulyngs/oxforddown/issues/45#issuecomment-1086671756, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHGME3CL5D75IL422GTSUHDVDBXZNANCNFSM5RZODXLA . You are receiving this because you authored the thread.Message ID: @.***>

ulyngs commented 2 years ago

Does it not work in the latest version of oxforddown? I.e., if you download the latest version and move your chapters, data, and figure files in there, then knit?

oxforddown now uses pandoc to generate references by default, so you should be able to use the same csl file for both the docx and pdf output and it should just work?

tomislavmedak commented 2 years ago

This is weird -- that's an old comment of mine on including orignal date of publication, I have no clue how it got bumped up here. I assumed you were replying to my comment on the references chapter here: https://github.com/ulyngs/oxforddown/issues/27#issuecomment-1257182490.

Now I've tested with a vanilla version of oxforddown and it works as advertised. I was probably testing with old code, apologies my bad.