From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/28858 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: LaTeX footnote citations parentheses Date: Tue, 20 Jul 2021 09:19:27 -0700 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="34660"; mail-complaints-to="usenet@ciao.gmane.io" To: Jeffrey T , pandoc-discuss Original-X-From: pandoc-discuss+bncBCJZJHG45QDBBHPP3ODQMGQENVY5WCA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue Jul 20 18:19:44 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oo1-f56.google.com ([209.85.161.56]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1m5sT9-0008sP-Iv for gtp-pandoc-discuss@m.gmane-mx.org; Tue, 20 Jul 2021 18:19:43 +0200 Original-Received: by mail-oo1-f56.google.com with SMTP id e25-20020a4ab9990000b029024aa2670b1csf14898522oop.21 for ; Tue, 20 Jul 2021 09:19:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1626797982; cv=pass; d=google.com; s=arc-20160816; b=pzsBEkjQaV3QLIV8impsAXWCxr3vU5c0fNI9Ts9sSeYomSmqGNjF/JulGgfswbz2F3 TDOIdDe5Hi9P5gXh+ZfHekiTEdsEjtQN8goKVYvOpMVtVq6NnsvbZnq4nj9jY7lXJx5d ThwIBhb3J9Cz+VOUZVTAmVe+9SnPL1+aeGxFbpaPil+UMznJHxnM87Lxdp5BtspOKLe7 5+n0q6OGsjgshIBlfaLjMy5YnCXbT9cBorKsiODS+kWWBReKAhYuu3ANKnYLxt/Kis+B EkmAc//BTJgLUDBu6XIOlKFu6oedtIzEg1Z34Agn9Xfjx+n9qBwU71KrXfiaFr/juTGp 6hhg== 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:content-transfer-encoding :mime-version:message-id:date:references:in-reply-to:subject:to:from :sender:dkim-signature; bh=KdcCPDwfvE8GHPh/f1Xr10BTZckAZfZDSYqfs/Rjmvg=; b=b50ySYDfnePW6kQXOTTv0CR6QyhdxtsmHbrPwdGLN17KL0yXze3N9xbpQa69r6vQcn dDMbc1eayqgqR5UeXSprQ27UXQk76i9+byC5093+Bhm56UKdslnWARUjlZiUqs835Sg9 JH1RBo7Eggz7bxa3ZFT0ioyjwixPHS/ppj9PsGXKdAT7+Ndk0hBAbMMksy5IteMl+GyV eyxBNisfE0KACerkVFJwmL1lfrYDIDn5tkQhrC3hKWOnYduHWhKFKAwyfhTtAE45Fohj HeX22sqpL3IW9ElQG75VMwSyp5/d3RCNjKRlk3NdOjDwqb5HwV71IPcyLi3ZOqaIh3gW 6weg== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=SUUt7i4I; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::102d as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:from:to:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding: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=KdcCPDwfvE8GHPh/f1Xr10BTZckAZfZDSYqfs/Rjmvg=; b=eYlS2V/9vvSg44pBNYK1xu6h/R3YCWIXOMOcBhMTlVQZy87TVK/gBpUxiDPtDXLtaP jFt8VmdjucwFbV2gfrCVUuGoWpuOmQrFOadTQ3G95arGU4R6UPjAEeGrjf1h6DbaX6HO 9XC5gHucmuUfRSa5+aHThwfrjSC0Go4XLjN/l/m1vF7rxe3dU7mNO1E139f1xq0HvlcK WDtCSTRQmvi808Jdnl265bCBeAqNraPWfjhkKMXOyHQIuzzHfWf6srefmLs/1WXKUvMI 3Q9wJniGfxBrho6LW2KiApcZ2WE8DgYou4B/x6U4d+TDDZOcY3aomqty5qewXDknDFLm RJXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:from:to:subject:in-reply-to:references :date:message-id:mime-version:content-transfer-encoding :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=KdcCPDwfvE8GHPh/f1Xr10BTZckAZfZDSYqfs/Rjmvg=; b=arPffAzAKC7V6Dm3COQq8aagv8mcw1JMM2tV84gPlQfZw3eVplR/k5MXYuDd8/73hM 1qXS4E//i0NfNZjcgG9DoO/9WlCsKpdx7hjT9w1WKoDYDqVqSHbtC2S19MhjwWJy74ea xtb9DkLv23mLC71fz5VgFZkwiBAtekdrLvbjsLRuE0vKR+Y5AB+Vh3KjQjxelWsdyvx3 boxgRD6FYOJTnzQu5QlqgA6vBjius3em1Rfc0t9MYiTjsFpIHW1fD35IDZqcSrQQ6t6I BRyAydWRP4qSVZBJIsd+n9NW99qdXlxLgrz4H/zVYSof2Ff/T4gcFzDMg/zxDURE1XTy Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM531kFjglZIRTSjB3Ts1eCnsOH+n50r+w3bJXzPRI3PAemCNYh9Br 62YpfF/ZEqvc3Swt/WGkcNE= X-Google-Smtp-Source: ABdhPJynCqnvgENe7XbM7BIZLpVQ/xWSGE5K3I3lpYbv8r9iyNE4QHVjlaf4gxQ7Ss/lYxuiVIgDrQ== X-Received: by 2002:aca:b342:: with SMTP id c63mr12353232oif.83.1626797982561; Tue, 20 Jul 2021 09:19:42 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a9d:5a01:: with SMTP id v1ls8734802oth.3.gmail; Tue, 20 Jul 2021 09:19:41 -0700 (PDT) X-Received: by 2002:a05:6830:1c65:: with SMTP id s5mr17323732otg.256.1626797981037; Tue, 20 Jul 2021 09:19:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626797981; cv=none; d=google.com; s=arc-20160816; b=rEL7E4deeVPRqcdsMttOLFwJVH5DY2k6XJeQntBJtTYfT7lqsJpa/izMImLJfqeYwC +eQb7GpbaHOw89LLDQUFW5pbD1FhmVVzmwOEBx4WDHI0r8DNxw7fbplmys8bYr082MC7 dFxZybv7jsu7v76P9SRmOyWzPSzdU/loCiP3vqWDMtgGDfCVe6egYoSwQHJcocWD44Wa EjjqUhCBA333YdFhO/FlQPOug137iqtC1Hsw4+Ixk1tlbzNPO6v9HReQt2lHbYpzgBHA 1YZMri3JpYDVjtiD0p02xj8FZLPPmBrKfkpFqwHn7vPXzQKmd/DzNymi2/uJSHWXXIJq b0Mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:to:from:dkim-signature; bh=yGylq9ygKM+oo31mI9SKsMltfoTgRa+dus9E/DHswgk=; b=PF5K2JzS01GP4/bRIqO/h6hgLHwouPtsJg+DD8dY5fZ+i3Eni+88THxKLuPq/K7aw+ lb3oLMZWIlRpRHDUHBWEkYY7Db8KWZXq3LhrQAQfJucomIAJKkBxi/5pkFxpdx3NlRn7 qJWMU0nULV7Nkcl7o8AO071mrkD0Y+lxwSHt9eoWEPGVadIDSqHnWIp4zDn7eQBDEeOf sQviXA+qyeYtOmjuaM30z7Jn36T69ZIqThwgqCNhcpAPxwJ/QFL1abrceXi8syNavAcP 3wBbZCxcsnWc+7hNHg7aTnn7MRradNWjvcDvY2ZU4HSp9mjAkbTwfsloccRtL80JMqeT cl5g== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=SUUt7i4I; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::102d as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org Original-Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com. [2607:f8b0:4864:20::102d]) by gmr-mx.google.com with ESMTPS id g9si1074015ots.5.2021.07.20.09.19.41 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 20 Jul 2021 09:19:41 -0700 (PDT) Received-SPF: pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::102d as permitted sender) client-ip=2607:f8b0:4864:20::102d; Original-Received: by mail-pj1-x102d.google.com with SMTP id g22-20020a17090a5796b02901763aca3df6so931024pji.5 for ; Tue, 20 Jul 2021 09:19:40 -0700 (PDT) X-Received: by 2002:a17:90a:fb51:: with SMTP id iq17mr36777499pjb.36.1626797980235; Tue, 20 Jul 2021 09:19:40 -0700 (PDT) Original-Received: from johnmacfarlane.net (li55-134.members.linode.com. [74.82.3.134]) by smtp.gmail.com with ESMTPSA id v10sm3292367pjd.29.2021.07.20.09.19.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jul 2021 09:19:38 -0700 (PDT) Original-Received: by johnmacfarlane.net (Postfix, from userid 1000) id 0687CA249; Tue, 20 Jul 2021 12:19:28 -0400 (EDT) In-Reply-To: <7c5a2709-9b84-40b4-a77e-bd3dc5acb50cn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Original-Sender: jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=SUUt7i4I; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::102d as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@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:28858 Archived-At: I guess what you want is for an autocite in a footnote not to include the surrounding parentheses. There's actually no CSL setting that says "omit parentheses." We can have a normal citation (which may have parentheses if that's what the style dictates) or an author-in-text citation (which will typically have parentheses around everything but the author name). So we may not be able to do better here, given the impedance mismatch between biblatex and CSL... Jeffrey T writes: > Hi Bastien, > > I'm working on converting a manuscript for a revise and submit.=20 > Unfortunately I've suddenly encountered a new error with the Pandoc scrip= t=20 > / filter which appears to be isolated to citations that appear in a=20 > footnote but *without* any preceding text. I've attached a minimal workin= g=20 > example. Note the third citation in the example appears to be the culprit= .=20 > Indeed, by adding any arbitrary character in front of \autocite command= =20 > contained within a footnote the conversion seems to work as intended.=20 > > Any suggestions? Is this new error perhaps related to a newer release of= =20 > Pandoc? As always, your expertise and help is greatly appreciated! > > On Wednesday, May 19, 2021 at 3:55:21 AM UTC-4 Bastien Dumont wrote: > >> 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 chang= er=20 >> 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 a= m >> > 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 bod= y. I >> > restricted >> > the scope of the filter to the footnotes, so you should not have error= s >> > 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 f= ile >> > 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 download= ed >> > your Lua >> > > filter (I didn't realize that filters were possible with Pandoc!) an= d >> > included >> > > it in my Pandoc command: >> > > >> > > pandoc --citeproc --lua-filter=3Dremove-parentheses-from-cite.lua=20 >> Test.tex >> > > --bibliography=3Dtestref.bib --csl=3D >> > > chicago-fullnote-bibliography-short-title-subsequent.csl -o test.doc= x >> > > >> > > It worked perfectly for the \cite commands contained within \footnot= e. >> > > Unfortunately the remainder of my book manuscript uses \autocite for >> > references >> > > outside of footnotes. When \autocite is included, I received an erro= r >> > message: >> > > "bad argument #1 to 'gsub' (string expected, got nil)" >> > > >> > > If helpful, I've attached the test .tex file I'm using? Your assista= nce >> > 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 filter >> > > (slightly >> > > modified to adapt it to your needs). I hope that it will work for yo= u. >> > > 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 doc= =20 >> for >> > my >> > > > editor. Using a test .tex file, I have successfully converted the= =20 >> 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 >> > > contained >> > > > within \footnote. In particular, the resulting citation is now pla= ced >> > > within >> > > > parentheses which my editor has asked me to remove. Is there some= =20 >> sort >> > of >> > > > solution to my dilemma? Given the length of the book I fear it wil= l=20 >> be >> > > quite >> > > > tedious to find/remove the offending parentheses manually. >> > > > Thank you in advance! >> > > > >> > > > -- >> > > > 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,= =20 >> send >> > 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 >> > . >> > > >> > > >> > > -- >> > > You received this message because you are subscribed to the Google= =20 >> Groups >> > > "pandoc-discuss" group. >> > > To unsubscribe from this group and stop receiving emails from it, se= nd=20 >> 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 Gro= ups >> > "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/f787dab5-f3ce-41cf-815c-21f24727b781n%40googlegroups.co= m. >> >> > > --=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/7c5a2709-9b84-40b4-a77e-bd3dc5acb50cn%40googlegroups.com. > \documentclass{article} > > \usepackage{markdown}=20 > \usepackage{biblatex-chicago} > > \usepackage{filecontents}% to embed the file `myreferences.bib` in your `= .tex` file > > \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} > > \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 \autocite[6]= {Smith}.} > > 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}.} > > > \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/m27dhl5568.fsf%40MacBook-Pro-2.hsd1.ca.comcast.net.