* LaTeX footnote citations parentheses @ 2021-05-15 19:13 Jeffrey T [not found] ` <f4c18da4-6145-4f93-8779-fe2bd2816c38n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 0 siblings, 1 reply; 19+ messages in thread From: Jeffrey T @ 2021-05-15 19:13 UTC (permalink / raw) To: pandoc-discuss [-- Attachment #1.1: Type: text/plain, Size: 1213 bytes --] 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 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=testref.bib --csl=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 placed 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 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, 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/msgid/pandoc-discuss/f4c18da4-6145-4f93-8779-fe2bd2816c38n%40googlegroups.com. [-- Attachment #1.2: Type: text/html, Size: 1697 bytes --] ^ permalink raw reply [flat|nested] 19+ messages in thread
[parent not found: <f4c18da4-6145-4f93-8779-fe2bd2816c38n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>]
* Re: LaTeX footnote citations parentheses [not found] ` <f4c18da4-6145-4f93-8779-fe2bd2816c38n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> @ 2021-05-15 22:04 ` Bastien DUMONT 2021-05-16 1:58 ` Jeffrey T 2021-05-16 3:34 ` Jeffrey T 2021-05-15 23:53 ` John MacFarlane 1 sibling, 2 replies; 19+ messages in thread From: Bastien DUMONT @ 2021-05-15 22:04 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw [-- Attachment #1: Type: text/plain, Size: 2031 bytes --] 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 footnotes. If that it the case, please let me know. Le Saturday 15 May 2021 à 12:13:37PM, Jeffrey T a écrit : > > 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 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=testref.bib --csl= > 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 placed 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 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, 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/msgid/ > pandoc-discuss/f4c18da4-6145-4f93-8779-fe2bd2816c38n%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, 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/msgid/pandoc-discuss/YKBFg75x90nojslz%40localhost. [-- Attachment #2: remove-parentheses-from-cite.lua --] [-- Type: text/plain, Size: 1037 bytes --] local function getLastInnermostElem(elemsList) local lastInnermostElem = elemsList[#elemsList] if not lastInnermostElem.t == "Str" then getLastInnermostElem(lastInnermostElem) end return lastInnermostElem end local function getFirstInnermostElem(elemsList) local firstInnermostElem = elemsList[1] if not firstInnermostElem.t == "Str" then getFirstInnermostElem(firstInnermostElem) end return firstInnermostElem end local function removeTrailingSpace(formattedCitation) if formattedCitation[1].t == "Space" then formattedCitation:remove(1) end end local function removeParentheses(formattedCitation) local lastInnermostElem = getLastInnermostElem(formattedCitation) lastInnermostElem.text = string.gsub(lastInnermostElem.text, "%)$", "") local firstInnermostElem = getFirstInnermostElem(formattedCitation) firstInnermostElem.text = string.gsub(firstInnermostElem.text, "^%(", "") end function Cite(cite) removeTrailingSpace(cite.content) removeParentheses(cite.content) return cite end ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: LaTeX footnote citations parentheses 2021-05-15 22:04 ` Bastien DUMONT @ 2021-05-16 1:58 ` Jeffrey T 2021-05-16 3:34 ` Jeffrey T 1 sibling, 0 replies; 19+ messages in thread From: Jeffrey T @ 2021-05-16 1:58 UTC (permalink / raw) To: pandoc-discuss [-- Attachment #1.1: Type: text/plain, Size: 2812 bytes --] Hi Bastien, Oh my, thank you very much for taking the time to assist! I downloaded your Lua filter (I didn't realize that filters were possible with Pandoc!) and included it in my Pandoc command: pandoc --citeproc --lua-filter=remove-parentheses-from-cite.lua Test.tex --bibliography=testref.bib --csl=chicago-fullnote-bibliography-short-title-subsequent.csl -o test.docx Unfortunately I received an error message: "bad argument #1 to 'gsub' (string expected, got nil)" 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 > footnotes. > If that it the case, please let me know. > > Le Saturday 15 May 2021 à 12:13:37PM, Jeffrey T a écrit : > > > > 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 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=testref.bib --csl= > > 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 placed > 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 > 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, send > 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/f4c18da4-6145-4f93-8779-fe2bd2816c38n%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, 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/msgid/pandoc-discuss/397a966f-3ed9-4ddc-a173-86fbd5466bcfn%40googlegroups.com. [-- Attachment #1.2: Type: text/html, Size: 4065 bytes --] [-- Attachment #2: Test.tex --] [-- Type: application/x-tex, Size: 776 bytes --] ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: LaTeX footnote citations parentheses 2021-05-15 22:04 ` Bastien DUMONT 2021-05-16 1:58 ` Jeffrey T @ 2021-05-16 3:34 ` Jeffrey T [not found] ` <26bec817-c8b4-4d63-ad5d-436aa281c0d7n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 1 sibling, 1 reply; 19+ messages in thread From: Jeffrey T @ 2021-05-16 3:34 UTC (permalink / raw) To: pandoc-discuss [-- Attachment #1.1: Type: text/plain, Size: 3010 bytes --] Hi Bastien, Oh my, thank you very much for taking the time to assist! I downloaded your Lua filter (I didn't realize that filters were possible with Pandoc!) and included it in my Pandoc command: pandoc --citeproc --lua-filter=remove-parentheses-from-cite.lua Test.tex --bibliography=testref.bib --csl=chicago-fullnote-bibliography-short-title-subsequent.csl -o 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 \autocite is included, I received 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 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 you. > 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 à 12:13:37PM, Jeffrey T a écrit : > > > > 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 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=testref.bib --csl= > > 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 placed > 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 > 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, send > 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/f4c18da4-6145-4f93-8779-fe2bd2816c38n%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, 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/msgid/pandoc-discuss/26bec817-c8b4-4d63-ad5d-436aa281c0d7n%40googlegroups.com. [-- Attachment #1.2: Type: text/html, Size: 4481 bytes --] [-- Attachment #2: Test.tex --] [-- Type: application/x-tex, Size: 800 bytes --] ^ permalink raw reply [flat|nested] 19+ messages in thread
[parent not found: <26bec817-c8b4-4d63-ad5d-436aa281c0d7n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>]
* Re: LaTeX footnote citations parentheses [not found] ` <26bec817-c8b4-4d63-ad5d-436aa281c0d7n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> @ 2021-05-16 16:53 ` Bastien DUMONT 2021-05-19 2:21 ` Jeffrey T 0 siblings, 1 reply; 19+ messages in thread From: Bastien DUMONT @ 2021-05-16 16:53 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw [-- Attachment #1: Type: text/plain, Size: 4113 bytes --] 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ĕd that you would also use \autocite in the body. I restricted the scope of the filter to the footnotes, so you should not have errors 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. Le Saturday 15 May 2021 à 08:34:22PM, Jeffrey T a écrit : > Hi Bastien, > > Oh my, thank you very much for taking the time to assist! I downloaded your Lua > filter (I didn't realize that filters were possible with Pandoc!) and included > it in my Pandoc command: > > pandoc --citeproc --lua-filter=remove-parentheses-from-cite.lua Test.tex > --bibliography=testref.bib --csl= > chicago-fullnote-bibliography-short-title-subsequent.csl -o 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 \autocite is included, I received 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 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 you. > 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 à 12:13:37PM, Jeffrey T a écrit : > > > > 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 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=testref.bib --csl= > > 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 placed > 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 > 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, send 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/f4c18da4-6145-4f93-8779-fe2bd2816c38n%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, 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/msgid/ > pandoc-discuss/26bec817-c8b4-4d63-ad5d-436aa281c0d7n%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, 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/msgid/pandoc-discuss/YKFOF9MI2IHxJS4t%40localhost. [-- Attachment #2: remove-parentheses-from-cite.lua --] [-- Type: text/plain, Size: 1157 bytes --] local function getLastInnermostElem(elemsList) local lastInnermostElem = elemsList[#elemsList] if not lastInnermostElem.t == "Str" then getLastInnermostElem(lastInnermostElem) end return lastInnermostElem end local function getFirstInnermostElem(elemsList) local firstInnermostElem = elemsList[1] if not firstInnermostElem.t == "Str" then getFirstInnermostElem(firstInnermostElem) end return firstInnermostElem end local function removeTrailingSpace(formattedCitation) if formattedCitation[1].t == "Space" then formattedCitation:remove(1) end end local function removeParentheses(formattedCitation) local lastInnermostElem = getLastInnermostElem(formattedCitation) lastInnermostElem.text = string.gsub(lastInnermostElem.text, "%)$", "") local firstInnermostElem = getFirstInnermostElem(formattedCitation) firstInnermostElem.text = string.gsub(firstInnermostElem.text, "^%(", "") end local correct_citation = { Cite = function(cite) removeTrailingSpace(cite.content) removeParentheses(cite.content) return cite end } function Note(note) return pandoc.walk_inline(note, correct_citation) end ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: LaTeX footnote citations parentheses 2021-05-16 16:53 ` Bastien DUMONT @ 2021-05-19 2:21 ` Jeffrey T [not found] ` <f787dab5-f3ce-41cf-815c-21f24727b781n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 0 siblings, 1 reply; 19+ messages in thread From: Jeffrey T @ 2021-05-19 2:21 UTC (permalink / raw) To: pandoc-discuss [-- Attachment #1.1: Type: text/plain, Size: 4465 bytes --] Hi Bastien, 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? 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ĕd that you would also use \autocite in the body. I > restricted > the scope of the filter to the footnotes, so you should not have errors > 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. > > Le Saturday 15 May 2021 à 08:34:22PM, Jeffrey T a écrit : > > Hi Bastien, > > > > Oh my, thank you very much for taking the time to assist! I downloaded > your Lua > > filter (I didn't realize that filters were possible with Pandoc!) and > included > > it in my Pandoc command: > > > > pandoc --citeproc --lua-filter=remove-parentheses-from-cite.lua Test.tex > > --bibliography=testref.bib --csl= > > chicago-fullnote-bibliography-short-title-subsequent.csl -o 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 \autocite is included, I received 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 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 you. > > 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 à 12:13:37PM, Jeffrey T a écrit : > > > > > > 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 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=testref.bib --csl= > > > 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 placed > > 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 > > 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, send > 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/f4c18da4-6145-4f93-8779-fe2bd2816c38n% > 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, send > 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. > > > -- 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/msgid/pandoc-discuss/f787dab5-f3ce-41cf-815c-21f24727b781n%40googlegroups.com. [-- Attachment #1.2: Type: text/html, Size: 6660 bytes --] ^ permalink raw reply [flat|nested] 19+ messages in thread
[parent not found: <f787dab5-f3ce-41cf-815c-21f24727b781n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>]
* Re: LaTeX footnote citations parentheses [not found] ` <f787dab5-f3ce-41cf-815c-21f24727b781n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> @ 2021-05-19 7:54 ` Bastien DUMONT 2021-05-21 2:19 ` Jeffrey T 2021-07-19 18:48 ` Jeffrey T 0 siblings, 2 replies; 19+ messages in thread From: Bastien DUMONT @ 2021-05-19 7:54 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw 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 à 07:21:54PM, Jeffrey T a écrit : > > Hi Bastien, > > 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? > > 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ĕd that you would also use \autocite in the body. I > restricted > the scope of the filter to the footnotes, so you should not have errors > 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. > > Le Saturday 15 May 2021 à 08:34:22PM, Jeffrey T a écrit : > > Hi Bastien, > > > > Oh my, thank you very much for taking the time to assist! I downloaded > your Lua > > filter (I didn't realize that filters were possible with Pandoc!) and > included > > it in my Pandoc command: > > > > pandoc --citeproc --lua-filter=remove-parentheses-from-cite.lua Test.tex > > --bibliography=testref.bib --csl= > > chicago-fullnote-bibliography-short-title-subsequent.csl -o 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 \autocite is included, I received 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 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 you. > > 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 à 12:13:37PM, Jeffrey T a écrit : > > > > > > 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 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=testref.bib --csl= > > > 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 placed > > 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 > > 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, send > 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/f4c18da4-6145-4f93-8779-fe2bd2816c38n%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, send 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. > > > > -- > 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/msgid/ > pandoc-discuss/f787dab5-f3ce-41cf-815c-21f24727b781n%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, 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/msgid/pandoc-discuss/YKTESTLThapJ0EAA%40localhost. ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: LaTeX footnote citations parentheses 2021-05-19 7:54 ` Bastien DUMONT @ 2021-05-21 2:19 ` Jeffrey T [not found] ` <deac7562-7f50-4699-9cc6-90a0de0d1b3bn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 2021-07-19 18:48 ` Jeffrey T 1 sibling, 1 reply; 19+ messages in thread From: Jeffrey T @ 2021-05-21 2:19 UTC (permalink / raw) To: pandoc-discuss [-- Attachment #1.1: Type: text/plain, Size: 6892 bytes --] Hi Bastien, Wonderful! The good news is your script appears to work if I use \autocite in body or \autocite in footnotes which is actually perfect because I have a few other documents that use this citation method! That said, assuming I need to make the change from \cite to \autocite for footnotes, I would change Cite = function(cite) to Cite = function(autocite) in the Lua script? Meanwhile, this script has been extremely helpful but I wonder if it can be extended to document class "reports" with both chapters and endnotes? I'm on two grant projects with multiple faculty members and this Lua script could be extremely helpful assuming we need to convert our work into a Word document. I've attached a minimal working example of a report. Unfortunately the Pandoc conversion doesn't quite turn out as desired: (1) it doesn't appear to read the footnotes as endnotes, and (2) the number of endnotes doesn't restart after a new chapter. Being new to Pandoc I'm not sure where the problem lies? I suppose it's not a major issue because we could always use your script on each individual LaTeX chapter, then piece them all together manually into Word? 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 à 07:21:54PM, Jeffrey T a écrit : > > > > Hi Bastien, > > > > 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? > > > > 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ĕd that you would also use \autocite in the body. I > > restricted > > the scope of the filter to the footnotes, so you should not have errors > > 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. > > > > Le Saturday 15 May 2021 à 08:34:22PM, Jeffrey T a écrit : > > > Hi Bastien, > > > > > > Oh my, thank you very much for taking the time to assist! I downloaded > > your Lua > > > filter (I didn't realize that filters were possible with Pandoc!) and > > included > > > it in my Pandoc command: > > > > > > pandoc --citeproc --lua-filter=remove-parentheses-from-cite.lua > Test.tex > > > --bibliography=testref.bib --csl= > > > chicago-fullnote-bibliography-short-title-subsequent.csl -o 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 \autocite is included, I received 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 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 you. > > > 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 à 12:13:37PM, Jeffrey T a écrit : > > > > > > > > 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 > 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=testref.bib --csl= > > > > 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 placed > > > 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 > > > 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, > send > > 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/f4c18da4-6145-4f93-8779-fe2bd2816c38n% > 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, send > 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. > > > > > > > > -- > > 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...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To view this discussion on the web visit > https://groups.google.com/d/msgid/ > > pandoc-discuss/f787dab5-f3ce-41cf-815c-21f24727b781n%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, 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/msgid/pandoc-discuss/deac7562-7f50-4699-9cc6-90a0de0d1b3bn%40googlegroups.com. [-- Attachment #1.2: Type: text/html, Size: 10549 bytes --] [-- Attachment #2: Report.tex --] [-- Type: application/x-tex, Size: 821 bytes --] ^ permalink raw reply [flat|nested] 19+ messages in thread
[parent not found: <deac7562-7f50-4699-9cc6-90a0de0d1b3bn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>]
* Re: LaTeX footnote citations parentheses [not found] ` <deac7562-7f50-4699-9cc6-90a0de0d1b3bn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> @ 2021-05-21 6:00 ` Bastien DUMONT 2021-05-25 21:27 ` Jeffrey T 0 siblings, 1 reply; 19+ messages in thread From: Bastien DUMONT @ 2021-05-21 6:00 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw Hi, To see wether the script will work or not, you can convert your file or a sample to Pandoc Markdown. The citation key must always appear inside brackets, wether it be in a footnote or not. So in the following example: pandoc -t markdown -f latex <<< '\cite{key} \autocite{key} \footnote{\cite{key} \autocite{key}}' [@key] [@key] [^1] [^1]: [@key] [@key] you can see that all the conditions are met. Pandoc makes no difference between \cite and \autocite. As long as it works, you don't have to modify the filter. Changing "cite" to "autocite" won't do anything, it's only an arbitrary variable name that point to an object of type "Cite" in Pandoc's internal representation of the document. The script is only concerned with removing parentheses around citations. In order to convert your footnotes to endnotes and to reset the numeration, you will have to use Word's utilities. To my knowledge, Pandoc itself makes no distinction between footnotes and endnotes and handles notes as footnotes by default. Le Thursday 20 May 2021 à 07:19:55PM, Jeffrey T a écrit : > Hi Bastien, > > Wonderful! The good news is your script appears to work if I use \autocite in > body or \autocite in footnotes which is actually perfect because I have a few > other documents that use this citation method! That said, assuming I need to > make the change from \cite to \autocite for footnotes, I would change Cite = > function(cite) to Cite = function(autocite) in the Lua script? > > Meanwhile, this script has been extremely helpful but I wonder if it can be > extended to document class "reports" with both chapters and endnotes? I'm on > two grant projects with multiple faculty members and this Lua script could be > extremely helpful assuming we need to convert our work into a Word document. > I've attached a minimal working example of a report. Unfortunately the Pandoc > conversion doesn't quite turn out as desired: (1) it doesn't appear to read the > footnotes as endnotes, and (2) the number of endnotes doesn't restart after a > new chapter. Being new to Pandoc I'm not sure where the problem lies? I suppose > it's not a major issue because we could always use your script on each > individual LaTeX chapter, then piece them all together manually into Word? > > 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 à 07:21:54PM, Jeffrey T a écrit : > > > > Hi Bastien, > > > > 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? > > > > 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ĕd that you would also use \autocite in the body. I > > restricted > > the scope of the filter to the footnotes, so you should not have errors > > 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. > > > > Le Saturday 15 May 2021 à 08:34:22PM, Jeffrey T a écrit : > > > Hi Bastien, > > > > > > Oh my, thank you very much for taking the time to assist! I downloaded > > your Lua > > > filter (I didn't realize that filters were possible with Pandoc!) and > > included > > > it in my Pandoc command: > > > > > > pandoc --citeproc --lua-filter=remove-parentheses-from-cite.lua > Test.tex > > > --bibliography=testref.bib --csl= > > > chicago-fullnote-bibliography-short-title-subsequent.csl -o 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 \autocite is included, I received 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 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 you. > > > 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 à 12:13:37PM, Jeffrey T a écrit : > > > > > > > > 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 > 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=testref.bib --csl= > > > > 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 placed > > > 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 > > > 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, > send > > 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/f4c18da4-6145-4f93-8779-fe2bd2816c38n% > 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, send > 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 > . > > > > > > > > -- > > 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...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To view this discussion on the web visit https://groups.google.com/d/ > msgid/ > > pandoc-discuss/f787dab5-f3ce-41cf-815c-21f24727b781n%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, 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/msgid/ > pandoc-discuss/deac7562-7f50-4699-9cc6-90a0de0d1b3bn%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, 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/msgid/pandoc-discuss/YKdMfbS2kSXj%2BhIJ%40localhost. ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: LaTeX footnote citations parentheses 2021-05-21 6:00 ` Bastien DUMONT @ 2021-05-25 21:27 ` Jeffrey T 0 siblings, 0 replies; 19+ messages in thread From: Jeffrey T @ 2021-05-25 21:27 UTC (permalink / raw) To: pandoc-discuss [-- Attachment #1.1: Type: text/plain, Size: 9079 bytes --] Sounds good! Thank you again for all your help! On Friday, May 21, 2021 at 2:01:04 AM UTC-4 Bastien Dumont wrote: > Hi, > > To see wether the script will work or not, you can convert your file or a > sample to Pandoc Markdown. The citation key must always appear inside > brackets, > wether it be in a footnote or not. So in the following example: > > pandoc -t markdown -f latex <<< '\cite{key} \autocite{key} > \footnote{\cite{key} \autocite{key}}' > > [@key] [@key] [^1] > > [^1]: [@key] [@key] > > you can see that all the conditions are met. Pandoc makes no difference > between > \cite and \autocite. > > As long as it works, you don't have to modify the filter. Changing "cite" > to > "autocite" won't do anything, it's only an arbitrary variable name that > point > to an object of type "Cite" in Pandoc's internal representation of the > document. > > The script is only concerned with removing parentheses around citations. In > order to convert your footnotes to endnotes and to reset the numeration, > you > will have to use Word's utilities. To my knowledge, Pandoc itself makes no > distinction between footnotes and endnotes and handles notes as footnotes > by > default. > > > Le Thursday 20 May 2021 à 07:19:55PM, Jeffrey T a écrit : > > Hi Bastien, > > > > Wonderful! The good news is your script appears to work if I use > \autocite in > > body or \autocite in footnotes which is actually perfect because I have > a few > > other documents that use this citation method! That said, assuming I > need to > > make the change from \cite to \autocite for footnotes, I would change > Cite = > > function(cite) to Cite = function(autocite) in the Lua script? > > > > Meanwhile, this script has been extremely helpful but I wonder if it can > be > > extended to document class "reports" with both chapters and endnotes? > I'm on > > two grant projects with multiple faculty members and this Lua script > could be > > extremely helpful assuming we need to convert our work into a Word > document. > > I've attached a minimal working example of a report. Unfortunately the > Pandoc > > conversion doesn't quite turn out as desired: (1) it doesn't appear to > read the > > footnotes as endnotes, and (2) the number of endnotes doesn't restart > after a > > new chapter. Being new to Pandoc I'm not sure where the problem lies? I > suppose > > it's not a major issue because we could always use your script on each > > individual LaTeX chapter, then piece them all together manually into > Word? > > > > 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 à 07:21:54PM, Jeffrey T a écrit : > > > > > > Hi Bastien, > > > > > > 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? > > > > > > 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ĕd that you would also use \autocite in the body. I > > > restricted > > > the scope of the filter to the footnotes, so you should not have errors > > > 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. > > > > > > Le Saturday 15 May 2021 à 08:34:22PM, Jeffrey T a écrit : > > > > Hi Bastien, > > > > > > > > Oh my, thank you very much for taking the time to assist! I > downloaded > > > your Lua > > > > filter (I didn't realize that filters were possible with Pandoc!) and > > > included > > > > it in my Pandoc command: > > > > > > > > pandoc --citeproc --lua-filter=remove-parentheses-from-cite.lua > > Test.tex > > > > --bibliography=testref.bib --csl= > > > > chicago-fullnote-bibliography-short-title-subsequent.csl -o 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 \autocite is included, I received 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 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 > you. > > > > 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 à 12:13:37PM, Jeffrey T a écrit : > > > > > > > > > > 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 > > 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=testref.bib --csl= > > > > > 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 > placed > > > > 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 > > > > 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, > > send > > > 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/f4c18da4-6145-4f93-8779-fe2bd2816c38n% > > 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, > send > > 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 > > . > > > > > > > > > > > > -- > > > 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...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > > To view this discussion on the web visit https://groups.google.com/d/ > > msgid/ > > > pandoc-discuss/f787dab5-f3ce-41cf-815c-21f24727b781n% > 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, send > 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/deac7562-7f50-4699-9cc6-90a0de0d1b3bn%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, 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/msgid/pandoc-discuss/dd806b11-4b4f-46e7-9acc-7233828107adn%40googlegroups.com. [-- Attachment #1.2: Type: text/html, Size: 13829 bytes --] ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: LaTeX footnote citations parentheses 2021-05-19 7:54 ` Bastien DUMONT 2021-05-21 2:19 ` Jeffrey T @ 2021-07-19 18:48 ` Jeffrey T [not found] ` <7c5a2709-9b84-40b4-a77e-bd3dc5acb50cn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 1 sibling, 1 reply; 19+ messages in thread From: Jeffrey T @ 2021-07-19 18:48 UTC (permalink / raw) To: pandoc-discuss [-- Attachment #1.1: Type: text/plain, Size: 6369 bytes --] Hi Bastien, I'm working on converting a manuscript for a revise and submit. Unfortunately I've suddenly encountered a new error with the Pandoc script / filter which 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 footnote the conversion seems to work as intended. Any suggestions? Is this new error perhaps related to a newer release of 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 à 07:21:54PM, Jeffrey T a écrit : > > > > Hi Bastien, > > > > 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? > > > > 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ĕd that you would also use \autocite in the body. I > > restricted > > the scope of the filter to the footnotes, so you should not have errors > > 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. > > > > Le Saturday 15 May 2021 à 08:34:22PM, Jeffrey T a écrit : > > > Hi Bastien, > > > > > > Oh my, thank you very much for taking the time to assist! I downloaded > > your Lua > > > filter (I didn't realize that filters were possible with Pandoc!) and > > included > > > it in my Pandoc command: > > > > > > pandoc --citeproc --lua-filter=remove-parentheses-from-cite.lua > Test.tex > > > --bibliography=testref.bib --csl= > > > chicago-fullnote-bibliography-short-title-subsequent.csl -o 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 \autocite is included, I received 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 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 you. > > > 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 à 12:13:37PM, Jeffrey T a écrit : > > > > > > > > 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 > 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=testref.bib --csl= > > > > 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 placed > > > 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 > > > 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, > send > > 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/f4c18da4-6145-4f93-8779-fe2bd2816c38n% > 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, send > 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. > > > > > > > > -- > > 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...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To view this discussion on the web visit > https://groups.google.com/d/msgid/ > > pandoc-discuss/f787dab5-f3ce-41cf-815c-21f24727b781n%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, 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/msgid/pandoc-discuss/7c5a2709-9b84-40b4-a77e-bd3dc5acb50cn%40googlegroups.com. [-- Attachment #1.2: Type: text/html, Size: 9782 bytes --] [-- Attachment #2: Test.tex --] [-- Type: text/x-tex, Size: 962 bytes --] \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 Something}, 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 \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{Smith}.} \end{document} ^ permalink raw reply [flat|nested] 19+ messages in thread
[parent not found: <7c5a2709-9b84-40b4-a77e-bd3dc5acb50cn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>]
* Re: LaTeX footnote citations parentheses [not found] ` <7c5a2709-9b84-40b4-a77e-bd3dc5acb50cn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> @ 2021-07-20 16:19 ` John MacFarlane [not found] ` <m27dhl5568.fsf-jF64zX8BO0+FqBokazbCQ6OPv3vYUT2dxr7GGTnW70NeoWH0uzbU5w@public.gmane.org> 2021-08-02 14:25 ` Bastien DUMONT 1 sibling, 1 reply; 19+ messages in thread From: John MacFarlane @ 2021-07-20 16:19 UTC (permalink / raw) To: Jeffrey T, pandoc-discuss 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 <jefftreistman-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes: > Hi Bastien, > > I'm working on converting a manuscript for a revise and submit. > Unfortunately I've suddenly encountered a new error with the Pandoc script > / filter which 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 footnote the conversion seems to work as intended. > > Any suggestions? Is this new error perhaps related to a newer release of > 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 à 07:21:54PM, Jeffrey T a écrit : >> > >> > Hi Bastien, >> > >> > 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? >> > >> > 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ĕd that you would also use \autocite in the body. I >> > restricted >> > the scope of the filter to the footnotes, so you should not have errors >> > 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. >> > >> > Le Saturday 15 May 2021 à 08:34:22PM, Jeffrey T a écrit : >> > > Hi Bastien, >> > > >> > > Oh my, thank you very much for taking the time to assist! I downloaded >> > your Lua >> > > filter (I didn't realize that filters were possible with Pandoc!) and >> > included >> > > it in my Pandoc command: >> > > >> > > pandoc --citeproc --lua-filter=remove-parentheses-from-cite.lua >> Test.tex >> > > --bibliography=testref.bib --csl= >> > > chicago-fullnote-bibliography-short-title-subsequent.csl -o 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 \autocite is included, I received 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 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 you. >> > > 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 à 12:13:37PM, Jeffrey T a écrit : >> > > > >> > > > 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 >> 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=testref.bib --csl= >> > > > 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 placed >> > > 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 >> > > 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, >> send >> > 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/f4c18da4-6145-4f93-8779-fe2bd2816c38n% >> 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, send >> 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. >> > >> > >> > >> > -- >> > 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...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> > To view this discussion on the web visit >> https://groups.google.com/d/msgid/ >> > pandoc-discuss/f787dab5-f3ce-41cf-815c-21f24727b781n%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, 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/msgid/pandoc-discuss/7c5a2709-9b84-40b4-a77e-bd3dc5acb50cn%40googlegroups.com. > \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 Something}, > 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 \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{Smith}.} > > > \end{document} -- 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/msgid/pandoc-discuss/m27dhl5568.fsf%40MacBook-Pro-2.hsd1.ca.comcast.net. ^ permalink raw reply [flat|nested] 19+ messages in thread
[parent not found: <m27dhl5568.fsf-jF64zX8BO0+FqBokazbCQ6OPv3vYUT2dxr7GGTnW70NeoWH0uzbU5w@public.gmane.org>]
* Re: LaTeX footnote citations parentheses [not found] ` <m27dhl5568.fsf-jF64zX8BO0+FqBokazbCQ6OPv3vYUT2dxr7GGTnW70NeoWH0uzbU5w@public.gmane.org> @ 2021-07-20 17:44 ` Jeffrey T [not found] ` <daaa9fdd-787c-4a51-bde0-c307396fd835n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 0 siblings, 1 reply; 19+ messages in thread From: Jeffrey T @ 2021-07-20 17:44 UTC (permalink / raw) To: pandoc-discuss [-- Attachment #1.1: Type: text/plain, Size: 9836 bytes --] Hi John, Thank you for the reply! I've been trying to get Bastien's Lua filter to work again and think I may have discovered the issue... Since the filter had always worked until recently, I suspected the problem may have something to do with a Pandoc update. So I uninstalled the most recent version of Pandoc and re-installed version 2.13. This appears to have fixed the issue and everything is working as intended! Not sure why the newer releases are incompatible or causing issues? Regardless, I saved the installation package for 2.13 for future use! That said, it sounds like the best method of using Pandoc is with markdown? On Tuesday, July 20, 2021 at 12:19:43 PM UTC-4 John MacFarlane wrote: > > 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 <jefftr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes: > > > Hi Bastien, > > > > I'm working on converting a manuscript for a revise and submit. > > Unfortunately I've suddenly encountered a new error with the Pandoc > script > > / filter which 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 footnote the conversion seems to work as intended. > > > > Any suggestions? Is this new error perhaps related to a newer release of > > 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 à 07:21:54PM, Jeffrey T a écrit : > >> > > >> > Hi Bastien, > >> > > >> > 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? > >> > > >> > 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ĕd that you would also use \autocite in the body. I > >> > restricted > >> > the scope of the filter to the footnotes, so you should not have > errors > >> > 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. > >> > > >> > Le Saturday 15 May 2021 à 08:34:22PM, Jeffrey T a écrit : > >> > > Hi Bastien, > >> > > > >> > > Oh my, thank you very much for taking the time to assist! I > downloaded > >> > your Lua > >> > > filter (I didn't realize that filters were possible with Pandoc!) > and > >> > included > >> > > it in my Pandoc command: > >> > > > >> > > pandoc --citeproc --lua-filter=remove-parentheses-from-cite.lua > >> Test.tex > >> > > --bibliography=testref.bib --csl= > >> > > chicago-fullnote-bibliography-short-title-subsequent.csl -o > 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 \autocite is included, I received 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 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 > you. > >> > > 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 à 12:13:37PM, Jeffrey T a écrit : > >> > > > > >> > > > 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 > >> 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=testref.bib --csl= > >> > > > 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 > placed > >> > > 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 > >> > > 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, > >> send > >> > 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/f4c18da4-6145-4f93-8779-fe2bd2816c38n% > >> 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, > send > >> 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. > >> > > >> > > >> > > >> > -- > >> > 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...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > >> > To view this discussion on the web visit > >> https://groups.google.com/d/msgid/ > >> > pandoc-discuss/f787dab5-f3ce-41cf-815c-21f24727b781n% > 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, send > 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/7c5a2709-9b84-40b4-a77e-bd3dc5acb50cn%40googlegroups.com > . > > \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 Something}, > > 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 > \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{Smith}.} > > > > > > \end{document} > -- 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/msgid/pandoc-discuss/daaa9fdd-787c-4a51-bde0-c307396fd835n%40googlegroups.com. [-- Attachment #1.2: Type: text/html, Size: 14505 bytes --] ^ permalink raw reply [flat|nested] 19+ messages in thread
[parent not found: <daaa9fdd-787c-4a51-bde0-c307396fd835n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>]
* Re: LaTeX footnote citations parentheses [not found] ` <daaa9fdd-787c-4a51-bde0-c307396fd835n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> @ 2021-08-02 9:59 ` Bastien DUMONT 0 siblings, 0 replies; 19+ messages in thread From: Bastien DUMONT @ 2021-08-02 9:59 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw Hi, I just returned from an internet-free stay in a bucolic region of France. As this issue with the last upgrade may impact my own workflow, I probably will look into it and give you a notice if I find a solution. Best, Bastien Le Tuesday 20 July 2021 à 10:44:14AM, Jeffrey T a écrit : > Hi John, > > Thank you for the reply! > > I've been trying to get Bastien's Lua filter to work again and think I may have > discovered the issue... Since the filter had always worked until recently, I > suspected the problem may have something to do with a Pandoc update. So I > uninstalled the most recent version of Pandoc and re-installed version 2.13. > This appears to have fixed the issue and everything is working as intended! Not > sure why the newer releases are incompatible or causing issues? Regardless, I > saved the installation package for 2.13 for future use! > > That said, it sounds like the best method of using Pandoc is with markdown? > > On Tuesday, July 20, 2021 at 12:19:43 PM UTC-4 John MacFarlane wrote: > > > 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 <jefftr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes: > > > Hi Bastien, > > > > I'm working on converting a manuscript for a revise and submit. > > Unfortunately I've suddenly encountered a new error with the Pandoc > script > > / filter which 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 footnote the conversion seems to work as intended. > > > > Any suggestions? Is this new error perhaps related to a newer release of > > 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 à 07:21:54PM, Jeffrey T a écrit : > >> > > >> > Hi Bastien, > >> > > >> > 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? > >> > > >> > 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ĕd that you would also use \autocite in the body. I > >> > restricted > >> > the scope of the filter to the footnotes, so you should not have > errors > >> > 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. > >> > > >> > Le Saturday 15 May 2021 à 08:34:22PM, Jeffrey T a écrit : > >> > > Hi Bastien, > >> > > > >> > > Oh my, thank you very much for taking the time to assist! I > downloaded > >> > your Lua > >> > > filter (I didn't realize that filters were possible with Pandoc!) > and > >> > included > >> > > it in my Pandoc command: > >> > > > >> > > pandoc --citeproc --lua-filter=remove-parentheses-from-cite.lua > >> Test.tex > >> > > --bibliography=testref.bib --csl= > >> > > chicago-fullnote-bibliography-short-title-subsequent.csl -o > 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 \autocite is included, I received 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 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 > you. > >> > > 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 à 12:13:37PM, Jeffrey T a écrit : > >> > > > > >> > > > 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 > >> 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=testref.bib --csl= > >> > > > 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 > placed > >> > > 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 > >> > > 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, > >> send > >> > an > >> > > email > >> > > > to pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > >> > > > To view this discussion on the web visit > >> [1]https://groups.google.com/d/ > >> > > msgid/ > >> > > > pandoc-discuss/f4c18da4-6145-4f93-8779-fe2bd2816c38n% > >> [2]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, > 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, send > >> an email > >> > to pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > >> > To view this discussion on the web visit > >> [5]https://groups.google.com/d/msgid/ > >> > pandoc-discuss/f787dab5-f3ce-41cf-815c-21f24727b781n%[6] > 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, send an > email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To view this discussion on the web visit [7]https://groups.google.com/d/ > msgid/pandoc-discuss/ > 7c5a2709-9b84-40b4-a77e-bd3dc5acb50cn%40googlegroups.com. > > \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 Something}, > > 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 \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 > {Smith}.} > > > > > > \end{document} > > -- > 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 [8]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit [9]https://groups.google.com/d/msgid/ > pandoc-discuss/daaa9fdd-787c-4a51-bde0-c307396fd835n%40googlegroups.com. > > References: > > [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] https://groups.google.com/d/msgid/pandoc-discuss/7c5a2709-9b84-40b4-a77e-bd3dc5acb50cn%40googlegroups.com > [8] mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > [9] https://groups.google.com/d/msgid/pandoc-discuss/daaa9fdd-787c-4a51-bde0-c307396fd835n%40googlegroups.com?utm_medium=email&utm_source=footer -- 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/msgid/pandoc-discuss/YQfCHT7GWWZfPZtv%40localhost. ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: LaTeX footnote citations parentheses [not found] ` <7c5a2709-9b84-40b4-a77e-bd3dc5acb50cn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 2021-07-20 16:19 ` John MacFarlane @ 2021-08-02 14:25 ` Bastien DUMONT 1 sibling, 0 replies; 19+ messages in thread From: Bastien DUMONT @ 2021-08-02 14:25 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw 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 à 11:48:57AM, Jeffrey T a écrit : > Hi Bastien, > > I'm working on converting a manuscript for a revise and submit. Unfortunately > I've suddenly encountered a new error with the Pandoc script / filter which > 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 footnote > the conversion seems to work as intended. > > Any suggestions? Is this new error perhaps related to a newer release of > 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 à 07:21:54PM, Jeffrey T a écrit : > > > > Hi Bastien, > > > > 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? > > > > 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ĕd that you would also use \autocite in the body. I > > restricted > > the scope of the filter to the footnotes, so you should not have errors > > 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. > > > > Le Saturday 15 May 2021 à 08:34:22PM, Jeffrey T a écrit : > > > Hi Bastien, > > > > > > Oh my, thank you very much for taking the time to assist! I downloaded > > your Lua > > > filter (I didn't realize that filters were possible with Pandoc!) and > > included > > > it in my Pandoc command: > > > > > > pandoc --citeproc --lua-filter=remove-parentheses-from-cite.lua > Test.tex > > > --bibliography=testref.bib --csl= > > > chicago-fullnote-bibliography-short-title-subsequent.csl -o 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 \autocite is included, I received 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 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 you. > > > 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 à 12:13:37PM, Jeffrey T a écrit : > > > > > > > > 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 > 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=testref.bib --csl= > > > > 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 placed > > > 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 > > > 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, > send > > an > > > email > > > > to pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > > > To view this discussion on the web visit [1]https://groups.google.com > /d/ > > > msgid/ > > > > pandoc-discuss/f4c18da4-6145-4f93-8779-fe2bd2816c38n%[2] > 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, 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, send an > email > > to pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To view this discussion on the web visit [5]https://groups.google.com/d/ > msgid/ > > pandoc-discuss/f787dab5-f3ce-41cf-815c-21f24727b781n%[6] > 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, 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/msgid/ > pandoc-discuss/7c5a2709-9b84-40b4-a77e-bd3dc5acb50cn%40googlegroups.com. > > References: > > [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-a77e-bd3dc5acb50cn%40googlegroups.com?utm_medium=email&utm_source=footer > \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 Something}, > 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 \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{Smith}.} > > > \end{document} -- 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/msgid/pandoc-discuss/YQgAT5zZE1YUHTg8%40localhost. ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: LaTeX footnote citations parentheses [not found] ` <f4c18da4-6145-4f93-8779-fe2bd2816c38n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 2021-05-15 22:04 ` Bastien DUMONT @ 2021-05-15 23:53 ` John MacFarlane [not found] ` <m2k0nzmu47.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org> 1 sibling, 1 reply; 19+ messages in thread From: John MacFarlane @ 2021-05-15 23:53 UTC (permalink / raw) To: Jeffrey T, pandoc-discuss Try using the @cite form rather than the [@cite] form inside the footnote. Jeffrey T <jefftreistman-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes: > 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 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=testref.bib > --csl=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 placed > 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 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, 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/msgid/pandoc-discuss/f4c18da4-6145-4f93-8779-fe2bd2816c38n%40googlegroups.com. ^ permalink raw reply [flat|nested] 19+ messages in thread
[parent not found: <m2k0nzmu47.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>]
* Re: LaTeX footnote citations parentheses [not found] ` <m2k0nzmu47.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org> @ 2021-05-16 2:05 ` Jeffrey T 2021-05-16 2:37 ` Jeffrey T 1 sibling, 0 replies; 19+ messages in thread From: Jeffrey T @ 2021-05-16 2:05 UTC (permalink / raw) To: pandoc-discuss [-- Attachment #1.1: Type: text/plain, Size: 2125 bytes --] Hi John, I'm admittedly unfamiliar with @cite or [@cite] commands, but obviously differs from my \cite command. How would I input your suggested commands in my LaTex editor? Thanks! On Saturday, May 15, 2021 at 7:53:59 PM UTC-4 John MacFarlane wrote: > > Try using the @cite form rather than the [@cite] form inside the > footnote. > > Jeffrey T <jefftr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes: > > > 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 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=testref.bib > > --csl=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 placed > > 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 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, send > 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/f4c18da4-6145-4f93-8779-fe2bd2816c38n%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, 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/msgid/pandoc-discuss/14a32028-477f-4fa2-b821-eb21a2df7512n%40googlegroups.com. [-- Attachment #1.2: Type: text/html, Size: 3391 bytes --] ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: LaTeX footnote citations parentheses [not found] ` <m2k0nzmu47.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org> 2021-05-16 2:05 ` Jeffrey T @ 2021-05-16 2:37 ` Jeffrey T [not found] ` <b1d2d845-7dd8-4b3d-a059-9562bfb89d2fn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 1 sibling, 1 reply; 19+ messages in thread From: Jeffrey T @ 2021-05-16 2:37 UTC (permalink / raw) To: pandoc-discuss [-- Attachment #1.1: Type: text/plain, Size: 2340 bytes --] Hi John, Thank you for the reply! I'm admittedly unfamiliar with @cite or [@cite] commands, but from my *very* limited familiarity I believe these commands are related to markdown and not LaTeX? Can I simply enter these commands in LaTeX and allow Pandoc to somehow do the work? Alternatively, does this suggest I need to first convert my LaTeX file to markdown, then markdown to Word? Thanks! On Saturday, May 15, 2021 at 7:53:59 PM UTC-4 John MacFarlane wrote: > > Try using the @cite form rather than the [@cite] form inside the > footnote. > > Jeffrey T <jefftr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes: > > > 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 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=testref.bib > > --csl=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 placed > > 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 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, send > 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/f4c18da4-6145-4f93-8779-fe2bd2816c38n%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, 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/msgid/pandoc-discuss/b1d2d845-7dd8-4b3d-a059-9562bfb89d2fn%40googlegroups.com. [-- Attachment #1.2: Type: text/html, Size: 3589 bytes --] ^ permalink raw reply [flat|nested] 19+ messages in thread
[parent not found: <b1d2d845-7dd8-4b3d-a059-9562bfb89d2fn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>]
* Re: LaTeX footnote citations parentheses [not found] ` <b1d2d845-7dd8-4b3d-a059-9562bfb89d2fn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> @ 2021-05-16 19:41 ` John MacFarlane 0 siblings, 0 replies; 19+ messages in thread From: John MacFarlane @ 2021-05-16 19:41 UTC (permalink / raw) To: Jeffrey T, pandoc-discuss Sorry, I'd mistakenly assumed you were using pandoc markdown; if you're using LaTeX, my comment doesn't apply. Jeffrey T <jefftreistman-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes: > Hi John, > > Thank you for the reply! > > I'm admittedly unfamiliar with @cite or [@cite] commands, but from my *very* > limited familiarity I believe these commands are related to markdown and > not LaTeX? Can I simply enter these commands in LaTeX and allow Pandoc to > somehow do the work? Alternatively, does this suggest I need to first > convert my LaTeX file to markdown, then markdown to Word? > > Thanks! > > > On Saturday, May 15, 2021 at 7:53:59 PM UTC-4 John MacFarlane wrote: > >> >> Try using the @cite form rather than the [@cite] form inside the >> footnote. >> >> Jeffrey T <jefftr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes: >> >> > 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 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=testref.bib >> > --csl=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 placed >> > 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 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, send >> 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/f4c18da4-6145-4f93-8779-fe2bd2816c38n%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, 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/msgid/pandoc-discuss/b1d2d845-7dd8-4b3d-a059-9562bfb89d2fn%40googlegroups.com. ^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2021-08-02 14:25 UTC | newest] Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-05-15 19:13 LaTeX footnote citations parentheses Jeffrey T [not found] ` <f4c18da4-6145-4f93-8779-fe2bd2816c38n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 2021-05-15 22:04 ` Bastien DUMONT 2021-05-16 1:58 ` Jeffrey T 2021-05-16 3:34 ` Jeffrey T [not found] ` <26bec817-c8b4-4d63-ad5d-436aa281c0d7n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 2021-05-16 16:53 ` Bastien DUMONT 2021-05-19 2:21 ` Jeffrey T [not found] ` <f787dab5-f3ce-41cf-815c-21f24727b781n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 2021-05-19 7:54 ` Bastien DUMONT 2021-05-21 2:19 ` Jeffrey T [not found] ` <deac7562-7f50-4699-9cc6-90a0de0d1b3bn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 2021-05-21 6:00 ` Bastien DUMONT 2021-05-25 21:27 ` Jeffrey T 2021-07-19 18:48 ` Jeffrey T [not found] ` <7c5a2709-9b84-40b4-a77e-bd3dc5acb50cn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 2021-07-20 16:19 ` John MacFarlane [not found] ` <m27dhl5568.fsf-jF64zX8BO0+FqBokazbCQ6OPv3vYUT2dxr7GGTnW70NeoWH0uzbU5w@public.gmane.org> 2021-07-20 17:44 ` Jeffrey T [not found] ` <daaa9fdd-787c-4a51-bde0-c307396fd835n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 2021-08-02 9:59 ` Bastien DUMONT 2021-08-02 14:25 ` Bastien DUMONT 2021-05-15 23:53 ` John MacFarlane [not found] ` <m2k0nzmu47.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org> 2021-05-16 2:05 ` Jeffrey T 2021-05-16 2:37 ` Jeffrey T [not found] ` <b1d2d845-7dd8-4b3d-a059-9562bfb89d2fn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 2021-05-16 19:41 ` John MacFarlane
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).