From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32285 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 12:07:19 +0100 Message-ID: References: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000fe4a2405f64d6a7c" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12078"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDJ77HUDRUCBB5FVTSQAMGQEMTV5MCI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue Mar 07 12:07:36 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-il1-f188.google.com ([209.85.166.188]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pZVAO-0002xR-34 for gtp-pandoc-discuss@m.gmane-mx.org; Tue, 07 Mar 2023 12:07:36 +0100 Original-Received: by mail-il1-f188.google.com with SMTP id i7-20020a056e021b0700b0031dc4cdc47csf4432556ilv.23 for ; Tue, 07 Mar 2023 03:07:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1678187255; cv=pass; d=google.com; s=arc-20160816; b=ySHeGZXU9N2sJsdhU5n5F3pPpg0g6ad0v9iTF3Y2UGUVJTD2SQ1PnR7lAKyRPSsdwe B2mzgvbwg9ZZw7Nv2mYnA/v4IykkjicfKei9TjHcd+g8uGWIDPftK7Qe3/x9kbON2m0K g5/aA9HMqnqSZzEsIan5v1xx8Kr0z4nrsmXqpkJWq0kZgH3eFk2yQA76Yz469RlJfs03 WBZ8xqp+ebNks6oj89GorVOsUfrR++1ZsogMttcMRkBu73rCn9ynZUFEkRZtAjsZJaW+ YQwgI0mfVvcjv8M81ahRz92bX0uZVXTf++BUpVNGHjmWiZiQTRwkmqgkwxUN9xemUzHN oNhw== 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=lKJLiHgoOVRkO8s/NBEEwDem0q46XVnFc0mt+Akdl84=; b=nhgYNoEgP0PDzpC4ZR3U6vdbMlGD+x9xVyk4q/x+l5TongylguYs6ihbOe97n3cPwb 6CIclbU04hJ4Bg8dlz6UugjGsOAFerhwOv/JxR4fcjvBJB4YkBSlCjZ5tod8FwQg6ggC /j68HMWRYgM/o5uKn4aOQ6uMbW77BUpdJk0j9TP+Nie1t4u6AXSuQpsFFw7aChx5hQem XgswN1tpR9LxiJq/gxpeZErwYCKRb3klULnXYPWNt3JpGIAI0HRwwxfcWk4v1HQIcZd6 Aozrp4DrWVV8yxsGY0xY/ujTPCgWZOPRed2XPSKvatk9OtXQH+HymlHupGCzuE8MK0EP DwOA== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="BFv7cpq/"; spf=pass (google.com: domain of amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::42e 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=1678187255; 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=lKJLiHgoOVRkO8s/NBEEwDem0q46XVnFc0mt+Akdl84=; b=kMxktYJx4d+UNrRoqGWfyEcHSVGadoUY9vwlLT/W3cnPndQ+qly44xCyAIy1k4mlr4 NWyK8I6EkryOrLP2VsokhUlmzTHFU/ttq2HX0VJaSMDjqu0T0erVWFUIx4H7aAdRcvt3 LRVNIxqw/5hOI6SpDHl99hb/gwzMm7ElzeSYy6JTQ2+Av/kuEVSacHqhZpnLXYrLo32L ek8w1eaEoe/2edf+yL0xfhfwtGkKwAkx8V1kybNMBtIo1uhTtHkv/ewYKQ9e83BLvhQS PBpY1AM5UznpQK+c6gU1AMv/iZ9y3JdGfghaZOWynhzwiplH71K9Uvms1y88C3Bj+y4o f0uA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678187255; 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=lKJLiHgoOVRkO8s/NBEEwDem0q46XVnFc0mt+Akdl84=; b=cfN4eIAH7+trSbKHtH/ZvtprEb4NBfYNy5T46BbqNGjO4TEqRorjo4jUGpWKzsIFv3 zKkZ0VwqcMCX8SchDz98Yp3DSaP7nh8+2r5xSvhR+4IrVH6V26+1HKlnUdCF2LLP7Mmc ifDb+YmIO6lOoZo3xWieGt4lQ21GfEDvim4dmwFmMkMGFfDHPC01EXEcDdMo3CFLaXnA iJoTFt3qZqGNsCsIcT0O8BHa1jKHLCvlEhvfG/zpBCqX10o26o/yWEwN1mP1zc53Vei4 Dil064AK4uNbbx5NQJxV4+j54HJ44pqJOrbmAL4kAFd+5fgXIESbbZ7jvD94K0KCGtC0 ySDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678187255; 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=lKJLiHgoOVRkO8s/NBEEwDem0q46XVnFc0mt+Akdl84=; b=Pw1ebmfOo5RBdPwluj9X+RB6GGvw2vt3/nUJXW8sLCgm859k8eein0WlGazI58FGcf CoTYj3Vspz0Sm3frhyQNmT7Qz2D82BUN5a+VMkXPakChGKVdtB/uVdm/FwKaWnItNoF7 Y4DZfzlO+SFvN0/yaNlAAmne6TlOOvEF9O0lUrPkmVi3a8nOM3UTS+y5itTnB7eZua5W eC+oyviPMpm9KNrb8hIF9dMQ8GwMAa2WJVl2cF5wlsPF1ryNt3ELOBMKEM6q9gpN6+CO XbbbP8WgepCVXia2LcYXh8+quCxgfiwC Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AO0yUKWqbzwwzhEoDOK5LrL9GY22HNWKe5oc9lohxHJOekwPeGBx8ryj P+sYHHL/RlU9fVNradecXrg= X-Google-Smtp-Source: AK7set9dUPJY+7jaI5ctUqi4rcfYKpwHSz8vtlZNJ1OI66UywkyK/DuQNi/BeMZ42Rgkc5mLS/7bYA== X-Received: by 2002:a5e:c903:0:b0:745:5dec:be5a with SMTP id z3-20020a5ec903000000b007455decbe5amr6691842iol.1.1678187254865; Tue, 07 Mar 2023 03:07:34 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a92:d302:0:b0:317:96aa:2fb8 with SMTP id x2-20020a92d302000000b0031796aa2fb8ls3729310ila.11.-pod-prod-gmail; Tue, 07 Mar 2023 03:07:32 -0800 (PST) X-Received: by 2002:a05:6e02:20c7:b0:310:c746:d35d with SMTP id 7-20020a056e0220c700b00310c746d35dmr13984931ilq.25.1678187252276; Tue, 07 Mar 2023 03:07:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678187252; cv=none; d=google.com; s=arc-20160816; b=T8CxgpPvljrtILPwxh49FbtAKrB1kXzMWtYZX5U57u7+N1spjqKDqydYCY1g4/7pEY o0l0YThXCUYAiHif7LwY7xJUbjtw97Q71ABVjIVWbLVqGtHXrJikQ8Of6EEN6XOfyASV 7l9naSVk2/YZuZGBu3nCSHA/2+6Hy6mLxWJt7SipLCu10F/IA5lFRB1WuizM5oEJvGbB 2coEcaP646R6eKeFdtihZg1Y2pJevaXETdHo9cbQxN0AEUYkaVPP8uYpvFNMiwIP8/qI REB/Z63lsYZq+psxvQDtjdtH8qnIgMq8r65Igb2MdXI1y5fJNXydr5sey/2zDQFnfwWs B1/g== 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=MywoxEDr5478KqpA8mkfF3TugCxIpSgSL6pof0Svz/s=; b=xIXtP8bcyAgA2boK6Mi7JUjgPux/143S8EZpiVjPpu1C9kCsdWCMS7lDocm53HG7MM mzmyT+QFlE7nLE8AawCO6agn/EajCSaizA837UNVIXpzQYqW+nkBd/psnvGu5Fmq6zJK H9sftZeVGbxI6kPwdMufQqOAZZEfvvF0iCnmoCIuu8WAtwflOdhboXCfpoHDkkX9MG0J s/5OVcUsEDTv0w3OvPYFQUjvoCmnlkD/Ssi5h+8RheCUvbJF3oAUtpvDKk6oC5LhXZbz SVA5Uj9ec+W4CW+UYh/dF3DiwNbfFUPIX0CDFHJg6HnjQsQ7fgXjcDcfFJ2GaA8IyoT/ RSCA== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="BFv7cpq/"; spf=pass (google.com: domain of amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::42e 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-pf1-x42e.google.com (mail-pf1-x42e.google.com. [2607:f8b0:4864:20::42e]) by gmr-mx.google.com with ESMTPS id i7-20020a056638400700b003e54cad3425si1336416jai.1.2023.03.07.03.07.32 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 07 Mar 2023 03:07:32 -0800 (PST) Received-SPF: pass (google.com: domain of amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::42e as permitted sender) client-ip=2607:f8b0:4864:20::42e; Original-Received: by mail-pf1-x42e.google.com with SMTP id fa28so7726826pfb.12 for ; Tue, 07 Mar 2023 03:07:32 -0800 (PST) X-Received: by 2002:a62:834a:0:b0:596:78f:1532 with SMTP id h71-20020a62834a000000b00596078f1532mr5809605pfe.2.1678187251516; Tue, 07 Mar 2023 03:07:31 -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="BFv7cpq/"; spf=pass (google.com: domain of amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::42e 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:32285 Archived-At: --000000000000fe4a2405f64d6a7c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable That would force me to put my header content within my markdown file and 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, 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 defau= lt > LaTeX template. > The answer for your use case is here: > https://github.com/lierdakil/pandoc-crossref/issues/47#issuecomment-61440= 4532 > > 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 ow= n > 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 ge= t > 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 pointe= rs > welcome. > > Thanks > > > > -- > > 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 [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/CAMwawgPTeNSdJ7FDbc9tmw8= ax06K7n_uGxvB-mCn2fvBzdD%3DUg%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/ZAcA4dThsf/pAK2e%40local= host > . > --=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/CAMwawgNJcw9d-aMSPFStx%2BwU__GrsDVhhNrARCLf4CdHNiGCWA%40mail= .gmail.com. --000000000000fe4a2405f64d6a7c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
That would force me to put my header content within my ma= rkdown file and remove "header.tex" completely. I would very much= prefer to keep them as separate files.=C2=A0

The header.tex for my use case ia much more involved. Inclu= ding it inside the markdowm YAML block like that would be quite ugly IMO.





On Tue, 7 Mar 2023, 10:16 Bastien = DUMONT, <bastien.dumont@pos= teo.net> wrote:
Since you do= n't use a custom template, you don't have to add $for(header-includ= es)$ 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/issu= es/47#issuecomment-614404532

Le Tuesday 07 March 2023 =C3=A0 10:02:38AM, A A a =C3=A9crit :
> Files
>
> test.py
>
> def f(x):
>=C2=A0 =C2=A0 =C2=A0return x
>
> test.md
>
> ~~~{
>=C2=A0 =C2=A0#lst:test
>=C2=A0 =C2=A0.py
>=C2=A0 =C2=A0include=3D"test.py"
>=C2=A0 =C2=A0caption=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 o= wn header
> include which gets overwritten by my -H header.tex. This [1]link provi= des more
> information.
>
> I tried the solution proposed by @lierdakil in the link provided but g= et an
> error:
>
>=C2=A0 =C2=A0 =C2=A0! LaTeX Error: Missing \begin{document}.
>
>=C2=A0 =C2=A0 =C2=A0See the LaTeX manual or LaTeX Companion for explana= tion.
>=C2=A0 =C2=A0 =C2=A0Type H for immediate help.
>
>=C2=A0 =C2=A0 =C2=A0l.97 $
>=C2=A0 =C2=A0 =C2=A0for(header-includes)$
>=C2=A0 =C2=A0 =C2=A0?
>
> So I=E2=80=99m at a bit of a loss regarding what to do here, Any point= ers welcome.
> Thanks
>
> --
> 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 [2]pandoc-discuss+unsubscribe@googlegrou= ps.com.
> 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/lierdak= il/pandoc-crossref/issues/47
> [2] mailto:pandoc-discuss+unsubscribe@googl= egroups.com
> [3] https://groups.google.com/d/msgid/pandoc-discuss/CAMwawgPTeNSdJ7FDbc= 9tmw8ax06K7n_uGxvB-mCn2fvBzdD%3DUg%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@googlegroups.= com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discu= ss/ZAcA4dThsf/pAK2e%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/CAMwawgNJcw9d-aMSPFStx%2BwU__GrsDVhhNrA= RCLf4CdHNiGCWA%40mail.gmail.com.
--000000000000fe4a2405f64d6a7c--