public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Reference Sections in Other Files
@ 2013-10-14 16:56 Jeff Allen
       [not found] ` <a5a47e2e-aeaf-45c8-9ee1-6dd99306d060-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Jeff Allen @ 2013-10-14 16:56 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

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

I'm writing up some documentation in Markdown and have been using Pandoc to 
generate PDFs from these. We'd also like to generate HTML files, but may 
want to partition those up by chapter, for instance. We imagine having the 
following three types of documentation:


   1. Unified PDF of all chapters
   2. Unified HTML of all chapters
   3. Segmented HTML, one HTML file per chapter.

The problem I'm having is that, when rendering each chapter independently 
(#3), any inter-chapter references, such as:

chapter1.md:
# Chapter 1

## Section A

Blah blah, see [Section B]...

chapter2.md:
# Chapter 2

## Section B

aren't properly rendered, as pandoc isn't aware of "Section B" while 
rendering `chapter1.md`. Is there a viable work-around to this issue? I've 
considered adding explicit references to each link (`[Section 
B][./chapter2.html#Section_B]`) but that will obviously only work in HTML 
documents, and only if we do end up partitioning them by chapter...

Thanks,
Jeff

-- 
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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/a5a47e2e-aeaf-45c8-9ee1-6dd99306d060%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

[-- Attachment #2: Type: text/html, Size: 2196 bytes --]

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

* Re: Reference Sections in Other Files
       [not found] ` <a5a47e2e-aeaf-45c8-9ee1-6dd99306d060-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2013-10-14 17:48   ` John MacFarlane
  0 siblings, 0 replies; 2+ messages in thread
From: John MacFarlane @ 2013-10-14 17:48 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

You'd have to use some custom code to do the splitting into
chapters and rewriting of references.  (The EPUB writer does something
like this, since it splits the document into smaller chunks.)

An alternative might be to use pandoc to produce docbook, which
can be transformed into segmented HTML.

+++ Jeff Allen [Oct 14 13 09:56 ]:
> I'm writing up some documentation in Markdown and have been using Pandoc to 
> generate PDFs from these. We'd also like to generate HTML files, but may 
> want to partition those up by chapter, for instance. We imagine having the 
> following three types of documentation:
> 
> 
>    1. Unified PDF of all chapters
>    2. Unified HTML of all chapters
>    3. Segmented HTML, one HTML file per chapter.
> 
> The problem I'm having is that, when rendering each chapter independently 
> (#3), any inter-chapter references, such as:
> 
> chapter1.md:
> # Chapter 1
> 
> ## Section A
> 
> Blah blah, see [Section B]...
> 
> chapter2.md:
> # Chapter 2
> 
> ## Section B
> 
> aren't properly rendered, as pandoc isn't aware of "Section B" while 
> rendering `chapter1.md`. Is there a viable work-around to this issue? I've 
> considered adding explicit references to each link (`[Section 
> B][./chapter2.html#Section_B]`) but that will obviously only work in HTML 
> documents, and only if we do end up partitioning them by chapter...
> 
> Thanks,
> Jeff
> 
> -- 
> 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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/a5a47e2e-aeaf-45c8-9ee1-6dd99306d060%40googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.


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

end of thread, other threads:[~2013-10-14 17:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-14 16:56 Reference Sections in Other Files Jeff Allen
     [not found] ` <a5a47e2e-aeaf-45c8-9ee1-6dd99306d060-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2013-10-14 17:48   ` 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).