View Single Post
Old 08-18-2013, 08:42 PM   #1
ibu
Addict
ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.
 
Posts: 264
Karma: 9246
Join Date: Feb 2010
Location: Berlin, Germany
Device: Kobo H20, iPhone 6+, Macbook Pro
Suggestion: Better pattern for IDs in H elements

Sigil creates IDs in the Hn start tags automatically (e.g. with a merging).

Example sourcecode:
<h2>preface (preface.xhtml)
<h2>Chapter 1 (c01.xhtml)
<h3>1.1 (c01.xhtml)
<h3>1.2 (c01.xhtml)

Result:
<h2 id="sigil_toc_id_1"> (preface.xhtml)
<h2 id="sigil_toc_id_2"> (c01.xhtml)
<h3 id="sigil_toc_id_3"> (c01.xhtml)
<h3 id="sigil_toc_id_4"> (c01.xhtml)

I'm not in love with that pattern.

My wish is:
<h2 id="t-1">
<h2 id="t-2">
<h3 id="t-2-1">
<h3 id="t-2-2">

Is it possible to realize that pattern?

If not, how do you like my suggestion?
Of course, while generating the ids, it has to be checked by the software, if an ID exists already.

Thanks.
ibu is offline   Reply With Quote