From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/28391 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: Wed, 19 May 2021 07:54:49 +0000 Message-ID: References: <26bec817-c8b4-4d63-ad5d-436aa281c0d7n@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="23292"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDCINCES2QJRBZUISOCQMGQEMHOYNOY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed May 19 09:55:20 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-wr1-f56.google.com ([209.85.221.56]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ljH32-0005sI-Fc for gtp-pandoc-discuss@m.gmane-mx.org; Wed, 19 May 2021 09:55:20 +0200 Original-Received: by mail-wr1-f56.google.com with SMTP id t5-20020adfb7c50000b029010dd0bb24cfsf6800641wre.2 for ; Wed, 19 May 2021 00:55:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1621410920; cv=pass; d=google.com; s=arc-20160816; b=PQL5r1k9hlZP6/TiAfcnaVzTqGKSDQteRoieG3XPNPAbJ85o6wLlwZegu1h1nvnh35 2mKztYTgnwavbjYYoz80dU7rfLD5oJc03PkD/FJORF0FtnM8yunn0QIyvrQZuiFE/6nI BI1dKDs22TuAO6lEqqwk2x4mRuYnvyunUnR8pmgiHOsKiO0ZdhPvFYM6NEYnWlLN9HXT t3HTQ+IPVLi3LTz5ye/7U7Bmlg+TxYcgLZt54ZAWn8Zb6EA7lL3yF6BuhkzVzuU55IVT IgjvIl7C3kFk6NbKUt5Zw8Oeh8gUPxT9IZcWtEZz7nf3/CHG/O6pHNNUwk+bwBzzby6s KJWQ== 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=b5HrXsFsyms/Rn827NrtmjbL/T1i7ytSq4UChTP1McY=; b=Ev05Tl//oDb78A8Llbb/Wmj2Q+Gjk+DS/wXxVNGCzW/0fJqE2Lj/3d9JJLSrtKZxN/ VA/rcWfQQHZ3UuoDOXSZ+MqW77ickWZFBp4Sau3oobGjt3HHw3YgaTdWWyPrwlH8ofFt vwOILVJg0pQWE53peQFa07DhcP4tkbIgQJLMGZSETzsqnGC/LlJn8AyLnUgoKqw9K0am rKus72uNW2e1Cuql5L5VZRzg0DZqV/1PB5LETf1Lt24LbGWj+4+Ks7t9IRwzDtrhZ+5H elSWjkwbkqU2WRC2ppw5YvYDUEdjapIfiyMtfsOfv36q+Ln0DlBX/fAkaDoaNsRHw7cw 9lFw== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=iLNLTyAw; 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=b5HrXsFsyms/Rn827NrtmjbL/T1i7ytSq4UChTP1McY=; b=VdAwrOv0gfNjF9eyi2lJnqDLjL9+ARWV03grp+3smFC1vEnNI7ewgulKaW/0cLm8KU iDK/mNtM8ba+yZ8DyPYu2+/qRDjZ7uSqpEdgYcSH8AeJXyJwYMxU7aGNHSyefdyLboeN GfpdE6Jaxo6SjOQfnRUmPqqwlMPAm6MQ5pg1w8nW2+lJTSKRCnm1dkizeMRshwa/Nllr Y7IoKn0UtsCQoSALYcQmQBrPR6prRDY9nXYDd/xoHVoG5t1zI62VyyVWFcWFbI7iVXdr DZImsikQ5rwTQKuyFXulR3NF/hI/MhCMWvRbo3cK2zfDkg2RK4QHl/dWer+//WwcegkH VyLw== 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=b5HrXsFsyms/Rn827NrtmjbL/T1i7ytSq4UChTP1McY=; b=iClPOeInemKSUqqKHFu+GLh+r86qbglSqP1GS0POcopKcyPsudvf2ERIzaPQkupKZ9 35pstPUptVkSD0WfQ2Gtzt6etfdOh6s8xx+pedbuFRQC24a45E60xHgP8glWEPExJPDU mR5Zii1A/+q+V9lXj22RE7O1wsw14MSAtNT+OL4f/p5YXjU41CBKkJAq53k6P+2e9BUD QX68wrOrAZKGonfBQlBDngLX35sCUYc75ytEHfE4KXBqmX8ALqbQrCaOZ0w4xnXCgRDS NtMmrMHRtqi7MwtXNcVlDvbniW23vm1U7yrIBi0o04mD Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM533+FB9/DTb8CBZVPLKyMc6PZe6Cyi2fDrImaz06+2oFFQA9gc10 vtruqYd7DawkmTFpIjPu6Ko= X-Google-Smtp-Source: ABdhPJz6jflB+e1byyaE3TL/l9ipLyM3wS2nnZyPmihdSk7KRA7rC8Tx5CYZJ0ll/S6T690LPC0ZXQ== X-Received: by 2002:adf:fc44:: with SMTP id e4mr12842654wrs.23.1621410920196; Wed, 19 May 2021 00:55:20 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:adf:db50:: with SMTP id f16ls6759817wrj.2.gmail; Wed, 19 May 2021 00:55:17 -0700 (PDT) X-Received: by 2002:a5d:62c7:: with SMTP id o7mr372370wrv.372.1621410917592; Wed, 19 May 2021 00:55:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621410917; cv=none; d=google.com; s=arc-20160816; b=HRBrrCvgcYPm5A8iAcEsjSA4eDxbAFPHgayNZujstgI44RT1EAz9xUYxuWbo5O3wu4 Vhzdf5Qn0xl2FOAm/E0fV9TqfL1xfrFO8MKiAE1sPpwzEBd+R5OaFM9tzr+FfkzmXpd9 fZAZQIRPLJPRJkVA8pwaAvj2gNF/iR0QlmEtmgIs4X5D03j1rW6x3K9iuc/aegMCOcfo qcF4IQxiWE0rir4z8BIF2NEzoJ/RVgXsjHw2232QWEurwSypOJY+1enHZ1c9om3UHcBT zKmyPptvj8oacZWq4J84jisqv0WqKpK3zxjBgbEf3gUlb6nQWVYuo3Ed3r0bhCzDwJXe pUjw== 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=iezWiJYg5MMjS5ntDIU39UyYkM2AWDubiBAAXeFcOT8=; b=JjA3Otq8Fhrm97cWD5CL1o8gH/dktUrTMaQllKpwheskKaxw1Uxszlfyy9++jr8hKo 4CNpC2g++5Y2LnFFJkuftmRcd11YksH9RhLEz6evLp7XkbUhGmQOkGysckWaZtKTxChK D1dFhX2E3S6hX24ZbfzkY5kLBIs+s1+uRqybmU5RPYEvk+VnyJ/vbhwIRTVZx3gpaTCD mqMU5NE8DrG4ylpyAaXZOMeLdifyZTDUt+fSR7S5QFKG3Ue4CZmBDXKkOLgDpaIS7mHs kmW5Ww94A95o5fEb9pHDSlvPnrDCD3RgymGYsX7XxSiIz+he9Sg2itfj8EobhbI6Y0zF 7R6A== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=iLNLTyAw; 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 o63si243593wme.3.2021.05.19.00.55.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 May 2021 00:55:17 -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 3089F240027 for ; Wed, 19 May 2021 09:55:17 +0200 (CEST) Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4FlQC73NKQz9rxG for ; Wed, 19 May 2021 09:55:15 +0200 (CEST) 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=iLNLTyAw; 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:28391 Archived-At: Unless you modify it in order to produce nuclear bombs, do as you wish! 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 \cite in footnotes and \autocite in the body text, or modify the script accordingly. Le Tuesday 18 May 2021 =C3=A0 07:21:54PM, Jeffrey T a =C3=A9crit : >=20 > Hi Bastien, >=20 > Thank you very much! This script with Pandoc is an absolute game changer = in > terms of my workflow! Do you mind if I share your script with others? >=20 > Again, thank you! > On Sunday, May 16, 2021 at 12:54:24 PM UTC-4 Bastien Dumont wrote: >=20 > 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. >=20 > I had'nt anticipat=C4=95d that you would also use \autocite in the bo= dy. I > restricted > the scope of the filter to the footnotes, so you should not have erro= rs > 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 the = file > attached. >=20 > 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 downloa= ded > your Lua > > filter (I didn't realize that filters were possible with Pandoc!) a= nd > included > > it in my Pandoc command: > > > > pandoc --citeproc --lua-filter=3Dremove-parentheses-from-cite.lua T= est.tex > > --bibliography=3Dtestref.bib --csl=3D > > chicago-fullnote-bibliography-short-title-subsequent.csl -o test.do= cx > > > > It worked perfectly for the \cite commands contained within \footno= te. > > Unfortunately the remainder of my book manuscript uses \autocite fo= r > references > > outside of footnotes. When \autocite is included, I received an err= or > message: > > "bad argument #1 to 'gsub' (string expected, got nil)" > > > > If helpful, I've attached the test .tex file I'm using? Your assist= ance > is much > > appreciated! > > > > > > On Saturday, May 15, 2021 at 6:05:21 PM UTC-4 Bastien Dumont wrote: > > > > I had a similar problem that I resolved with the attached Lua filte= r > > (slightly > > modified to adapt it to your needs). I hope that it will work for y= ou. > > Simply > > call it after --citeproc. > > > > Note that it will throw an error if you have \cite commands outside > > 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 your > > assistance. > > > I'm attempting to convert my LaTeX book manuscript into a Word do= c for > my > > > editor. Using a test .tex file, I have successfully converted the= 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 test.= docx > > > It works wonderfully, however, the only issue concerns the \cite > > contained > > > within \footnote. In particular, the resulting citation is now pl= aced > > within > > > parentheses which my editor has asked me to remove. Is there some= sort > of > > > solution to my dilemma? Given the length of the book I fear it wi= ll be > > quite > > > tedious to find/remove the offending parentheses manually. > > > Thank you in advance! > > > > > > -- > > > 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 https://groups.google.co= m/d/ > > msgid/ > > > pandoc-discuss/f4c18da4-6145-4f93-8779-fe2bd2816c38n%40googlegrou= ps.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 https://groups.google.com/= d/ > msgid/ > > pandoc-discuss/26bec817-c8b4-4d63-ad5d-436aa281c0d7n%40googlegroups= .com. >=20 >=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 pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit https://groups.google.com/d/msgi= d/ > pandoc-discuss/f787dab5-f3ce-41cf-815c-21f24727b781n%40googlegroups.com. --=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/YKTESTLThapJ0EAA%40localhost.