From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/28360 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 18:58:35 -0700 (PDT) Message-ID: <397a966f-3ed9-4ddc-a173-86fbd5466bcfn@googlegroups.com> References: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_4430_2027395904.1621130315651" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6066"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCTKDNPE2AFBBTHYQGCQMGQEDEHM7QY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Sun May 16 03:58:40 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-ot1-f63.google.com ([209.85.210.63]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1li63D-0001L8-0K for gtp-pandoc-discuss@m.gmane-mx.org; Sun, 16 May 2021 03:58:39 +0200 Original-Received: by mail-ot1-f63.google.com with SMTP id k7-20020a9d4b870000b02902a5bfbbbd3bsf2421958otf.18 for ; Sat, 15 May 2021 18:58:38 -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=oSZPgI9thgYe8mm9NQ9NZDCAeFmkWLCAM2PnzFXJpZM=; b=sCNO/tnK9TYdN9W1g4nRv5sL0Lm9B8bzBpxaa75VhM8ploAggwul61jsb0hrNyIHTW pOgfXdOQgTYG8uLmCB6dvofPIYq8V02omPA4F+1UobzUtmh5gDfkr3j/etPOXoQAkeLs e2xDTsvymtA5/FJ2SYR4saIxw9obU1TzGQeYHZg78jFSHtDwK0CL7L60jUgM++atKnZO Ev71Jq5RTMWuixrrRYtCeZYtdPx0PxlHUViBP0SekpqErztp2ZXR3h3zBcWcI/Sd5zwt Emd01WJJFCIiIv823wJ8+zM0eSOC32KSatE8ffZSKps4CeuD9WuyWXeEnfMwMsfxMMTe soZA== 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=oSZPgI9thgYe8mm9NQ9NZDCAeFmkWLCAM2PnzFXJpZM=; b=nhUbJDKkI0LF10vTHuLP+L7TrVjEun+UHoRCCjD/W+PNcQ0dwui+ebjgZSauGUvYA+ RmmuBOgeFyruz6/rOZhAOOvGHHnTtbK6ZTUGehfPf3iXP3j/+N0xNFRHvIpqFo5cYhT0 Q37RMau5Ow1LoONqZWqu9qaGPlZu3m4aO9SqzcibAjlYYSg8EYFNwSzf8+MTJdjOX25t IrJcJAEcvBrlp8PtXJfzRXwsLTQT4XkNaZ13mYf5DlGZfVXPa0EI7Lidk2vRHAVadK8k U78VgNvn4AF36JcUzBsK1J6iJJnpw7rdpKqxy+9cZ/K2LHcAufGZ6KuLFAOfYIRBet+z QoCg== 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=oSZPgI9thgYe8mm9NQ9NZDCAeFmkWLCAM2PnzFXJpZM=; b=fJ6+AChfo1vfblYKC7KLrDVO6W39JtOL/EiJMisMktzLjXWX/4oUAUDOMmZ81EwXYh JsFe/S4nSVaYgl3Vc9fBMEgkKnxBEFsNjXA/8tskzsN2s11cNAVuWc/YNIveUJd4n9Ut 1QAKxbrctk6fMSd2icB3lPQj64DMm4wEWenf6fwfVmB3qIrAd4cWMRHuVA0UHiNnckYy h1bl32izTxKrEmWzF3PR5JWd32Qp3fanPwUfsOwgSzGzvSEOjLjBku8TBxVcpCmB3tx0 lF2bkhLWAjCUjqKuk+WTUfzjrFNlT8LdrHbh6tUqOUiorMVfgyB+PZ5s0SABjLqYENn6 7xkw== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM531Sog0TLn75EuLjeQZLCDIUTpMaUBEqa7YNKhsoqDZnYXCd334Z /8ne3mJmUWo5h7sT8MhI3do= X-Google-Smtp-Source: ABdhPJwsymxXFJxmAHYUeIU0kd9UFHLe9RkIDc7Gqoh/AQlh7T8PwYBG3CBhAN6Ly88wFyG6Gio+5Q== X-Received: by 2002:a05:6830:4082:: with SMTP id x2mr35786699ott.87.1621130317981; Sat, 15 May 2021 18:58:37 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:aca:fdd2:: with SMTP id b201ls3388960oii.8.gmail; Sat, 15 May 2021 18:58:36 -0700 (PDT) X-Received: by 2002:a05:6808:1c9:: with SMTP id x9mr17982128oic.109.1621130316394; Sat, 15 May 2021 18:58:36 -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:28360 Archived-At: ------=_Part_4430_2027395904.1621130315651 Content-Type: multipart/alternative; boundary="----=_Part_4431_105544035.1621130315651" ------=_Part_4431_105544035.1621130315651 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 Unfortunately I received an error message: "bad argument #1 to 'gsub'=20 (string expected, got nil)" If helpful, I've attached the test .tex file I'm using? Any thoughts=20 greatly 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/397a966f-3ed9-4ddc-a173-86fbd5466bcfn%40googlegroups.com. ------=_Part_4431_105544035.1621130315651 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Bastien,

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

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

Unfortunately I re= ceived an error message: "bad argument #1 to 'gsub' (string expected, got n= il)"

If helpful, I've attached the test .tex file = I'm using? Any thoughts greatly 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 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/397a966f-3ed9-4ddc-a173-86fbd5466bcfn%40googlegroups.= com.
------=_Part_4431_105544035.1621130315651-- ------=_Part_4430_2027395904.1621130315651 Content-Type: application/x-tex; name=Test.tex Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=Test.tex X-Attachment-Id: 4b69ade9-4029-42b0-b47f-8bdbb0efc15c Content-ID: <4b69ade9-4029-42b0-b47f-8bdbb0efc15c> \documentclass{article} \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{Doe}. Here is a citation contained within a footnote.\footnote{See \cite[6]{Smith}.} \end{document} ------=_Part_4430_2027395904.1621130315651--