From: Bastien DUMONT <bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org>
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: pandoc-crossref not playing nice with header includes
Date: Tue, 7 Mar 2023 09:16:17 +0000 [thread overview]
Message-ID: <ZAcA4dThsf/pAK2e@localhost> (raw)
In-Reply-To: <CAMwawgPTeNSdJ7FDbc9tmw8ax06K7n_uGxvB-mCn2fvBzdD=Ug-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
Since you don't use a custom template, you don't have to add $for(header-includes)$ etc. anywhere: it is already included in the default LaTeX template.
The answer for your use case is here: https://github.com/lierdakil/pandoc-crossref/issues/47#issuecomment-614404532
Le Tuesday 07 March 2023 à 10:02:38AM, A A a écrit :
> Files
>
> test.py
>
> def f(x):
> return x
>
> test.md
>
> ~~~{
> #lst:test
> .py
> include="test.py"
> caption=`test.py`
> }
> ~~~
>
> header.tex
>
> \usepackage{minted}
>
> \definecolor{bg}{rgb}{0.85, 0.85. 0.85}
> \setminted{breaklines=true, bgcolor=bg, breakanywhere}
>
> Compilation
>
> I’m compiling with:
>
> pandoc -s -F pandoc-crossref -L include-code-files.lua -L minted.lua -H header.tex --from markdown --to latex test.md -o test.tex
> latexmk --shell-escape -pdflatex test.tex
>
> I get an error upon compilation, because pandoc-crossref defines its own header
> include which gets overwritten by my -H header.tex. This [1]link provides more
> information.
>
> I tried the solution proposed by @lierdakil in the link provided but get an
> error:
>
> ! LaTeX Error: Missing \begin{document}.
>
> See the LaTeX manual or LaTeX Companion for explanation.
> Type H for immediate help.
>
> l.97 $
> for(header-includes)$
> ?
>
> So I’m at a bit of a loss regarding what to do here, Any pointers welcome.
> Thanks
>
> --
> 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 [2]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit [3]https://groups.google.com/d/msgid/
> pandoc-discuss/
> CAMwawgPTeNSdJ7FDbc9tmw8ax06K7n_uGxvB-mCn2fvBzdD%3DUg%40mail.gmail.com.
>
> References:
>
> [1] https://github.com/lierdakil/pandoc-crossref/issues/47
> [2] mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> [3] https://groups.google.com/d/msgid/pandoc-discuss/CAMwawgPTeNSdJ7FDbc9tmw8ax06K7n_uGxvB-mCn2fvBzdD%3DUg%40mail.gmail.com?utm_medium=email&utm_source=footer
--
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/ZAcA4dThsf/pAK2e%40localhost.
next prev parent reply other threads:[~2023-03-07 9:16 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-07 9:02 A A
[not found] ` <CAMwawgPTeNSdJ7FDbc9tmw8ax06K7n_uGxvB-mCn2fvBzdD=Ug-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2023-03-07 9:16 ` Bastien DUMONT [this message]
2023-03-07 11:07 ` A A
[not found] ` <CAMwawgNJcw9d-aMSPFStx+wU__GrsDVhhNrARCLf4CdHNiGCWA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2023-03-07 11:16 ` Bastien DUMONT
2023-03-07 13:06 ` A A
[not found] ` <CAMwawgMDb2ZF9i8T5sxeFqrnf3RRh+thSJXyxPsufFqPC4czBQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2023-03-07 15:16 ` A A
2023-03-07 15:51 ` Bastien DUMONT
2023-03-07 18:28 ` A A
[not found] ` <CAMwawgPQN7Jv34tv+kioNYJO-HJ4nhwMco+7BXQCLOEDHDD39A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2023-03-07 18:42 ` BPJ
2023-03-07 19:18 ` bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg
2023-03-07 19:30 ` A A
[not found] ` <CAMwawgPtfX8+qy4q2nx7+DL-kWhX82QnWh6BQ8CHPyHGZ3uuzw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2023-03-07 19:37 ` Bastien DUMONT
2023-03-07 19:48 ` A A
[not found] ` <CAMwawgPuUvCg1TtGbqz4zsi6-2yJkcAtC27rsx6nNV6id_z6vw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2023-03-07 20:31 ` Bastien DUMONT
2023-03-08 16:16 ` A A
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=ZAcA4dThsf/pAK2e@localhost \
--to=bastien.dumont-vwifzpto/vqstnjn9+bgxg@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).