public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* bypass citeproc-hs for TeX output
@ 2012-03-16 17:01 Denis Laxalde
       [not found] ` <slrnjm6sfb.f8l.dlaxalde-T85V+x1JxGoLYo7F1cQaMqzhbVMjY+CzVGlYjEr6lBI@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Denis Laxalde @ 2012-03-16 17:01 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Hi,

I usually use the following to create a TeX source using Pandoc (which
is then build manually):

    pandoc -o doc.tex -t latex --bibliography=biblio.bib --biblatex doc.txt

citeproc-hs appears to be called by Pandoc everytimes the --bibliography
option is present even if there is a --biblatex or --natbib option. I
wonder if this is actually necessary since the bibliography will
eventually be built by the bibtex engine upon TeX compilation.
(The "trouble" is that this citeproc-hs call is quite time consuming for
large bibliographic database (mine has around 1400 entries).)

Is there a way to avoid this call and if not, don't you think it would
make sense to bypass it for TeX (and maybe PDF) output, at least when
there's a LaTeX-specific citation option (natbib, biblatex)?

Cheers.

-- 
Denis


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: bypass citeproc-hs for TeX output
       [not found] ` <slrnjm6sfb.f8l.dlaxalde-T85V+x1JxGoLYo7F1cQaMqzhbVMjY+CzVGlYjEr6lBI@public.gmane.org>
@ 2012-03-16 22:59   ` John MacFarlane
  2012-03-17 17:56     ` Denis Laxalde
  0 siblings, 1 reply; 8+ messages in thread
From: John MacFarlane @ 2012-03-16 22:59 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

+++ Denis Laxalde [Mar 16 12 17:01 ]:
> Hi,
> 
> I usually use the following to create a TeX source using Pandoc (which
> is then build manually):
> 
>     pandoc -o doc.tex -t latex --bibliography=biblio.bib --biblatex doc.txt
> 
> citeproc-hs appears to be called by Pandoc everytimes the --bibliography
> option is present even if there is a --biblatex or --natbib option. I
> wonder if this is actually necessary since the bibliography will
> eventually be built by the bibtex engine upon TeX compilation.
> (The "trouble" is that this citeproc-hs call is quite time consuming for
> large bibliographic database (mine has around 1400 entries).)
> 
> Is there a way to avoid this call and if not, don't you think it would
> make sense to bypass it for TeX (and maybe PDF) output, at least when
> there's a LaTeX-specific citation option (natbib, biblatex)?

Pandoc does bypass most of the citeproc processing if you specify
--biblatex and --natbib. But it still does read the bibliography,
since it needs a list of reference IDs to distinguish references
from other words beginning with @, including example list references.

I'm not sure why the citeproc 'readBiblioFile' code takes so much time.
Maybe this could be optimized.  Andrea, do you have a guess about what
is causing the slowdown, or where to look in the code?

I suppose we could introduce a simpler bibliography reading function
that just gets a list of reference IDs without doing the other
things 'readBiblioFile' does (parsing things into citeproc's
data structures), and use it if --natbib or --biblatex is used.
But I'd rather speed up 'readBiblioFile' if possible.

John


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: bypass citeproc-hs for TeX output
  2012-03-16 22:59   ` John MacFarlane
@ 2012-03-17 17:56     ` Denis Laxalde
       [not found]       ` <slrnjm9k29.jc3.dlaxalde-T85V+x1JxGoLYo7F1cQaMqzhbVMjY+CzVGlYjEr6lBI@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Denis Laxalde @ 2012-03-17 17:56 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

John MacFarlane wrote:
> Pandoc does bypass most of the citeproc processing if you specify
> --biblatex and --natbib. But it still does read the bibliography,
> since it needs a list of reference IDs to distinguish references
> from other words beginning with @, including example list references.

Ah! I missed that and thought that the @ was reserved for citations.
Thanks.

-- 
Denis


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: bypass citeproc-hs for TeX output
       [not found]       ` <slrnjm9k29.jc3.dlaxalde-T85V+x1JxGoLYo7F1cQaMqzhbVMjY+CzVGlYjEr6lBI@public.gmane.org>
