From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/28364 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jeffrey T Newsgroups: gmane.text.pandoc Subject: Re: LaTeX footnote citations parentheses Date: Sat, 15 May 2021 20:34:22 -0700 (PDT) Message-ID: <26bec817-c8b4-4d63-ad5d-436aa281c0d7n@googlegroups.com> References: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_6466_1220602585.1621136062332" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17904"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCTKDNPE2AFBBP5FQKCQMGQE5PHZRVA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Sun May 16 05:34:25 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oo1-f55.google.com ([209.85.161.55]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1li7Xt-0004Wi-B2 for gtp-pandoc-discuss@m.gmane-mx.org; Sun, 16 May 2021 05:34:25 +0200 Original-Received: by mail-oo1-f55.google.com with SMTP id w13-20020a4ab6cd0000b02901eb16e42655sf2730330ooo.11 for ; Sat, 15 May 2021 20:34:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:date:from:to:message-id:in-reply-to:references:subject :mime-version:x-original-sender:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:list-subscribe :list-unsubscribe; bh=dxOtSLfAdy6VOyvD9jimWJx+J/47NbFLFqHK5A/oXiY=; b=rONJjfLyqskh1XzblvqyjYqndlWI+D2JXFh/KJaexc1CU7k1v0cJmxCUjdyQHREr7p XbwPRXHq1ut5i0VPmEE/HmvtRrd0TX7IKPP00Fk6DshHGAJait4BR4Oe5WC0eYc3Gtja xG0EkQF5P3EDCEbKXfn4ss7VRB7OhlXMK8n35l7aYZuXb2UH+HVEmQwgsGPqdM1t2l4v 4dM16Ept1koePWXbVSbbpAVKC00/WrtPVK+41FcZp5xD+USSBKtYcAKuwi730uOdlw6Q 86fxf8F9qrRIzYM2b+CpQXMvoQtq2ur2zJ+e6IhU9i1g9wX324f42NQ7gVlGyFz5q9+y 5aJA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:message-id:in-reply-to:references:subject:mime-version :x-original-sender:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=dxOtSLfAdy6VOyvD9jimWJx+J/47NbFLFqHK5A/oXiY=; b=olHUMLRZ6atov3QotCq1rhaRXnsASsbKu3vToFnltKHWo2B/nA2rqwLXlAP0JLqh3V ofyyY9TmHNAIgPYGmwWYzNmZdL5UtNead+S4/tSa4U9TJi2uie9NlUF+dDL7P2NgfJMp CP9XdwVKGq+LkwMiz5S7SMxSBfw/d8aPtXkrynHj/L6syF0CdRG5E1Ngg6VcYua31cD9 Ig/kD6DEwFYScHuqrMY5pnWTEHuBKCeVsbcXOSPkY/QZ2KqoGS3U4j0xFFl3yZ9HxVbO JIHyqQcVGIC45QYxqFw5clux+PloEleAv2bP6jEZMNifu6uU3Y4jvejgicPRusUW1b6A Tukw== 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:message-id:in-reply-to :references:subject:mime-version:x-original-sender:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=dxOtSLfAdy6VOyvD9jimWJx+J/47NbFLFqHK5A/oXiY=; b=T9UZqiCWpVsGufDDngPPyuUz9Pf6HabjFsmkgccih6vGnsCSnuMjihQAjxSJ2+vXUh rZWuGgNWx8ExvVbjkDCeLvFlh+kfTNRixS9DVs/GKoh6yzcxQa5A5OcbwlWqMCh8pXaw cqv80sOTEKx8OIa1nsfJh0ATck6sGOwTlzHhON4v7y6rVDQMbi2ecX7PYSIP+umC6chb 9Fgsb9G21mc0v7digLVutvIjEP/hHbwgm4SgF2yiOgPMKZ8aSTyg0FdQDaOvAmuLg1te RmZ532I/C681T3g9kxB3VTaFESyJgrpWCD+oIpiG1C4SXxpA3N96nVwRjBnS6BSJ6XKD iKJw== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM531GVgmpManDLSBFEXydXLNZLXVDmAlGJXdMmURl3j8f71CDnh4m NEmwoc53T2CxTy3DDDtyiUA= X-Google-Smtp-Source: ABdhPJw9K4MSMTh1dZW94xKU77FkZTEI5deapREgTwvM+dHGTUzIDShm+njgcvTA9sJL5o0bWrHIgQ== X-Received: by 2002:a9d:2de1:: with SMTP id g88mr47062842otb.5.1621136064397; Sat, 15 May 2021 20:34:24 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a9d:5c8d:: with SMTP id a13ls3704267oti.0.gmail; Sat, 15 May 2021 20:34:23 -0700 (PDT) X-Received: by 2002:a9d:6e09:: with SMTP id e9mr38876675otr.126.1621136063014; Sat, 15 May 2021 20:34:23 -0700 (PDT) In-Reply-To: X-Original-Sender: JeffTreistman-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org 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:28364 Archived-At: ------=_Part_6466_1220602585.1621136062332 Content-Type: multipart/alternative; boundary="----=_Part_6467_863998599.1621136062332" ------=_Part_6467_863998599.1621136062332 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Bastien, Oh my, thank you very much for taking the time to assist! I downloaded your= =20 Lua filter (I didn't realize that filters were possible with Pandoc!) and= =20 included it in my Pandoc command: pandoc --citeproc --lua-filter=3Dremove-parentheses-from-cite.lua Test.tex= =20 --bibliography=3Dtestref.bib=20 --csl=3Dchicago-fullnote-bibliography-short-title-subsequent.csl -o test.do= cx It worked perfectly for the \cite commands contained within \footnote.=20 Unfortunately the remainder of my book manuscript uses \autocite for=20 references *outside* of footnotes. When \autocite is included, I received= =20 an error message: "bad argument #1 to 'gsub' (string expected, got nil)" If helpful, I've attached the test .tex file I'm using? Your assistance is= =20 much appreciated!=20 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 filter=20 > (slightly > modified to adapt it to your needs). I hope that it will work for you.=20 > Simply > call it after --citeproc. > > Note that it will throw an error if you have \cite commands outside=20 > 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 : > >=20 > > Hi all, > > I'm new to the group and Pandoc and would greatly appreciate your=20 > 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 the file= =20 > 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=20 > contained > > within \footnote. In particular, the resulting citation is now placed= =20 > 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 will be= =20 > quite > > tedious to find/remove the offending parentheses manually. > > Thank you in advance! > >=20 > > -- > > 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= =20 > an email > > to pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To view this discussion on the web visit=20 > https://groups.google.com/d/msgid/ > > pandoc-discuss/f4c18da4-6145-4f93-8779-fe2bd2816c38n%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/26bec817-c8b4-4d63-ad5d-436aa281c0d7n%40googlegroups.com. ------=_Part_6467_863998599.1621136062332 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Bastien,

Oh my, thank you very much for taking the time to assist! I downloaded your Lua filter (I didn't=20 realize that filters were possible with Pandoc!) and included it in my=20 Pandoc command:

pandoc --citeproc --lua-filter=3Dremove-parentheses-from-cite.lua Test.tex=20 --bibliography=3Dtestref.bib=20 --csl=3Dchicago-fullnote-bibliography-short-title-subsequent.csl -o=20 test.docx

It worked perfectly for the \cite commands contained within= \footnote. Unfortunately = the remainder of my book manuscript uses \autocite for references outside of footnotes. When <= span>\autocite is included= , I received an error message: "bad argument #1 to 'gsub' (string ex= pected, got nil)"

If helpful, I've attached the te= st .tex file I'm using? Your assistance is much appreciated!

=
On Sa= turday, May 15, 2021 at 6:05:21 PM UTC-4 Bastien Dumont wrote:
I had a similar problem t= hat I resolved with the attached Lua filter (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 outside foo= tnotes.
If that it the case, please let me know.

Le Saturday 15 May 2021 =C3=A0 12:13:37PM, Jeffrey T a =C3=A9crit :
>=20
> Hi all,
> I'm new to the group and Pandoc and would greatly appreciate y= our 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 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.d= ocx
> It works wonderfully, however, the only issue concerns the \cite c= ontained
> within \footnote. In particular, the resulting citation is now pla= ced 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 wil= l be quite
> tedious to find/remove the offending parentheses manually.
> Thank you in advance!
>=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-discus...@goo= glegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/
> pandoc-discuss/f4c18da4-6145-4f93-8779-fe2bd2816c38n%40googlegroups.com.

--
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://groups.google.com/d= /msgid/pandoc-discuss/26bec817-c8b4-4d63-ad5d-436aa281c0d7n%40googlegroups.= com.
------=_Part_6467_863998599.1621136062332-- ------=_Part_6466_1220602585.1621136062332 Content-Type: application/x-tex; name=Test.tex Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=Test.tex X-Attachment-Id: e13f0f86-9a0a-4d07-b2ab-2f0a7bec1514 Content-ID: \documentclass{article} \usepackage{markdown} \usepackage{biblatex-chicago} \usepackage{filecontents}% to embed the file `myreferences.bib` in your `.tex` file \begin{filecontents}{testref.bib} @article{Doe, author = {John Doe}, journal = {Sample Journal}, number = {1}, pages = {1-20}, title = {This is a sample title of the Pandoc reference}, volume = {14}, year = {2022}} @article{Smith, author = {Sally Smith}, journal = {Journal of Policing}, number = {4}, pages = {69-90}, title = {The title would normally goes here}, volume = {02}, year = {1992}} \end{filecontents} \addbibresource{testref.bib} \begin{document} Here is a standard citation using autocite.\autocite[1]{Doe} Here is a citation contained within a footnote.\footnote{See \cite[6]{Smith}.} \end{document} ------=_Part_6466_1220602585.1621136062332--