public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Pandoc 2.11 and CSLReferences environment in LaTeX
@ 2020-10-13 12:37 Václav Haisman
       [not found] ` <f8c7c585-0137-d3b9-6ac3-dd0b11d336ad-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Václav Haisman @ 2020-10-13 12:37 UTC (permalink / raw)
  To: pandoc-discuss


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

My custom latex template has broken with Pandoc 2.11. I have modified it
to include the CSLReferences LaTeX environment. But now I see some
issues with when the environment is used in the generate LaTeX document.

Pandoc generates this:

\hypertarget{refs}{}
\begin{CSLReferences}{0}{1}
\leavevmode\hypertarget{ref-socialwatch2016}{}%


LuaLaTeX prints this:

! Missing number, treated as zero.
<to be read again>
\unhbox
l.275 \leavevmode
               \hypertarget{ref-socialwatch2016}{}%


Now, looking at the CSLReferences environment, I see it asks for 3
parameters:

\newenvironment{CSLReferences}[3] % #1 hanging-ident, #2 entry sp
 {% don't indent paragraphs
  \setlength{\parindent}{0pt}
  % turn on hanging indent if param 1 is 1
  \ifodd #1
\everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces\fi
  % set line spacing
  % set entry spacing
  \ifnum #2 > 0
  \setlength{\parskip}{#3\baselineskip}
  \fi
 }%
 {}

But it documents only two of them. Is it possible that the issue is
here? That Pandoc generates arguments only for first two parameters of
the CSLReferences environment?


-- 
VH

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

* Re: Pandoc 2.11 and CSLReferences environment in LaTeX
       [not found] ` <f8c7c585-0137-d3b9-6ac3-dd0b11d336ad-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2020-10-13 17:08   ` John MacFarlane
       [not found]     ` <m24kmycau2.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: John MacFarlane @ 2020-10-13 17:08 UTC (permalink / raw)
  To: Václav Haisman, pandoc-discuss


The 3 parameters part is a hangover from some earlier version.
I used to include line-spacing (as well as entry spacing).
This is part of CSL styling, but I decided not to include it,
because I think in practice it's going to be better to
control these things at the document level.

The macro definition was broken, too, since it used the unset
parameter #3!

Thanks for noticing. I will fix.


Václav Haisman <vhaisman-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> My custom latex template has broken with Pandoc 2.11. I have modified it
> to include the CSLReferences LaTeX environment. But now I see some
> issues with when the environment is used in the generate LaTeX document.
>
> Pandoc generates this:
>
> \hypertarget{refs}{}
> \begin{CSLReferences}{0}{1}
> \leavevmode\hypertarget{ref-socialwatch2016}{}%
>
>
> LuaLaTeX prints this:
>
> ! Missing number, treated as zero.
> <to be read again>
> \unhbox
> l.275 \leavevmode
>                \hypertarget{ref-socialwatch2016}{}%
>
>
> Now, looking at the CSLReferences environment, I see it asks for 3
> parameters:
>
> \newenvironment{CSLReferences}[3] % #1 hanging-ident, #2 entry sp
>  {% don't indent paragraphs
>   \setlength{\parindent}{0pt}
>   % turn on hanging indent if param 1 is 1
>   \ifodd #1
> \everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces\fi
>   % set line spacing
>   % set entry spacing
>   \ifnum #2 > 0
>   \setlength{\parskip}{#3\baselineskip}
>   \fi
>  }%
>  {}
>
> But it documents only two of them. Is it possible that the issue is
> here? That Pandoc generates arguments only for first two parameters of
> the CSLReferences environment?
>
>
> -- 
> VH
>
> -- 
> 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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/f8c7c585-0137-d3b9-6ac3-dd0b11d336ad%40gmail.com.

-- 
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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/m24kmycau2.fsf%40MacBook-Pro.hsd1.ca.comcast.net.


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

* Re: Pandoc 2.11 and CSLReferences environment in LaTeX
       [not found]     ` <m24kmycau2.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
@ 2020-10-13 17:19       ` Václav Haisman
  0 siblings, 0 replies; 3+ messages in thread
From: Václav Haisman @ 2020-10-13 17:19 UTC (permalink / raw)
  To: John MacFarlane, pandoc-discuss


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

I have filled this as https://github.com/jgm/pandoc/issues/6745.

On 13. 10. 20 19:08, John MacFarlane wrote:
> The 3 parameters part is a hangover from some earlier version.
> I used to include line-spacing (as well as entry spacing).
> This is part of CSL styling, but I decided not to include it,
> because I think in practice it's going to be better to
> control these things at the document level.
>
> The macro definition was broken, too, since it used the unset
> parameter #3!
>
> Thanks for noticing. I will fix.
>
>
> Václav Haisman <vhaisman-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>
>> My custom latex template has broken with Pandoc 2.11. I have modified it
>> to include the CSLReferences LaTeX environment. But now I see some
>> issues with when the environment is used in the generate LaTeX document.
>>
>> Pandoc generates this:
>>
>> \hypertarget{refs}{}
>> \begin{CSLReferences}{0}{1}
>> \leavevmode\hypertarget{ref-socialwatch2016}{}%
>>
>>
>> LuaLaTeX prints this:
>>
>> ! Missing number, treated as zero.
>> <to be read again>
>> \unhbox
>> l.275 \leavevmode
>>                \hypertarget{ref-socialwatch2016}{}%
>>
>>
>> Now, looking at the CSLReferences environment, I see it asks for 3
>> parameters:
>>
>> \newenvironment{CSLReferences}[3] % #1 hanging-ident, #2 entry sp
>>  {% don't indent paragraphs
>>   \setlength{\parindent}{0pt}
>>   % turn on hanging indent if param 1 is 1
>>   \ifodd #1
>> \everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces\fi
>>   % set line spacing
>>   % set entry spacing
>>   \ifnum #2 > 0
>>   \setlength{\parskip}{#3\baselineskip}
>>   \fi
>>  }%
>>  {}
>>
>> But it documents only two of them. Is it possible that the issue is
>> here? That Pandoc generates arguments only for first two parameters of
>> the CSLReferences environment?
>>
>>
>> -- 
>> VH
>>
>> -- 
>> 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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/f8c7c585-0137-d3b9-6ac3-dd0b11d336ad%40gmail.com.


-- 
VH


-- 
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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/b262a0e4-9d89-bd35-f2a7-809d4e3cfc76%40gmail.com.

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

end of thread, other threads:[~2020-10-13 17:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-13 12:37 Pandoc 2.11 and CSLReferences environment in LaTeX Václav Haisman
     [not found] ` <f8c7c585-0137-d3b9-6ac3-dd0b11d336ad-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-10-13 17:08   ` John MacFarlane
     [not found]     ` <m24kmycau2.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
2020-10-13 17:19       ` Václav Haisman

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