@ 2012-03-17 18:14         ` John MacFarlane
  2012-03-19 17:32           ` Denis Laxalde
  0 siblings, 1 reply; 8+ messages in thread
From: John MacFarlane @ 2012-03-17 18:14 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

+++ Denis Laxalde [Mar 17 12 17:56 ]:
> John MacFarlane wrote:
> > Pandoc does bypass most of the citeproc processing if you specify
> > --biblatex and --natbib. But it still does read the bibliography,
> > since it needs a list of reference IDs to distinguish references
> > from other words beginning with @, including example list references.
> 
> Ah! I missed that and thought that the @ was reserved for citations.
> Thanks.

In a way, the double use of @ is bad design, but the use in example
lists was already established when we added citations, and I thought
it would not be good to change it and break existing documents.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: bypass citeproc-hs for TeX output
  2012-03-17 18:14         ` John MacFarlane
@ 2012-03-19 17:32           ` Denis Laxalde
       [not found]             ` <slrnjmerdr.qrp.dlaxalde-aEClnr43cpNHtwG6+KyEKfXnZcPZzHxnLAPz8V8PbKw@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Denis Laxalde @ 2012-03-19 17:32 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

John MacFarlane wrote:
> +++ Denis Laxalde [Mar 17 12 17:56 ]:
>> John MacFarlane wrote:
>> > Pandoc does bypass most of the citeproc processing if you specify
>> > --biblatex and --natbib. But it still does read the bibliography,
>> > since it needs a list of reference IDs to distinguish references
>> > from other words beginning with @, including example list references.
>> 
>> Ah! I missed that and thought that the @ was reserved for citations.
>> Thanks.
>
> In a way, the double use of @ is bad design, but the use in example
> lists was already established when we added citations, and I thought
> it would not be good to change it and break existing documents.

By the way, I've been playing with these numbered example lists and it
seems that the markers have to be within parentheses for the list to be
correctly generated. Is it a bug or the expected behavior (in which
case, I think it should be stated more clearly in the documentation)?

-- 
Denis


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: bypass citeproc-hs for TeX output
       [not found]             ` <slrnjmerdr.qrp.dlaxalde-aEClnr43cpNHtwG6+KyEKfXnZcPZzHxnLAPz8V8PbKw@public.gmane.org>
@ 2012-03-19 17:40               ` John MacFarlane
  2012-03-19 18:36                 ` Denis Laxalde
  0 siblings, 1 reply; 8+ messages in thread
From: John MacFarlane @ 2012-03-19 17:40 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

+++ Denis Laxalde [Mar 19 12 17:32 ]:
> John MacFarlane wrote:
> > +++ Denis Laxalde [Mar 17 12 17:56 ]:
> >> John MacFarlane wrote:
> >> > Pandoc does bypass most of the citeproc processing if you specify
> >> > --biblatex and --natbib. But it still does read the bibliography,
> >> > since it needs a list of reference IDs to distinguish references
> >> > from other words beginning with @, including example list references.
> >> 
> >> Ah! I missed that and thought that the @ was reserved for citations.
> >> Thanks.
> >
> > In a way, the double use of @ is bad design, but the use in example
> > lists was already established when we added citations, and I thought
> > it would not be good to change it and break existing documents.
> 
> By the way, I've been playing with these numbered example lists and it
> seems that the markers have to be within parentheses for the list to be
> correctly generated. Is it a bug or the expected behavior (in which
> case, I think it should be stated more clearly in the documentation)?

That's not quite correct. The rules are the same as for regular lists.
So, you can do:

@. one
@. two

or

(@) one
(@) two

or

@) one
@) two

and with labels,

@foo. one
@bar. two

or

(@foo) one
(@bar) two

