From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32286 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Bastien DUMONT Newsgroups: gmane.text.pandoc Subject: Re: pandoc-crossref not playing nice with header includes Date: Tue, 7 Mar 2023 11:16:30 +0000 Message-ID: References: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17102"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDCINCES2QJRBEV2TSQAMGQE3TWKPCI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue Mar 07 12:16:38 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-lf1-f58.google.com ([209.85.167.58]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pZVJ8-0004Hx-3u for gtp-pandoc-discuss@m.gmane-mx.org; Tue, 07 Mar 2023 12:16:38 +0100 Original-Received: by mail-lf1-f58.google.com with SMTP id g33-20020a0565123ba100b004dc6259b7acsf3513451lfv.6 for ; Tue, 07 Mar 2023 03:16:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1678187797; cv=pass; d=google.com; s=arc-20160816; b=I1PCX/C1OEyMrPbm+0YTJFDuDQ4hG5tjOou9Gg3HSTDYuUx2O+wpFC5zEBXvKKTKPQ yCqDsWHRXJw5EHuCkyV25Mil6fcnIO6hy84FN4VdlZ3sU5jo1pofqr4QvYz69s9aNLsk SXQ2F9A1/4Pl3CvVqJpb9iauYUC3Sc+2fCm5t+TpFRqHvU81g8HyL82jVyTtqweUWrTN dRoLc31mMkd9tMyRz0esQ0OET673PrsiJ9lG1yoGIUP2IhGDRXVkqTwLdqQjQaauwZRs WzvMblkElY2ZBFWO67XhRMpBHaKgUPcclqJq9HQdFnbU1byxqDIGhYMH79aHVuhbRSUN u6eA== 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:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:to:from:date:sender:dkim-signature; bh=9ie8asoOE5CRv+la+okux627j3xiqdzcvkDTdeZY8Bs=; b=P6fsAJ/T7P5+Ou/OrcajdwENM3L/LgFca6JgV4i6TCo1Ct6LfH6ry38q7nYqzRxGMM WjjotoghFRMgT41noNhf5vF9+Jot1dIkuiBgLUf8bhDVyEvOCwbC52pbKSzVAqjTqH7d gKR2hUSy1jfOYmodYV3muAqdGTDEXWOxRkXuBcqEbmru2RhlVFmJsmFczyVBvlQoZ5ht IpIRX/6jaHjA7lzY+LKQx1FYmZhf9HL0YJDwPIBuF6HbH/v7DvL/mfSWtf05GXTvbNm/ HMc2ObEVvX0pNk+PlqaggXYwJaZDOtM8E2RcnPW655dYoAjx47pmzyDTjzylsXkDC3IT LJxw== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=N5K71LFC; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.66 as permitted sender) smtp.mailfrom=bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; t=1678187797; 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:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:to:from:date:sender:from:to:cc :subject:date:message-id:reply-to; bh=9ie8asoOE5CRv+la+okux627j3xiqdzcvkDTdeZY8Bs=; b=iZmbL842onF70C3qc3mW/tWuHmnUEjokY/Q0q0Lwo3d7r1kD7p9dI0yfmjn1bqcizg GY3eAzfZYvPhyJOJAeDdttgJtYoOz7Bfdl1x5wQbdgyl2M2GQY/xGL6hWDLgNARsLSAY rW6yeBD5bWucnD6mM9jELEsFD99wVu6SWkh4TAAqx00zidq8seqR0PjuCzxGco234WyU EH1EJBQwpXoji4VeufbaPtQfLEdv1EO2nDY9QKYfLKzZ3N2c/7qfPiYmYreLtrf/DgSv fK64farYj+xTSqTFHrpXlLOq/rtVYgg X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678187797; 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:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:to:from:date:x-gm-message-state :sender:from:to:cc:subject:date:message-id:reply-to; bh=9ie8asoOE5CRv+la+okux627j3xiqdzcvkDTdeZY8Bs=; b=AYGN0qklfxiipU61dSixUaRH9v7Dul9EQrUJG76NQRNsfMEB0iqMSgy9jOl4qpYnge ghOrsWRa3Nn9JLnucSCBpEbon6odyRz8Z1soEPVWBH0bkR3+g4+XoEBv9tGzLthvDLAu +fNsYFMGMojvTDEcKzjE5iVLtUsdckCFhXEGYQQhp+ym8++VCAHFVLmeJ5azT6B0eXOB 3G3XG4JlqH1ClOEDLLlx1KDJxJV8OCId4M4wRq/k6rRyejt0Yv/L7k00UbMhNNIH Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AO0yUKUjR7vjSrdiA442bONxzE+BKOtOjnQscqh4XQYPxGsfkf1R9st0 exb4/HBTpnccKVTqogkoVVc= X-Google-Smtp-Source: AK7set/hv+2Lba/vVe5njPBHFz1Sl6bi7nDlk+KM3LLt9e91o/MnTX9y1+eV4Q5bAmCbaXADVayRsw== X-Received: by 2002:ac2:44a3:0:b0:4db:1aa4:fe02 with SMTP id c3-20020ac244a3000000b004db1aa4fe02mr4358061lfm.1.1678187797387; Tue, 07 Mar 2023 03:16:37 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6512:3ba7:b0:4db:5081:6ce7 with SMTP id g39-20020a0565123ba700b004db50816ce7ls144872lfv.1.-pod-prod-gmail; Tue, 07 Mar 2023 03:16:33 -0800 (PST) X-Received: by 2002:ac2:490e:0:b0:4de:e802:b7e3 with SMTP id n14-20020ac2490e000000b004dee802b7e3mr3136962lfi.19.1678187792920; Tue, 07 Mar 2023 03:16:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678187792; cv=none; d=google.com; s=arc-20160816; b=RQ1sGjN0f3CD3sCfoYld/E7WlFGk7fU8yMQNx5YSA+oQkbzBZBrOA9wiYnoMcRekoS DOja90ugKwQd7ZG7WfkfD3QABCNAfzus+VzgarXj5op4+607xin+wQ3sRhrRQa+FtBwM Rv0a+o2IIWQqYWz9QeXOuCFv9YoG/xNhoIm/QPEZGNsU8jCx0XihlTvYTRg+Oa4/klFI q2aH/4mNrfeZat2vmoKlmO7JQ3UAE3HKP4CTvl7Gu2psbpsnXFiLOFo6iusfJcBUmZeV NbQoNkGVOim/hRJN8I+QjF+xgskS5vg6NkE+kCEEHjLW9h1fG4zOkHFmQF9duSMR3HFI YIYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:to:from:date :dkim-signature; bh=//7vsX8Xe0EnoCaA6msKWwWWlNN0ObipxBhcymyLmV4=; b=fXDPxOYlEQ0p5ja8rxgcoC2UGVPCqAvIaZQ2qOiBK9iHPQSV9HwZqk7l7uPY2x+5We CSDlY3A2g2Pbd2TR71xcB+ymhs/2tng7Pj29H02J4AQUdxE2RIca26RW4u3tbGEtUUg2 9mZk/VvHYMfaONTO1n4YUL31b2aXEnaHv5jlLHezrE7iu7u6fvIwTVTxhGwjk2SVfLAb eItYfaTgo3Tw9Rz4Ll//Tlrblu3xRm3phqEt+pX/R4g6Nz6SAFbcubqROKxQ8iZt2E4S F50eFShsMEs9lybfBE2Zz02C5FG6072rMxRC0xClzG5UpAIBAHQ1w1zVGUMXllApjPei wZhA== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=N5K71LFC; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.66 as permitted sender) smtp.mailfrom=bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net Original-Received: from mout02.posteo.de (mout02.posteo.de. [185.67.36.66]) by gmr-mx.google.com with ESMTPS id d29-20020a0565123d1d00b004dd84067a4asi619916lfv.4.2023.03.07.03.16.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Mar 2023 03:16:32 -0800 (PST) Received-SPF: pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.66 as permitted sender) client-ip=185.67.36.66; Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 2E8C22406E4 for ; Tue, 7 Mar 2023 12:16:32 +0100 (CET) Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4PWCZ75LTjz6trs for ; Tue, 7 Mar 2023 12:16:31 +0100 (CET) Content-Disposition: inline In-Reply-To: X-Original-Sender: bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=N5K71LFC; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.66 as permitted sender) smtp.mailfrom=bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net 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:32286 Archived-At: You can include it in an external metadata file referred to via the --metad= ata-file option. However, if you customize the LaTeX preamble heavily, it m= ay be preferable to use a custom template including the content of header.t= ex. 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 and = remove > "header.tex" completely. I would very much prefer to keep them as separat= e > files.=C2=A0 >=20 > 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. >=20 >=20 >=20 >=20 >=20 > On Tue, 7 Mar 2023, 10:16 Bastien DUMONT, <[1]bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org> = wrote: >=20 > 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: [2]https://github.com/lierdakil= / > pandoc-crossref/issues/47#issuecomment-614404532 >=20 > 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.lu= a -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 it= s own > header > > include which gets overwritten by my -H header.tex. This [1]link pr= ovides > more > > information. > > > > I tried the solution proposed by @lierdakil in the link provided bu= t get > 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 expl= anation. > >=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 po= inters > 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, s= end 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.googl= e.com/ > d/msgid/ > > pandoc-discuss/ > > CAMwawgPTeNSdJ7FDbc9tmw8ax06K7n_uGxvB-mCn2fvBzdD%3DUg%[5]40mail.gma= il.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.co= m? > utm_medium=3Demail&utm_source=3Dfooter >=20 > -- > You received this message because you are subscribed to the Google Gr= oups > "pandoc-discuss" group. > To unsubscribe from this group and stop receiving emails from it, sen= d 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.co= m/d/ > msgid/pandoc-discuss/ZAcA4dThsf/pAK2e%40localhost. >=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= 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. >=20 > References: >=20 > [1] mailto:bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org > [2] https://github.com/lierdakil/pandoc-crossref/issues/47#issuecomment-6= 14404532 > [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/CAMwawgPTeNSdJ7FDbc9= tmw8ax06K7n_uGxvB-mCn2fvBzdD%3DUg%40mail.gmail.com?utm_medium=3Demail&utm_s= ource=3Dfooter > [9] mailto:pandoc-discuss%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > [10] https://groups.google.com/d/msgid/pandoc-discuss/ZAcA4dThsf/pAK2e%40= localhost > [11] mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > [12] https://groups.google.com/d/msgid/pandoc-discuss/CAMwawgNJcw9d-aMSPF= Stx%2BwU__GrsDVhhNrARCLf4CdHNiGCWA%40mail.gmail.com?utm_medium=3Demail&utm_= source=3Dfooter --=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/ZAcdDn%2Bj/f55E9xQ%40localhost.