public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: John MacFarlane <fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: EPUB toc for whole book?
Date: Sun, 29 Apr 2012 14:37:25 -0700	[thread overview]
Message-ID: <20120429213724.GA28031@protagoras.phil.berkeley.edu> (raw)
In-Reply-To: <5866117.761.1335734317422.JavaMail.geo-discussion-forums@vbpz13>

+++ niczero [Apr 29 12 14:18 ]:
>    On Sunday, 29 April 2012 17:31:27 UTC+1, fiddlosopher wrote:
> 
>      +++ niczero [Apr 29 12 06:49 ]:
>      >    It would be very useful if there was a --qualified_auto_links
>      that made
>      >    all
>      >    auto links be qualified with their chapter ref.
>      >    Currently
>      >    # Foo
>      >    ## Bar
>      >    means the subheading gets an auto link of "bar", but I'd like
>      the
>      >    option
>      >    of having it as "foo_bar" so it's not impacted by the
>      possibility of
>      >    another chapter having a (sub)heading of 'Bar'.
>      Pandoc won't produce duplicate identifiers.  If you have two
>      sections named "Bar", the first will get the id "bar", and the
>      second will get "bar-1", etc. See the README section on header
>      identifiers.
>      Also see the --id-prefix option.
>      John
> 
>    ----
>    The trouble is, my links are generated by code, and the code can't
>    easily predict whether it should link to bar-23 or bar-32; in fact it
>    currently doesn't know that 'bar' is wrong, so all links end up
>    pointing at the first instance of 'bar'.  However it's natural to know
>    which chapter you're linking to, so having a predictable per-chapter
>    prefix would solve such problems.  This isn't just a problem with
>    generated links, it gets much worse if you're trying to do the job
>    manually.
>    My reading of '--id-prefix' suggests I can't use it per chapter and
>    still have inter-chapter links working.  Is that right?
>    Nic

--id-prefix could work for you if you're calling pandoc on chapter-size
units.  You just need to make sure you include the prefix in the
identifiers you link to.  But this may not work for your purposes.



  reply	other threads:[~2012-04-29 21:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-27 21:09 David Snopek
2012-04-28 10:21 ` niczero
2012-04-28 15:03   ` John MacFarlane
     [not found]     ` <20120428150316.GA405-nFAEphtLEs+AA6luYCgp0U1S2cYJDpTV9nwVQlTi/Pw@public.gmane.org>
2012-04-29 13:49       ` niczero
2012-04-29 16:31         ` John MacFarlane
     [not found]           ` <20120429163127.GC24897-nFAEphtLEs+AA6luYCgp0U1S2cYJDpTV9nwVQlTi/Pw@public.gmane.org>
2012-04-29 21:18             ` niczero
2012-04-29 21:37               ` John MacFarlane [this message]
2012-05-07 22:13       ` David Snopek
2012-10-26  5:16 ` Jason Morrison
     [not found]   ` <8cc0d96a-d364-4f03-a7bb-3b0b558fa857-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2012-10-26  6:17     ` fiddlosopher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120429213724.GA28031@protagoras.phil.berkeley.edu \
    --to=fiddlosopher-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).