From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/3742 Path: news.gmane.org!not-for-mail From: niczero Newsgroups: gmane.text.pandoc Subject: Re: EPUB toc for whole book? Date: Sun, 29 Apr 2012 14:18:37 -0700 (PDT) Message-ID: <5866117.761.1335734317422.JavaMail.geo-discussion-forums@vbpz13> References: <6465376.92.1335560944887.JavaMail.geo-discussion-forums@ynfi5> <4232951.768.1335608514852.JavaMail.geo-discussion-forums@vbbgl4> <20120428150316.GA405@protagoras.phil.berkeley.edu> <2012135.1423.1335707398048.JavaMail.geo-discussion-forums@ynlt11> <20120429163127.GC24897@protagoras.phil.berkeley.edu> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_760_11585781.1335734317421" X-Trace: dough.gmane.org 1335734321 7240 80.91.229.3 (29 Apr 2012 21:18:41 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 29 Apr 2012 21:18:41 +0000 (UTC) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncCOTAwee9CRCu4Pb8BBoEWJGWWQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Sun Apr 29 23:18:40 2012 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-pb0-f58.google.com ([209.85.160.58]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SObVv-0001ak-Sx for gtp-pandoc-discuss@m.gmane.org; Sun, 29 Apr 2012 23:18:40 +0200 Original-Received: by pbbro8 with SMTP id ro8sf980802pbb.3 for ; Sun, 29 Apr 2012 14:18:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=x-beenthere:date:from:to:message-id:in-reply-to:references:subject :mime-version:x-original-sender:x-original-authentication-results :reply-to:precedence:mailing-list:list-id:x-google-group-id :list-post:list-help:list-archive:sender:list-subscribe :list-unsubscribe:content-type; bh=JUgRfwlnM6ObU+ZiALfAWxV6UeZJhMfh2977EAIbTrs=; b=OUG7eNPTSlJsj4u6bBSPwB8JOp2lo9wEjh0CDY5nkcxIkO2tZYqxh136XU3WJj6CoR Y2eSUsMP0//faT8VgnkDrabYge/qHZWwWEyAszExDDsMNmqBGYYQXHEAccnSms45K89n jdJc9ieKlF67xP9+ZcuNnmPWqxWrmGTXptzGo= Original-Received: by 10.52.67.229 with SMTP id q5mr366641vdt.20.1335734318237; Sun, 29 Apr 2012 14:18:38 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 10.220.247.211 with SMTP id md19ls817739vcb.9.gmail; Sun, 29 Apr 2012 14:18:37 -0700 (PDT) Original-Received: by 10.52.33.47 with SMTP id o15mr371252vdi.9.1335734317821; Sun, 29 Apr 2012 14:18:37 -0700 (PDT) In-Reply-To: <20120429163127.GC24897-nFAEphtLEs+AA6luYCgp0U1S2cYJDpTV9nwVQlTi/Pw@public.gmane.org> X-Original-Sender: nic1zero-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: ls.google.com; spf=pass (google.com: domain of nic1zero-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates internal as permitted sender) smtp.mail=nic1zero-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dkim=pass header.i=@gmail.com Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-Subscribe: , List-Unsubscribe: , Xref: news.gmane.org gmane.text.pandoc:3742 Archived-At: ------=_Part_760_11585781.1335734317421 Content-Type: text/plain; charset=ISO-8859-1 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 -- You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. To view this discussion on the web visit https://groups.google.com/d/msg/pandoc-discuss/-/S_X_WkCIJNAJ. To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/pandoc-discuss?hl=en. ------=_Part_760_11585781.1335734317421 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

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_au= to_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 cod= e, 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 l= inks end up
pointing at the first instance of 'bar'.  However it's= natural to know
which chapter you're linking to, so having a predictabl= e 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 r= ight?

Nic

--
You received this message because you are subscribed to the Google Groups "= pandoc-discuss" group.
To view this discussion on the web visit https://groups.google.com/d/msg/pan= doc-discuss/-/S_X_WkCIJNAJ.
=20 To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to pandoc-discuss+unsubscribe@go= oglegroups.com.
For more options, visit this group at http://groups.google.com/group/pandoc= -discuss?hl=3Den.
------=_Part_760_11585781.1335734317421--