public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: and0 <andrejpreradovic-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: Citeproc CSL formating overriden by Latex?
Date: Sat, 27 Apr 2019 04:27:09 -0700 (PDT)	[thread overview]
Message-ID: <36d86598-fefe-4e25-9509-ec97f6963a70@googlegroups.com> (raw)
In-Reply-To: <CAJTYOd2Ac6135ZV4AGK5wWVRzknjf6wwYGbM_jL-3S0gXFM8WA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>


[-- Attachment #1.1: Type: text/plain, Size: 4584 bytes --]

Thank you for the explanation latk!
I've now gotten the formating I wanted by wrapping the bibliography in 
\hangparas. That's good enough for now, as I had to create my own CSL style 
and I don't want to have to recreate it in Biblatex for this paper. I'll 
look into doing that later though, so that I can use the Pandoc -> LaTeX 
route you suggested. Thank you!



On Saturday, April 27, 2019 at 11:37:24 AM UTC+2, latk wrote:
>
> Pandoc's CSL engine is fairly limited, just like Pandoc itself. The CSL 
> engine produces normal Pandoc elements, it does not directly produce LaTeX. 
> Pandoc's data model does not describe indentation. Consequently, any 
> indentation in the CSL file will be ignored, and LaTeX will apply normal 
> paragraph styles.
>
> The solution is to manually insert necessary LaTeX formatting commands 
> just before the place where the bibliography will be inserted. 
> Alternatively, use a LaTeX-native bibliography system such as biblatex. 
> This doesn't let you use CSL, but this avoids Pandoc limitations.
>
> Personally, I stick with citeproc for short reports where the exact 
> bibliography rendering isn't that important. But in most cases, using 
> Pandoc as the first stage of a normal LaTeX compilation process is more 
> sensible.
>
> On Fri, 26 Apr 2019 at 19:56, and0 <andrejpr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <javascript:>> 
> wrote:
>
>> Hey everyone,
>>
>> I'm currently writing an academic paper as a .md file, then converting it 
>> to .pdf using the following command: 
>>
>> pandoc --pdf-engine=xelatex --filter pandoc-citeproc metadata/meta.yaml 
>> --template mytemplate.latex -s paper.md -o export/out.pdf
>>
>> meta.yaml contains a link to my .bib file (as well as other things). So 
>> far everything has worked fine, but now I've run into an issue regarding 
>> the formating of my bibliography. I've created a .csl file defining what I 
>> want things to look like, but some elements seem to either be ignored by 
>> citeproc or overriden later. My main issue is indentation: The main text 
>> should have the first line of a paragraph indented, which I'm achieving 
>> through indent = true
>> in my meta.yaml. The bibliography on the other hand should only use 
>> hanging indents, which I have specified in my .csl file.
>>
>> The thing is, when I run pandoc, the bibliography in the resulting pdf 
>> has indent = true applied to it as well, which messes up the entire 
>> formating. I've exported my paper to .latex and didn't see any formating 
>> related to lines in the code (only things like \emph and \textsc), so 
>> XeLaTeX just treats the entries as another paragraph and indents their 
>> first lines. This whole issue of settings in my .csl being overriden also 
>> happens with line spacing for example (I've set linestretch = 1.5 in my 
>> meta.yaml so that's what I'm getting in the bibliography).
>>
>> So now I'm wondering: Is this a bug? Or am I approaching this wrong? I 
>> can sort of understand why citeproc doesn't apply my .csl line settings, 
>> but on the other hand I feel it's a bit inconsistent since it applies *most 
>> *of the .csl. Is there a solution for this or should I be using 
>> --biblatex to export a .tex file and then converting it via XeLaTeX?
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "pandoc-discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>.
>> To post to this group, send email to pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org 
>> <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/pandoc-discuss/ea8553b6-c582-4061-bd5c-0227e0e82fa8%40googlegroups.com 
>> <https://groups.google.com/d/msgid/pandoc-discuss/ea8553b6-c582-4061-bd5c-0227e0e82fa8%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/36d86598-fefe-4e25-9509-ec97f6963a70%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 8322 bytes --]

      parent reply	other threads:[~2019-04-27 11:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-26 17:56 and0
     [not found] ` <ea8553b6-c582-4061-bd5c-0227e0e82fa8-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2019-04-27  9:37   ` Lukas Atkinson
     [not found]     ` <CAJTYOd2Ac6135ZV4AGK5wWVRzknjf6wwYGbM_jL-3S0gXFM8WA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-04-27 11:27       ` and0 [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=36d86598-fefe-4e25-9509-ec97f6963a70@googlegroups.com \
    --to=andrejpreradovic-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).