public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Broken start/stops in bibliography in ConTeXt writer
@ 2020-11-23 21:31 jzeneto
       [not found] ` <5c8a84f6-6215-408a-b4a2-a1664db7521fn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: jzeneto @ 2020-11-23 21:31 UTC (permalink / raw)
  To: pandoc-discuss


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

Hi! I'm converting Markdown to PDF using ConTeXt with a custom template.

Quick to the question, before explanation: Pandoc creates lines with 
commands that raise errors, specifically in bibliography: *\startreferences* 
(and \stopreferences), and *\startcsl-entry* (and \stopcsl-entry). But they 
are not defined in standard Pandoc template. What's the point with them?

Explanation: Everything was fine until I tried to define a delimited text 
in my template, using for instance:

\startdelimitedtext[mytext] [leftmargin=4cm, rightmargin=0cm, 
spacebefore=0.4cm, indenting=no]

For using that, I wrote a simple Lua filter that takes every Div with class 
"mytext" and puts RawBlocks before and after it, with \startmytext and 
\stopmytext.

But after doing this, ConTeXt keeps raising errors ("Undefined control 
sequence") at those commands I referred to: \startreferences and 
\startcsl-entry. A workaround was defining a dummy block, using 
\definestartstop[references] [ ], which resolves the former; but the hyphen 
on \startcsl-entry is not even recognized by ConTeXt!

I don't know why ConTeXt only raises this when I define a delimited text...

Any help would be welcome.

-- 
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/5c8a84f6-6215-408a-b4a2-a1664db7521fn%40googlegroups.com.

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

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

* Re: Broken start/stops in bibliography in ConTeXt writer
       [not found] ` <5c8a84f6-6215-408a-b4a2-a1664db7521fn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2020-11-23 21:34   ` jzeneto
  2020-11-24  1:59   ` John MacFarlane
  1 sibling, 0 replies; 4+ messages in thread
From: jzeneto @ 2020-11-23 21:34 UTC (permalink / raw)
  To: pandoc-discuss


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

A little remark I forgot to mention: if instead of PDF I generate a ConTeXt 
file, and then edit it removing \startreferences, \stopreferences, 
\startcsl-entry, \stopcsl-entry, everything works normally and perfectly.

Em segunda-feira, 23 de novembro de 2020 às 18:31:02 UTC-3, jzeneto 
escreveu:

> Hi! I'm converting Markdown to PDF using ConTeXt with a custom template.
>
> Quick to the question, before explanation: Pandoc creates lines with 
> commands that raise errors, specifically in bibliography: 
> *\startreferences* (and \stopreferences), and *\startcsl-entry* (and 
> \stopcsl-entry). But they are not defined in standard Pandoc template. 
> What's the point with them?
>
> Explanation: Everything was fine until I tried to define a delimited text 
> in my template, using for instance:
>
> \startdelimitedtext[mytext] [leftmargin=4cm, rightmargin=0cm, 
> spacebefore=0.4cm, indenting=no]
>
> For using that, I wrote a simple Lua filter that takes every Div with 
> class "mytext" and puts RawBlocks before and after it, with \startmytext 
> and \stopmytext.
>
> But after doing this, ConTeXt keeps raising errors ("Undefined control 
> sequence") at those commands I referred to: \startreferences and 
> \startcsl-entry. A workaround was defining a dummy block, using 
> \definestartstop[references] [ ], which resolves the former; but the hyphen 
> on \startcsl-entry is not even recognized by ConTeXt!
>
> I don't know why ConTeXt only raises this when I define a delimited text...
>
> Any help would be welcome.
>

-- 
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/2c84b526-dde0-443a-a09f-7f8afd444a51n%40googlegroups.com.

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

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

* Re: Broken start/stops in bibliography in ConTeXt writer
       [not found] ` <5c8a84f6-6215-408a-b4a2-a1664db7521fn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2020-11-23 21:34   ` jzeneto
@ 2020-11-24  1:59   ` John MacFarlane
       [not found]     ` <m2sg8zbjl2.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
  1 sibling, 1 reply; 4+ messages in thread
From: John MacFarlane @ 2020-11-24  1:59 UTC (permalink / raw)
  To: jzeneto, pandoc-discuss


The default context template contains this:


$if(csl-refs)$
\definemeasure[cslhangindent][1.5em]
\definenarrower[hangingreferences][left=\measure{cslhangindent}]
\definestartstop [cslreferences] [
        $if(csl-hanging-indent)$
        before={%
          \starthangingreferences[left]
      \setupindenting[-\leftskip,yes,first]
      \doindentation
        },
        after=\stophangingreferences,
        $endif$
]
$endif$

Perhaps you're using a custom template?  (Maybe in your
~/.pandoc/templates directory?)


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

* Re: Broken start/stops in bibliography in ConTeXt writer
       [not found]     ` <m2sg8zbjl2.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
@ 2020-11-24  3:38       ` José de Mattos Neto
  0 siblings, 0 replies; 4+ messages in thread
From: José de Mattos Neto @ 2020-11-24  3:38 UTC (permalink / raw)
  To: John MacFarlane; +Cc: pandoc-discuss

[-- Attachment #1: Type: text/plain, Size: 1438 bytes --]

Sorry, I was wrong. Trying to make a minimal example to show the problem, I
realized that my own filter was causing it: by creating a \start...
\stop... for every Div with any class, the filter created the problematic
commands. I'll look for a better way to implement the filter.

Sorry for the noise.

Em seg., 23 de nov. de 2020 às 23:00, John MacFarlane <jgm-TVLZxgkOlNWn+EJxYGL2xA@public.gmane.orgu>
escreveu:

>
> The default context template contains this:
>
>
> $if(csl-refs)$
> \definemeasure[cslhangindent][1.5em]
> \definenarrower[hangingreferences][left=\measure{cslhangindent}]
> \definestartstop [cslreferences] [
>         $if(csl-hanging-indent)$
>         before={%
>           \starthangingreferences[left]
>       \setupindenting[-\leftskip,yes,first]
>       \doindentation
>         },
>         after=\stophangingreferences,
>         $endif$
> ]
> $endif$
>
> Perhaps you're using a custom template?  (Maybe in your
> ~/.pandoc/templates directory?)
>
>

-- 
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/CAF3vEt-v1Tsz4-9X9nyuqtwKgn5tChAJ5BZ-ymhyGMVhm3Bfdw%40mail.gmail.com.

[-- Attachment #2: Type: text/html, Size: 2119 bytes --]

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

end of thread, other threads:[~2020-11-24  3:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-23 21:31 Broken start/stops in bibliography in ConTeXt writer jzeneto
     [not found] ` <5c8a84f6-6215-408a-b4a2-a1664db7521fn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-11-23 21:34   ` jzeneto
2020-11-24  1:59   ` John MacFarlane
     [not found]     ` <m2sg8zbjl2.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
2020-11-24  3:38       ` José de Mattos Neto

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