public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Help: Concatenating multiple md files and footnote duplicates and numbering
@ 2019-10-18 16:59 Joseph Reagle
       [not found] ` <03a2d00d-1ad3-1a97-8abc-797bd12e68a6-T1oY19WcHSwdnm+yROfE0A@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Joseph Reagle @ 2019-10-18 16:59 UTC (permalink / raw)
  To: pandoc-discuss

[-- Attachment #1: Type: text/plain, Size: 1065 bytes --]


If I'm compiling multiple essays (in markdown), with footnotes, into a single resulting doc, pandoc naturally complains of "Duplicate note reference"s. Also the sequence spans the whole doc rather than re-starting at "1" for each essay/chapter. 

Any suggestions?

```
╰─➤  pandoc -s -f markdown -w docx test1.md test2.md -o test.docx
[WARNING] Duplicate note reference '1' at line 35 column 1
[WARNING] Duplicate note reference '2' at line 37 column 1
[WARNING] Duplicate note reference '3' at line 39 column 1
[WARNING] Duplicate note reference '4' at line 41 column 1
[WARNING] Duplicate note reference '5' at line 43 column 1

```

-- 
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/03a2d00d-1ad3-1a97-8abc-797bd12e68a6%40reagle.org.

[-- Attachment #2: test.docx --]
[-- Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document, Size: 13174 bytes --]

[-- Attachment #3: test1.md --]
[-- Type: text/plain, Size: 283 bytes --]

# Doc 1

Doc one Sentence one. [^1]

Doc one Sentence one. [^2]

Doc one Sentence one. [^3]

Doc one Sentence one. [^4]

Doc one Sentence one. [^5]

[^1]: Doc one Footnote 1.

[^2]: Doc one Footnote 2.

[^3]: Doc one Footnote 3.

[^4]: Doc one Footnote 4.

[^5]: Doc one Footnote 5.

[-- Attachment #4: test2.md --]
[-- Type: text/plain, Size: 283 bytes --]

# Doc 2

Doc two Sentence one. [^1]

Doc two Sentence one. [^2]

Doc two Sentence one. [^3]

Doc two Sentence one. [^4]

Doc two Sentence one. [^5]

[^1]: Doc two Footnote 1.

[^2]: Doc two Footnote 2.

[^3]: Doc two Footnote 3.

[^4]: Doc two Footnote 4.

[^5]: Doc two Footnote 5.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Help: Concatenating multiple md files and footnote duplicates and numbering
       [not found] ` <03a2d00d-1ad3-1a97-8abc-797bd12e68a6-T1oY19WcHSwdnm+yROfE0A@public.gmane.org>
@ 2019-10-18 17:09   ` John MacFarlane
       [not found]     ` <m2a79yugjr.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: John MacFarlane @ 2019-10-18 17:09 UTC (permalink / raw)
  To: Joseph Reagle, pandoc-discuss


Try --file-scope?


Joseph Reagle <joseph.2011-T1oY19WcHSwdnm+yROfE0A@public.gmane.org> writes:

> If I'm compiling multiple essays (in markdown), with footnotes, into a single resulting doc, pandoc naturally complains of "Duplicate note reference"s. Also the sequence spans the whole doc rather than re-starting at "1" for each essay/chapter. 
>
> Any suggestions?
>
> ```
> ╰─➤  pandoc -s -f markdown -w docx test1.md test2.md -o test.docx
> [WARNING] Duplicate note reference '1' at line 35 column 1
> [WARNING] Duplicate note reference '2' at line 37 column 1
> [WARNING] Duplicate note reference '3' at line 39 column 1
> [WARNING] Duplicate note reference '4' at line 41 column 1
> [WARNING] Duplicate note reference '5' at line 43 column 1
>
> ```
>
> -- 
> 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/03a2d00d-1ad3-1a97-8abc-797bd12e68a6%40reagle.org.
> # Doc 1
>
> Doc one Sentence one. [^1]
>
> Doc one Sentence one. [^2]
>
> Doc one Sentence one. [^3]
>
> Doc one Sentence one. [^4]
>
> Doc one Sentence one. [^5]
>
> [^1]: Doc one Footnote 1.
>
> [^2]: Doc one Footnote 2.
>
> [^3]: Doc one Footnote 3.
>
> [^4]: Doc one Footnote 4.
>
> [^5]: Doc one Footnote 5.
> # Doc 2
>
> Doc two Sentence one. [^1]
>
> Doc two Sentence one. [^2]
>
> Doc two Sentence one. [^3]
>
> Doc two Sentence one. [^4]
>
> Doc two Sentence one. [^5]
>
> [^1]: Doc two Footnote 1.
>
> [^2]: Doc two Footnote 2.
>
> [^3]: Doc two Footnote 3.
>
> [^4]: Doc two Footnote 4.
>
> [^5]: Doc two Footnote 5.

