From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32287 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: A A Newsgroups: gmane.text.pandoc Subject: Re: pandoc-crossref not playing nice with header includes Date: Tue, 7 Mar 2023 14:06:17 +0100 Message-ID: References: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000066a69605f64f1483" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24827"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDJ77HUDRUCBBVPNTSQAMGQEL26U3DA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue Mar 07 14:06:36 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-ot1-f60.google.com ([209.85.210.60]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pZX1U-0006Aa-OA for gtp-pandoc-discuss@m.gmane-mx.org; Tue, 07 Mar 2023 14:06:32 +0100 Original-Received: by mail-ot1-f60.google.com with SMTP id e89-20020a9d01e2000000b0069420c0c6a8sf5648097ote.12 for ; Tue, 07 Mar 2023 05:06:32 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1678194391; cv=pass; d=google.com; s=arc-20160816; b=b+/r7ZGqbH/xodHUVz8/fLgNsPrSG/mO0DhCPrGXyu7iN9k9wzhU6mwb/+LP2rhZAs IDQmX7aivlhj0OEJRlYF4iYAtD1qUn6YELLw5pFkZM3xlYGos12rcY9zniV9CZudVa2t krJQpLLE5bXMIo3cqOWJnnl/UIo8OkYPukWHu0mdcSg7svlP+gjdtLO2td8zLSEHUqak edknOGdWb5yLFz8iFZE3oEg7b7WZ+kcZDTWWEvo9nGZe0mJxnBO242lEWLPMq59N1tEg qHKdr5eSahOdBQdd5C3e0/W/rEZFVle+akhbKwWhxZCsL7RvIuZ+50IIpAP4xmrgPhOf xWvw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:to:subject:message-id:date :from:in-reply-to:references:mime-version:sender:dkim-signature :dkim-signature; bh=g2uI5LabSiyMZSidB4W7b0hilyWWnJact95QH95uj0Y=; b=D4lazpkAsYu8/Qd3ws5sBGBGXuYppSTHwgoetraickjpUnDxzQvjKBO8tMXsESFaq2 XS0zzAquEGIwO8qUcU+5jL961RWt6unX4zx1v8dSwJ/tT9TzynGCi9dS2hvmyvsc+VNN T44QTrtNCBmXxsEsxmcrWUzGPZa9iEO7rwd95TgqzQJwI0FOJ2n0KZ8hOue5/Ax7EVDt 9M/C3a9HiLHveeH8lV5KBXF92HywpQsl0M/110S/GxLgZDM77qWhPLP/qIibGOkeByKR OEV/APkHVfOzagXF9AINn0TxczmivBaGunX3i+WbLUNoi4aTYRFl0cjCzw/eWwTWB8OO D6sQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=RHcCix8x; spf=pass (google.com: domain of amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::632 as permitted sender) smtp.mailfrom=amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; t=1678194391; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:to:subject :message-id:date:from:in-reply-to:references:mime-version:sender :from:to:cc:subject:date:message-id:reply-to; bh=g2uI5LabSiyMZSidB4W7b0hilyWWnJact95QH95uj0Y=; b=UYeKTkBkPxtd5j5BrYXovUl4R0IuLL0eGig122seU+2Ne34bhhguF0zlr/xdEKHGm0 H+ITpd2K0i789wrPohzWLd6qGyzRFt3pzyQZlIzquKFgRsNduddOJwPjVYPLMf4Yz7MU RfRtUboNOW/g9MKxzfClraN8MBr3X4aJ5ylwQPrXxxwP7tjj0bjHfuDlHMusyyXXEO/D rPGpXA7Wpr48hLHkaXCNWqqBkgRs2AC01K01yi8VjRtenhH+f/wpk5bAAGzZuLZfhx7J 8kz0SDBSXtOJj34Bq09duOMYxk6d30B2rjuVwRjcP9lyAcIesc9nNBWkxg36V2qF2QMU zaqg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678194391; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:to:subject :message-id:date:from:in-reply-to:references:mime-version:from:to:cc :subject:date:message-id:reply-to; bh=g2uI5LabSiyMZSidB4W7b0hilyWWnJact95QH95uj0Y=; b=Y62830x3zMZQekCd8gOnjutNI7NaQw0sQQ/Ea4/+b2HTspcNS7vUvAVexFozK7BvuE tu6nzQcYd1pd5NZzvegCjyaKCjx/iTqJjHggoTO1fokc8y/UZ0W1tv/v/O8wzJ0JSaqv LepBNTwQzdn7eky81KxZJ/1AC0o9D1BX/TxatU3uLMHzRoK5rVQQoN6FH/lExkY/LDnN 8rbQ/+inPW+Ha8NryWiFnWNCX+Nb4XfbzqptoWK3C7A0b01t3u/JZGjdnKoB7SrSR+37 weic897+6s3O/o1NkOXdFBJdY+2+E52FQyOL32QbsDus711eYvhrIppJyo57FppNyNKr oWEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678194391; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:to:subject :message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:sender:from:to:cc:subject:date:message-id :reply-to; bh=g2uI5LabSiyMZSidB4W7b0hilyWWnJact95QH95uj0Y=; b=CToxuEl+BmfAHF+F0x/rsBckTSvsnPAKIBu9b6yuhqioLEe+ALIz+tcbN9pr/GaK+O 6ZR8Kta+rjN2Gyp7H9W0RLMNQIcxFXe/RfkZxv8/PEdUUoGz1fXAgblixGaMV3IEUSxE jHwITMVsoHOgYR7eAcv7f5dnG3haR/eKVCfxA+2nxaXjFkre0JGsAs20rQjsqu4t9+/C sNk98zaJHn6tgf7p39j8i7W0srBeEk4Y9Pj1JUhSvhQBIdayaF4WWRrjBf4K1YmdZjFL 1M58Ny3y69LWddJSrkgdN7zb/PQpAddS Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AO0yUKVgz3VotpdTn3hElO2dnlGXI7Ln/5bY61wQOp01UjmdRjwxYXIX vQAWtbi21TtJQ0iUSLJlbGo= X-Google-Smtp-Source: AK7set/J371JTTyND6yKy6Pix6jopeRjbr2vgcZix/JPDjZ3LMVqPR8l1HGfjgfWwqZVW3vTveZjFQ== X-Received: by 2002:a4a:c013:0:b0:525:1c3a:f785 with SMTP id v19-20020a4ac013000000b005251c3af785mr4531336oop.0.1678194391453; Tue, 07 Mar 2023 05:06:31 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6830:1e9c:b0:661:b84b:eb5e with SMTP id n28-20020a0568301e9c00b00661b84beb5els2689866otr.3.-pod-prod-gmail; Tue, 07 Mar 2023 05:06:29 -0800 (PST) X-Received: by 2002:a9d:7209:0:b0:690:efa2:7835 with SMTP id u9-20020a9d7209000000b00690efa27835mr6035546otj.11.1678194389189; Tue, 07 Mar 2023 05:06:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678194389; cv=none; d=google.com; s=arc-20160816; b=CS2/TUfqifs6kJOSnNarh3or9tBBzrbvZf5LV9BrQxCNrE1m05xVPybT7BIM4rlxCV NyqkLE+AbTTim5II7BnXgiPZI32a4nBmBccTdA7b2WEUDUF8+jh/06fbylaZdE905+PK nPnrf99mrcwIqS3SUJmrx50/6a3TN7UOPNBlxiBRNugSl9cdvS7tNoAbDLs31Oq1pzk9 K+pUp5ot+ezKw3m4kb/V4pwgGguxhszrhMVNq/rbicavIg2inPP9NEAi2ece/JNdfIOU 0ZZF3VnH0Y1albXKJMlSxIW2laQt9i4k05dVMygjUm7huxCVYXJ4H3B5+mLR1/a77QIH /mMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=eSrixPQylHv/xKCN7wPrGNr5dKM7DpsiYatS0hKQCOU=; b=XHpW3YvLnMXJDDuHWE9cNtWzfl+JrLEpIZTR2gTKYS3j304fKSmr03hqKmoyA8TaQn iCAwc83hAILSW9b0ADmOY1/TvNsoOapPIbtU0gg2wzaOsHW8JKzLE5NQXMO95cf44zj1 +q8uMEe/LCj5OpsyT2pLpiFjlAxIOsPkpkAm4vpkwqLu6A6CtgaAo3RAMvtYFElPIdco 3hIj8KhNmTn0wKl6ts6xO1hUZGVGuAwHyQDsqqE9lofe5wfmQ9jFPNkDy75+O9ndricp G6Y99XJTwplC+HN0usThUyOGsVQ9vFI0xcOFjtdGomBcl65qmmEvcAeEjN/Zykhbkzaa RiNQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=RHcCix8x; spf=pass (google.com: domain of amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::632 as permitted sender) smtp.mailfrom=amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Original-Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com. [2607:f8b0:4864:20::632]) by gmr-mx.google.com with ESMTPS id c20-20020a9d6c94000000b00693daa9098dsi825711otr.1.2023.03.07.05.06.29 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 07 Mar 2023 05:06:29 -0800 (PST) Received-SPF: pass (google.com: domain of amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::632 as permitted sender) client-ip=2607:f8b0:4864:20::632; Original-Received: by mail-pl1-x632.google.com with SMTP id u5so13935945plq.7 for ; Tue, 07 Mar 2023 05:06:29 -0800 (PST) X-Received: by 2002:a17:90a:4043:b0:230:b3dd:9c16 with SMTP id k3-20020a17090a404300b00230b3dd9c16mr7496521pjg.3.1678194388671; Tue, 07 Mar 2023 05:06:28 -0800 (PST) In-Reply-To: X-Original-Sender: amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=RHcCix8x; spf=pass (google.com: domain of amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::632 as permitted sender) smtp.mailfrom=amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:32287 Archived-At: --00000000000066a69605f64f1483 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable You can include it in an external metadata file referred to via the =E2=80=94metadata-file option I believe that would still be a YAML file with weird syntax like this? header-includes: - | ~~~{=3Dlatex} \let\oldsection\section \renewcommand{\section}[1]{\clearpage\oldsection{#1}} ~~~ If so then yes, I definitely prefer doing my own header.tex. But this would have to include all the content necessary for pandoc-crossref to work properly. Any ideas where I could find this content? I briefly skimmed the pandoc-crossref repo but didn=E2=80=99t find anything obvious=E2=80=A6 On Tue, 7 Mar 2023 at 12:16, Bastien DUMONT wrote: > You can include it in an external metadata file referred to via the > --metadata-file option. However, if you customize the LaTeX preamble > heavily, it may be preferable to use a custom template including the > content of header.tex. > > Le Tuesday 07 March 2023 =C3=A0 12:07:19PM, A A a =C3=A9crit : > > That would force me to put my header content within my markdown file an= d > remove > > "header.tex" completely. I would very much prefer to keep them as > separate > > files. > > > > The header.tex for my use case ia much more involved. Including it > inside the > > markdowm YAML block like that would be quite ugly IMO. > > > > > > > > > > > > On Tue, 7 Mar 2023, 10:16 Bastien DUMONT, <[1]bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org= > > wrote: > > > > 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: [2] > https://github.com/lierdakil/ > > pandoc-crossref/issues/47#issuecomment-614404532 > > > > Le Tuesday 07 March 2023 =C3=A0 10:02:38AM, A A a =C3=A9crit : > > > Files > > > > > > test.py > > > > > > def f(x): > > > return x > > > > > > test.md > > > > > > ~~~{ > > > #lst:test > > > .py > > > include=3D"test.py" > > > caption=3D`test.py` > > > } > > > ~~~ > > > > > > header.tex > > > > > > \usepackage{minted} > > > > > > \definecolor{bg}{rgb}{0.85, 0.85. 0.85} > > > \setminted{breaklines=3Dtrue, bgcolor=3Dbg, breakanywhere} > > > > > > Compilation > > > > > > I=E2=80=99m 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=E2=80=99m 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 Googl= e > Groups > > > "pandoc-discuss" group. > > > To unsubscribe from this group and stop receiving emails from it, > send an > > email > > > to [2][3]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > > To view this discussion on the web visit [3][4] > https://groups.google.com/ > > d/msgid/ > > > pandoc-discuss/ > > > CAMwawgPTeNSdJ7FDbc9tmw8ax06K7n_uGxvB-mCn2fvBzdD%3DUg%[5] > 40mail.gmail.com > > . > > > > > > References: > > > > > > [1] [6]https://github.com/lierdakil/pandoc-crossref/issues/47 > > > [2] mailto:[7]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > > > [3] [8]https://groups.google.com/d/msgid/pandoc-discuss/ > > CAMwawgPTeNSdJ7FDbc9tmw8ax06K7n_uGxvB-mCn2fvBzdD%3DUg% > 40mail.gmail.com? > > utm_medium=3Demail&utm_source=3Dfooter > > > > -- > > 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 [9]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To view this discussion on the web visit [10] > https://groups.google.com/d/ > > msgid/pandoc-discuss/ZAcA4dThsf/pAK2e%40localhost. > > > > -- > > You received this message because you are subscribed to the Google Grou= ps > > "pandoc-discuss" group. > > To unsubscribe from this group and stop receiving emails from it, send > an email > > to [11]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To view this discussion on the web visit [12] > https://groups.google.com/d/msgid/ > > pandoc-discuss/ > > CAMwawgNJcw9d-aMSPFStx%2BwU__GrsDVhhNrARCLf4CdHNiGCWA%40mail.gmail.com. > > > > References: > > > > [1] mailto:bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org > > [2] > https://github.com/lierdakil/pandoc-crossref/issues/47#issuecomment-61440= 4532 > > [3] mailto:pandoc-discuss%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > > [4] https://groups.google.com/d/msgid/ > > [5] http://40mail.gmail.com/ > > [6] https://github.com/lierdakil/pandoc-crossref/issues/47 > > [7] mailto:pandoc-discuss%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > > [8] > https://groups.google.com/d/msgid/pandoc-discuss/CAMwawgPTeNSdJ7FDbc9tmw8= ax06K7n_uGxvB-mCn2fvBzdD%3DUg%40mail.gmail.com?utm_medium=3Demail&utm_sourc= e=3Dfooter > > [9] mailto:pandoc-discuss%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > > [10] > https://groups.google.com/d/msgid/pandoc-discuss/ZAcA4dThsf/pAK2e%40local= host > > [11] mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > > [12] > https://groups.google.com/d/msgid/pandoc-discuss/CAMwawgNJcw9d-aMSPFStx%2= BwU__GrsDVhhNrARCLf4CdHNiGCWA%40mail.gmail.com?utm_medium=3Demail&utm_sourc= e=3Dfooter > > -- > 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/ZAcdDn%2Bj/f55E9xQ%40loc= alhost > . > --=20 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 e= mail 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/CAMwawgMDb2ZF9i8T5sxeFqrnf3RRh%2BthSJXyxPsufFqPC4czBQ%40mail= .gmail.com. --00000000000066a69605f64f1483 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

You can include it in an exte= rnal metadata file referred to via the =E2=80=94metadata-file option

I believe that would still be a= YAML file with weird syntax like this?

header-includes:
- |
  ~~~{=3Dlatex}
  \let\oldsection\section
  \renewcommand{\section}[1]{\clearpage\oldsection{#1}}
  ~~~

If so then yes, I = definitely prefer doing my own header.tex. But this would have to include a= ll the content necessary for pandoc-crossref to wor= k properly. Any ideas where I could find this content? I briefly skimmed th= e pandoc-crossref repo but didn=E2=80=99t find anyt= hing obvious=E2=80=A6

<= /div>

On Tue, 7 Mar 2023 at 12:16, Bastien DUMONT <bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org> w= rote:
You can in= clude it in an external metadata file referred to via the --metadata-file o= ption. However, if you customize the LaTeX preamble heavily, it may be pref= erable to use a custom template including the content of header.tex.

Le Tuesday 07 March 2023 =C3=A0 12:07:19PM, A A a =C3=A9crit :
> That would force me to put my header content within my markdown file a= nd remove
> "header.tex" completely. I would very much prefer to keep th= em as separate
> files.=C2=A0
>
> The header.tex for my use case ia much more involved. Including it ins= ide the
> markdowm YAML block like that would be quite ugly IMO.
>
>
>
>
>
> On Tue, 7 Mar 2023, 10:16 Bastien DUMONT, <[1]bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org>= wrote:
>
>=C2=A0 =C2=A0 =C2=A0Since you don't use a custom template, you don&= #39;t have to add $for
>=C2=A0 =C2=A0 =C2=A0(header-includes)$ etc. anywhere: it is already inc= luded in the default
>=C2=A0 =C2=A0 =C2=A0LaTeX template.
>=C2=A0 =C2=A0 =C2=A0The answer for your use case is here: [2]https:= //github.com/lierdakil/
>=C2=A0 =C2=A0 =C2=A0pandoc-crossref/issues/47#issuecomment-614404532 >
>=C2=A0 =C2=A0 =C2=A0Le Tuesday 07 March 2023 =C3=A0 10:02:38AM, A A a = =C3=A9crit :
>=C2=A0 =C2=A0 =C2=A0> Files
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> test.py
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> def f(x):
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0return x
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> test.md
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> ~~~{
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0#lst:test
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0.py
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0include=3D"test.py"
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0caption=3D`test.py`
>=C2=A0 =C2=A0 =C2=A0> }
>=C2=A0 =C2=A0 =C2=A0> ~~~
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> header.tex
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> \usepackage{minted}
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> \definecolor{bg}{rgb}{0.85, 0.85. 0.85}
>=C2=A0 =C2=A0 =C2=A0> \setminted{breaklines=3Dtrue, bgcolor=3Dbg, br= eakanywhere}
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> Compilation
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> I=E2=80=99m compiling with:
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> pandoc -s -F pandoc-crossref -L include-code-f= iles.lua -L minted.lua -H
>=C2=A0 =C2=A0 =C2=A0header.tex --from markdown --to latex test.md -o te= st.tex
>=C2=A0 =C2=A0 =C2=A0> latexmk --shell-escape -pdflatex test.tex
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> I get an error upon compilation, because pando= c-crossref defines its own
>=C2=A0 =C2=A0 =C2=A0header
>=C2=A0 =C2=A0 =C2=A0> include which gets overwritten by my -H header= .tex. This [1]link provides
>=C2=A0 =C2=A0 =C2=A0more
>=C2=A0 =C2=A0 =C2=A0> information.
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> I tried the solution proposed by @lierdakil in= the link provided but get
>=C2=A0 =C2=A0 =C2=A0an
>=C2=A0 =C2=A0 =C2=A0> error:
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0! LaTeX Error: Missing \beg= in{document}.
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0See the LaTeX manual or LaT= eX Companion for explanation.
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0Type H for immediate help.<= br> >=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0l.97 $
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0for(header-includes)$
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0?
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> So I=E2=80=99m at a bit of a loss regarding wh= at to do here, Any pointers
>=C2=A0 =C2=A0 =C2=A0welcome.
>=C2=A0 =C2=A0 =C2=A0> Thanks
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> --
>=C2=A0 =C2=A0 =C2=A0> You received this message because you are subs= cribed to the Google Groups
>=C2=A0 =C2=A0 =C2=A0> "pandoc-discuss" group.
>=C2=A0 =C2=A0 =C2=A0> To unsubscribe from this group and stop receiv= ing emails from it, send an
>=C2=A0 =C2=A0 =C2=A0email
>=C2=A0 =C2=A0 =C2=A0> to [2][3]pandoc-discuss+unsubscribe@go= oglegroups.com.
>=C2=A0 =C2=A0 =C2=A0> To view this discussion on the web visit [3][4= ]https://groups.google.com/
>=C2=A0 =C2=A0 =C2=A0d/msgid/
>=C2=A0 =C2=A0 =C2=A0> pandoc-discuss/
>=C2=A0 =C2=A0 =C2=A0> CAMwawgPTeNSdJ7FDbc9tmw8ax06K7n_uGxvB-mCn2fvBz= dD%3DUg%[5]40mail.gmail.com
>=C2=A0 =C2=A0 =C2=A0.
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> References:
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> [1] [6]https://gi= thub.com/lierdakil/pandoc-crossref/issues/47
>=C2=A0 =C2=A0 =C2=A0> [2] mailto:[7]pandoc-discuss+unsubscri= be-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>=C2=A0 =C2=A0 =C2=A0> [3] [8]https://groups.= google.com/d/msgid/pandoc-discuss/
>=C2=A0 =C2=A0 =C2=A0CAMwawgPTeNSdJ7FDbc9tmw8ax06K7n_uGxvB-mCn2fvBzdD%3D= Ug%40mail.gmail.com?
>=C2=A0 =C2=A0 =C2=A0utm_medium=3Demail&utm_source=3Dfooter
>
>=C2=A0 =C2=A0 =C2=A0--
>=C2=A0 =C2=A0 =C2=A0You received this message because you are subscribe= d to the Google Groups
>=C2=A0 =C2=A0 =C2=A0"pandoc-discuss" group.
>=C2=A0 =C2=A0 =C2=A0To unsubscribe from this group and stop receiving e= mails from it, send an
>=C2=A0 =C2=A0 =C2=A0email to [9]pandoc-discuss+unsubscribe@goog= legroups.com.
>=C2=A0 =C2=A0 =C2=A0To view this discussion on the web visit [10]htt= ps://groups.google.com/d/
>=C2=A0 =C2=A0 =C2=A0msgid/pandoc-discuss/ZAcA4dThsf/pAK2e%40localhost.<= br> >
> --
> You received this message because you are subscribed to the Google Gro= ups
> "pandoc-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send= an email
> to [11]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
> To view this discussion on the web visit [12]https://groups.g= oogle.com/d/msgid/
> pandoc-discuss/
> CAMwawgNJcw9d-aMSPFStx%2BwU__GrsDVhhNrARCLf4CdHNiGCWA%40mail.gmail.com.
>
> References:
>
> [1] mailto:
bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org
> [2] https://github= .com/lierdakil/pandoc-crossref/issues/47#issuecomment-614404532
> [3] mailto:pandoc-discuss%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org=
> [4] https://groups.google.com/d/msgid/
> [5] http://40mail.gmail.com/
> [6] https://github.com/lierdakil/pandoc-c= rossref/issues/47
> [7] mailto:pandoc-discuss%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org=
> [8] http= s://groups.google.com/d/msgid/pandoc-discuss/CAMwawgPTeNSdJ7FDbc9tmw8ax06K7= n_uGxvB-mCn2fvBzdD%3DUg%40mail.gmail.com?utm_medium=3Demail&utm_source= =3Dfooter
> [9] mailto:pandoc-discuss%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org=
> [10] https://group= s.google.com/d/msgid/pandoc-discuss/ZAcA4dThsf/pAK2e%40localhost
> [11] mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > [12] htt= ps://groups.google.com/d/msgid/pandoc-discuss/CAMwawgNJcw9d-aMSPFStx%2BwU__= GrsDVhhNrARCLf4CdHNiGCWA%40mail.gmail.com?utm_medium=3Demail&utm_source= =3Dfooter

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/ZAcdDn= %2Bj/f55E9xQ%40localhost.

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://group= s.google.com/d/msgid/pandoc-discuss/CAMwawgMDb2ZF9i8T5sxeFqrnf3RRh%2BthSJXy= xPsufFqPC4czBQ%40mail.gmail.com.
--00000000000066a69605f64f1483--