From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/28962 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Bastien DUMONT Newsgroups: gmane.text.pandoc Subject: Re: LaTeX footnote citations parentheses Date: Mon, 2 Aug 2021 14:25:19 +0000 Message-ID: References: <26bec817-c8b4-4d63-ad5d-436aa281c0d7n@googlegroups.com> <7c5a2709-9b84-40b4-a77e-bd3dc5acb50cn@googlegroups.com> 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="30467"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDCINCES2QJRBDMBUCEAMGQERNYGRHY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Aug 02 16:26:24 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-lj1-f188.google.com ([209.85.208.188]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mAYtb-0007ho-Pp for gtp-pandoc-discuss@m.gmane-mx.org; Mon, 02 Aug 2021 16:26:23 +0200 Original-Received: by mail-lj1-f188.google.com with SMTP id d17-20020a05651c0891b029019189dff65esf3224767ljq.16 for ; Mon, 02 Aug 2021 07:26:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1627914383; cv=pass; d=google.com; s=arc-20160816; b=Em29n9Gp81mQ/OZJBL2magcRdTerws5QsAU2c914gfR2MRORw5MP/QEW0/J2ewNrii 9lR29jRkWw5JHywrrHApsIQPAazYWowjuT0XagH1xv4vrwL+BHSFpO5Ld29I52vLLXLi YoEVvB2clSTjUPFu3JIzpw2ZjGooPiz6v8pPqswLTygsdIqj17ZzRbHpXyfTZYIz4qZF mtqNrpFoY9JydFt9LX0aGd3iijVYhf3PqK70D2fBt1bzzE06ruRcfEB0T+pyqiX/RPuo rbVV9lhe4UT2KM6Kic6nJeDidKxQdxHMQKroZlSgdAYOp9XEFIm3Dk4CvxYZTYV09xdW t2Sg== 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=OfHO0GqC26nB+W1UXfob10DGIoCa6QxG1Q16Iav5M1M=; b=E7m28wnJ1r0++Pr4vY2Ia7D5K6nTcw38OgmBkHTwUoCnkRgvlfgUSPGtN38/5jp2kJ 1OzHwE6jDr4f/5qzWRnT6n2m/D9I4tUn5c2qRmAewF17bEaCVf4wqfSUnzHJJXn7QGpe TxaiSvQ7mrsOhM/I4DVzREbGsamr4eGBy+8TtMRTai/RdT6iMVULLKUu7K17yYLF5nPD lP1iimlgsbHUWgwqQCa34TM5E1+WjTo19KvRq+DS9a/BIsS2N/xqHfEdyd1FdkgDpDLB 6pAPoJRRTk83P6eno+Uyt55jFmppQDklLvLV1W3M1b1A7ymxqk8H4V1WKw+77sJ4rJav e3qA== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=P0HK7jyN; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.65 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=20161025; h=sender:date:from:to:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=OfHO0GqC26nB+W1UXfob10DGIoCa6QxG1Q16Iav5M1M=; b=G8MXBpjS82xu6n+/wigcQjebuCTiY+5QPb+zQHg+hhaWFldS4zl86J2GjB6DqTRSja gzdsmiUGNyBUWtk3kCoKlxsA1Ghy6XoEy8hb8pz70XAKbRMR73hkI7jUhY3f9BIbwfe3 i3ilHEM1Jay6CFS3r7e4V4H9JByi878mmws4OEips6CiQ+puysV4dqi2lcCOFH6K+QsR 33AJojfKMPKKhHeoTWK2TkxTcDlJEePx5SEPlYiYdR7S+fjQ3yH8IP10POAT8GuEeFCv hUiKGojV1OcD8fTSB7nHCH0ltXdDQcEGPWdNr7avEon5pwqMlBL83FRUIYR9VHjS21cP r82Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:date:from:to:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=OfHO0GqC26nB+W1UXfob10DGIoCa6QxG1Q16Iav5M1M=; b=T5JdYM5AvH1eaz0IFuKm1/lnl5l+i6o9o3/IDkpjwt/2Bw0H6FiDnPGqkkE5ziXUZy 70Wvu7djIxYDnwsX/n7Q8ouiMuNsEg4U0KJT9QZaljFmSU36xsPEqIIvGu5b18S36QS1 0ilEhT4K7v8NjtkmrnTeBZ+uzES+IuHNu5fdHInlJHXPkuUHR7tJshjWtbY0ZEf+F74r qDHu+JE96FblhPngJMUdZlaSJnMZCGF9FwDEaD0ZMjuoYZakPjveiQtMEq2JKCHl/zOt sZbjVknTa2r/MBW+a7Zs/8H4+YiPyZw/zjD18p/+Avsr Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM531mZlPblecSJJBJtWdXVqW1SsZW2HXAZ1o3ibh91oc2MgraMp3d hVpI9OvNrtUQJYYpClmvWHs= X-Google-Smtp-Source: ABdhPJwqI7wnbBKXa9Ll3zCNc4IhsKcizdbSHjre3bx8tuYx83/YcRAQldvZZYwA6efLn7t58gpbUA== X-Received: by 2002:a05:6512:3f84:: with SMTP id x4mr13359174lfa.598.1627914383221; Mon, 02 Aug 2021 07:26:23 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:ac2:4146:: with SMTP id c6ls982775lfi.2.gmail; Mon, 02 Aug 2021 07:26:20 -0700 (PDT) X-Received: by 2002:ac2:5dd2:: with SMTP id x18mr11417272lfq.81.1627914380421; Mon, 02 Aug 2021 07:26:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627914380; cv=none; d=google.com; s=arc-20160816; b=T+QOR/BmpKRwnfzzYGHLyb2N9FG1bfMl7pHrWF67RRWmLyK7pngeFz5ed9o1Cp17ox xcsvSkLwN7pxJmQFe6luokZAz7wx96TaW15BHrRAQJGsRb188ZrrYVWgyYFB3V0pWLou EklyAD3ld+hGEy0M+g2JnK26x9POuofaV3U9gC2q1lLqigIoxV7YYeZ6CtDOJpZbrqDA SFnklA26S6DEQZmOcoxMr0lPvIBdrpGCVcwvFsOAQu0E2lcGE8HgYbYYccmGmRTQT/40 VWRoge8//swHlQJvQXP2HDJb7StHKCDGOIDFFzl5JcNhv1Kf0fEeinAyKyxkxvvVsach i/eA== 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=hT/9hAfoG6ULWZOdk1Fv0EhnwW7Exqxc2c6lNm2VkBg=; b=jNIB4Yn51ZPenLHY4mOZGHnMprzakj9Y5N2e4XhziHVHDPpSrMbunJwMA4OXwQSm+t s6oSdspXwCi3ePEVm0hYG0apLzhFVu01ytyt4GEwwwBJFEdiX+EBRty3HgiiG76wHHxY KGwKH6DUcS7PTZSI3lFi6Fu6U693FSOv1fAsXaAa0H9oL5x0xR+i2fbEQgn2WJVxcv91 lDBs5kQ1mHl2f56VbZHnLHpj1YLpfIu9zn35HcjDz9f7S55xG5Zt20OkkrOE/d2aZRY0 4m8AdhhkRVDX3pm4Is5B2Arij8h73jaVVYYPY9xjpwu2cq56/DyoVEtOLJGKpEDxo8ax gcxw== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=P0HK7jyN; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.65 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 mout01.posteo.de (mout01.posteo.de. [185.67.36.65]) by gmr-mx.google.com with ESMTPS id v2si9791ljh.8.2021.08.02.07.26.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Aug 2021 07:26:20 -0700 (PDT) Received-SPF: pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.65 as permitted sender) client-ip=185.67.36.65; Original-Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 8859F240026 for ; Mon, 2 Aug 2021 16:26:19 +0200 (CEST) Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4GdgKl1Vkdz9rxK for ; Mon, 2 Aug 2021 16:26:19 +0200 (CEST) Content-Disposition: inline In-Reply-To: <7c5a2709-9b84-40b4-a77e-bd3dc5acb50cn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 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=P0HK7jyN; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.65 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:28962 Archived-At: I don't get an error with you new test file. What version of Pandoc do you = use? I still have 2.14.0.2. Le Monday 19 July 2021 =C3=A0 11:48:57AM, Jeffrey T a =C3=A9crit : > Hi Bastien, >=20 > I'm working on converting a manuscript for a revise and submit. Unfortuna= tely > I've suddenly encountered a new error with the Pandoc script / filter whi= ch > appears to be isolated to citations that appear in a footnote but without= any > preceding text. I've attached a minimal working example. Note the third > citation in the example appears to be the culprit. Indeed, by adding any > arbitrary character in front of \autocite command contained within a foot= note > the conversion seems to work as intended.=20 >=20 > Any suggestions? Is this new error perhaps related to a newer release of > Pandoc? As always, your expertise and help is greatly appreciated! >=20 > On Wednesday, May 19, 2021 at 3:55:21 AM UTC-4 Bastien Dumont wrote: >=20 > Unless you modify it in order to produce nuclear bombs, do as you wis= h! > However, I must warn you that I adapted it to work with the use case > that you provided only: there are no checks that would prevent it to = run > into errors if other conditions are met. Ensure that you stick to \ci= te > in footnotes and \autocite in the body text, or modify the script > accordingly. >=20 > Le Tuesday 18 May 2021 =C3=A0 07:21:54PM, Jeffrey T a =C3=A9crit : > > > > Hi Bastien, > > > > Thank you very much! This script with Pandoc is an absolute game ch= anger > in > > terms of my workflow! Do you mind if I share your script with other= s? > > > > Again, thank you! > > On Sunday, May 16, 2021 at 12:54:24 PM UTC-4 Bastien Dumont wrote: > > > > You're welcome, I already had done much of the work for myself, so = I am > > happy if > > it could be useful for others as well. > > > > I had'nt anticipat=C4=95d that you would also use \autocite in the = body. I > > restricted > > the scope of the filter to the footnotes, so you should not have er= rors > > anymore > > provided that all your use cases are documented in the text file. I > > supposed that > > you don't want the output of \autocite to be changed. Please try th= e file > > attached. > > > > Le Saturday 15 May 2021 =C3=A0 08:34:22PM, Jeffrey T a =C3=A9crit : > > > Hi Bastien, > > > > > > Oh my, thank you very much for taking the time to assist! I downl= oaded > > your Lua > > > filter (I didn't realize that filters were possible with Pandoc!)= and > > included > > > it in my Pandoc command: > > > > > > pandoc --citeproc --lua-filter=3Dremove-parentheses-from-cite.lua > Test.tex > > > --bibliography=3Dtestref.bib --csl=3D > > > chicago-fullnote-bibliography-short-title-subsequent.csl -o test.= docx > > > > > > It worked perfectly for the \cite commands contained within \foot= note. > > > Unfortunately the remainder of my book manuscript uses \autocite = for > > references > > > outside of footnotes. When \autocite is included, I received an e= rror > > message: > > > "bad argument #1 to 'gsub' (string expected, got nil)" > > > > > > If helpful, I've attached the test .tex file I'm using? Your assi= stance > > is much > > > appreciated! > > > > > > > > > On Saturday, May 15, 2021 at 6:05:21 PM UTC-4 Bastien Dumont wrot= e: > > > > > > I had a similar problem that I resolved with the attached Lua fil= ter > > > (slightly > > > modified to adapt it to your needs). I hope that it will work for= you. > > > Simply > > > call it after --citeproc. > > > > > > Note that it will throw an error if you have \cite commands outsi= de > > > footnotes. > > > If that it the case, please let me know. > > > > > > Le Saturday 15 May 2021 =C3=A0 12:13:37PM, Jeffrey T a =C3=A9crit= : > > > > > > > > Hi all, > > > > I'm new to the group and Pandoc and would greatly appreciate yo= ur > > > assistance. > > > > I'm attempting to convert my LaTeX book manuscript into a Word = doc > for > > my > > > > editor. Using a test .tex file, I have successfully converted t= he > file > > > using > > > > the following command in Mac Terminal : > > > > pandoc --citeproc Test.tex --bibliography=3Dtestref.bib --csl= =3D > > > > chicago-fullnote-bibliography-short-title-subsequent.csl -o tes= t.docx > > > > It works wonderfully, however, the only issue concerns the \cit= e > > > contained > > > > within \footnote. In particular, the resulting citation is now = placed > > > within > > > > parentheses which my editor has asked me to remove. Is there so= me > sort > > of > > > > solution to my dilemma? Given the length of the book I fear it = will > be > > > quite > > > > tedious to find/remove the offending parentheses manually. > > > > Thank you in advance! > > > > > > > > -- > > > > You received this message because you are subscribed to the Goo= gle > > Groups > > > > "pandoc-discuss" group. > > > > To unsubscribe from this group and stop receiving emails from i= t, > send > > an > > > email > > > > to pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > > > To view this discussion on the web visit [1]https://groups.goog= le.com > /d/ > > > msgid/ > > > > pandoc-discuss/f4c18da4-6145-4f93-8779-fe2bd2816c38n%[2] > 40googlegroups.com > > . > > > > > > > > > -- > > > 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 pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > > To view this discussion on the web visit [3]https://groups.google= .com/d > / > > msgid/ > > > pandoc-discuss/26bec817-c8b4-4d63-ad5d-436aa281c0d7n%[4] > 40googlegroups.com. > > > > > > > > -- > > 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 pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To view this discussion on the web visit [5]https://groups.google.c= om/d/ > msgid/ > > pandoc-discuss/f787dab5-f3ce-41cf-815c-21f24727b781n%[6] > 40googlegroups.com. >=20 >=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 [7]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit [8]https://groups.google.com/d/m= sgid/ > pandoc-discuss/7c5a2709-9b84-40b4-a77e-bd3dc5acb50cn%40googlegroups.com. >=20 > References: >=20 > [1] https://groups.google.com/d/ > [2] http://40googlegroups.com/ > [3] https://groups.google.com/d/ > [4] http://40googlegroups.com/ > [5] https://groups.google.com/d/msgid/ > [6] http://40googlegroups.com/ > [7] mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > [8] https://groups.google.com/d/msgid/pandoc-discuss/7c5a2709-9b84-40b4-a= 77e-bd3dc5acb50cn%40googlegroups.com?utm_medium=3Demail&utm_source=3Dfooter > \documentclass{article} >=20 > \usepackage{markdown}=20 > \usepackage{biblatex-chicago} >=20 > \usepackage{filecontents}% to embed the file `myreferences.bib` in your `= .tex` file >=20 > \begin{filecontents}{testref.bib} > @article{Doe, > author =3D {John Doe}, > journal =3D {Sample Journal}, > number =3D {1}, > pages =3D {1-20}, > title =3D {This is a sample title of the Pandoc reference}, > volume =3D {14}, > year =3D {2022}} > =09 > @article{Smith, > author =3D {Sally Smith}, > journal =3D {Journal of Something}, > number =3D {4}, > pages =3D {69-90}, > title =3D {The title would normally goes here}, > volume =3D {02}, > year =3D {1992}} > \end{filecontents} >=20 > \addbibresource{testref.bib} >=20 > \begin{document} >=20 > Here is a standard citation using autocite.\autocite[1]{Doe} >=20 > Here is a citation contained within a footnote.\footnote{See \autocite[6]= {Smith}.} >=20 > Here is a citation contained within a footnote but without any preceding = text before the citation.\footnote{\autocite[10]{Doe}. See also \autocite{S= mith}.} >=20 >=20 > \end{document} --=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/YQgAT5zZE1YUHTg8%40localhost.