etc.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: bypass citeproc-hs for TeX output
  2012-03-19 17:40               ` John MacFarlane
@ 2012-03-19 18:36                 ` Denis Laxalde
       [not found]                   ` <slrnjmev5p.ma7.dlaxalde-T85V+x1JxGoLYo7F1cQaMqzhbVMjY+CzVGlYjEr6lBI@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Denis Laxalde @ 2012-03-19 18:36 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

John MacFarlane wrote:
>> By the way, I've been playing with these numbered example lists and it
>> seems that the markers have to be within parentheses for the list to be
>> correctly generated. Is it a bug or the expected behavior (in which
>> case, I think it should be stated more clearly in the documentation)?
>
> That's not quite correct. The rules are the same as for regular lists.
> So, you can do:
>
> @. one
> @. two
>
> or
>
> (@) one
> (@) two
>
> or
>
> @) one
> @) two
>
> and with labels,
>
> @foo. one
> @bar. two
>
> or
>
> (@foo) one
> (@bar) two
>
> etc.

Ok, I see. The marker has to be followed by either a dot or a closing
parenthesis, right? (I was trying with @foo or [@foo] which do not
work.)

-- 
Denis


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: bypass citeproc-hs for TeX output
       [not found]                   ` <slrnjmev5p.ma7.dlaxalde-T85V+x1JxGoLYo7F1cQaMqzhbVMjY+CzVGlYjEr6lBI@public.gmane.org>
@ 2012-03-20  2:23                     ` John MacFarlane
  0 siblings, 0 replies; 8+ messages in thread
From: John MacFarlane @ 2012-03-20  2:23 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

+++ Denis Laxalde [Mar 19 12 18:36 ]:
> John MacFarlane wrote:
> >> By the way, I've been playing with these numbered example lists and it
> >> seems that the markers have to be within parentheses for the list to be
> >> correctly generated. Is it a bug or the expected behavior (in which
> >> case, I think it should be stated more clearly in the documentation)?
> >
> > That's not quite correct. The rules are the same as for regular lists.
> > So, you can do:
> >
> > @. one
> > @. two
> >
> > or
> >
> > (@) one
> > (@) two
> >
> > or
> >
> > @) one
> > @) two
> >
> > and with labels,
> >
> > @foo. one
> > @bar. two
> >
> > or
> >
> > (@foo) one
> > (@bar) two
> >
> > etc.
> 
> Ok, I see. The marker has to be followed by either a dot or a closing
> parenthesis, right? (I was trying with @foo or [@foo] which do not
> work.)

Correct:  There are three possible formats:

@.
(@)
@)



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-03-20  2:23 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-16 17:01 bypass citeproc-hs for TeX output Denis Laxalde
     [not found] ` <slrnjm6sfb.f8l.dlaxalde-T85V+x1JxGoLYo7F1cQaMqzhbVMjY+CzVGlYjEr6lBI@public.gmane.org>
2012-03-16 22:59   ` John MacFarlane
2012-03-17 17:56     ` Denis Laxalde
     [not found]       ` <slrnjm9k29.jc3.dlaxalde-T85V+x1JxGoLYo7F1cQaMqzhbVMjY+CzVGlYjEr6lBI@public.gmane.org>
2012-03-17 18:14         ` John MacFarlane
2012-03-19 17:32           ` Denis Laxalde
     [not found]             ` <slrnjmerdr.qrp.dlaxalde-aEClnr43cpNHtwG6+KyEKfXnZcPZzHxnLAPz8V8PbKw@public.gmane.org>
2012-03-19 17:40               ` John MacFarlane
2012-03-19 18:36                 ` Denis Laxalde
     [not found]                   ` <slrnjmev5p.ma7.dlaxalde-T85V+x1JxGoLYo7F1cQaMqzhbVMjY+CzVGlYjEr6lBI@public.gmane.org>
2012-03-20  2:23                     ` John MacFarlane

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).