-- 
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/m2a79yugjr.fsf%40johnmacfarlane.net.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Help: Concatenating multiple md files and footnote duplicates and numbering
       [not found]     ` <m2a79yugjr.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
@ 2019-10-18 17:16       ` Joseph Reagle
       [not found]         ` <8090c370-1211-85c0-5e0a-d557112e2f65-T1oY19WcHSwdnm+yROfE0A@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Joseph Reagle @ 2019-10-18 17:16 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 603 bytes --]


On 10/18/19 1:09 PM, John MacFarlane wrote:
> Try --file-scope?

That's new to me! While that helps with the duplicates/collisions during parsing, it doesn't reset the footnote counter per chapter.

-- 
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/8090c370-1211-85c0-5e0a-d557112e2f65%40reagle.org.

[-- Attachment #2: Screen Shot 2019-10-18 at 1.14.13 PM.png --]
[-- Type: image/png, Size: 63914 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Help: Concatenating multiple md files and footnote duplicates and numbering
       [not found]         ` <8090c370-1211-85c0-5e0a-d557112e2f65-T1oY19WcHSwdnm+yROfE0A@public.gmane.org>
@ 2019-10-20 22:16           ` Denis Maier
       [not found]             ` <3b04d53c-d0ce-47b2-90b4-2a21a98459e7-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Denis Maier @ 2019-10-20 22:16 UTC (permalink / raw)
  To: pandoc-discuss

[-- Attachment #1: Type: text/plain, Size: 72 bytes --]

You will probably have to adjust this in a custom reference docs.
Denis

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Help: Concatenating multiple md files and footnote duplicates and numbering
       [not found]             ` <3b04d53c-d0ce-47b2-90b4-2a21a98459e7-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2019-10-21 12:45               ` Joseph Reagle
  2019-10-21 12:51               ` Joseph Reagle
  1 sibling, 0 replies; 7+ messages in thread
From: Joseph Reagle @ 2019-10-21 12:45 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

On 10/20/19 6:16 PM, Denis Maier wrote:
> You will probably have to adjust this in a custom reference docs.

In Word, you have to (1) set section breaks and (2) then set footnote numbering to "Restart each section."

I know how to add page breaks (below), but I don't how to do section breaks yet -- still investigating.

```{=openxml}
<w:p> <w:r> <w:br w:type="page"/> </w:r> </w:p>
```

I can set the footnote numbering manually on the final document, but it'd be nice if I knew how to do it as part of the template or in some markdown. (I've tried, but no luck so far.)


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Help: Concatenating multiple md files and footnote duplicates and numbering
       [not found]             ` <3b04d53c-d0ce-47b2-90b4-2a21a98459e7-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2019-10-21 12:45               ` Joseph Reagle
@ 2019-10-21 12:51               ` Joseph Reagle
       [not found]                 ` <e39f6d44-445b-5ba8-9e4f-6d14fefa3cb2-T1oY19WcHSwdnm+yROfE0A@public.gmane.org>
  1 sibling, 1 reply; 7+ messages in thread
From: Joseph Reagle @ 2019-10-21 12:51 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw


This is working on my initial experiments.

```{=openxml}
<w:p><w:pPr><w:sectPr><w:type w:val="nextPage" /></w:sectPr></w:pPr></w:p>
<w:footnotePr><w:numRestart w:val="eachSect" /></w:footnotePr>
```


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Help: Concatenating multiple md files and footnote duplicates and numbering
       [not found]                 ` <e39f6d44-445b-5ba8-9e4f-6d14fefa3cb2-T1oY19WcHSwdnm+yROfE0A@public.gmane.org>
@ 2019-10-21 20:13                   ` Joseph Reagle
  0 siblings, 0 replies; 7+ messages in thread
From: Joseph Reagle @ 2019-10-21 20:13 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw


FYI: With the right `section-break.md` file (below), the following command worked nicely for compiling a collection.

'''
pandoc --file-scope -s -f markdown -w docx -o reagle-koerner-wp20.docx `for f in *-*-*.md; do echo $f; echo "section-break.md"; done`
'''


On 10/21/19 8:51 AM, Joseph Reagle wrote:
> This is working on my initial experiments.
> 
> ```{=openxml}
> <w:p><w:pPr><w:sectPr><w:type w:val="nextPage" /></w:sectPr></w:pPr></w:p>
> <w:footnotePr><w:numRestart w:val="eachSect" /></w:footnotePr>
> ```


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-10-21 20:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-18 16:59 Help: Concatenating multiple md files and footnote duplicates and numbering Joseph Reagle
     [not found] ` <03a2d00d-1ad3-1a97-8abc-797bd12e68a6-T1oY19WcHSwdnm+yROfE0A@public.gmane.org>
2019-10-18 17:09   ` John MacFarlane
     [not found]     ` <m2a79yugjr.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2019-10-18 17:16       ` Joseph Reagle
     [not found]         ` <8090c370-1211-85c0-5e0a-d557112e2f65-T1oY19WcHSwdnm+yROfE0A@public.gmane.org>
2019-10-20 22:16           ` Denis Maier
     [not found]             ` <3b04d53c-d0ce-47b2-90b4-2a21a98459e7-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2019-10-21 12:45               ` Joseph Reagle
2019-10-21 12:51               ` Joseph Reagle
     [not found]                 ` <e39f6d44-445b-5ba8-9e4f-6d14fefa3cb2-T1oY19WcHSwdnm+yROfE0A@public.gmane.org>
2019-10-21 20:13                   ` Joseph Reagle

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).