Copy link to clipboard
Copied
Hi, I'm trying to format a long poem as an EPUB, and it needs to have line numbers for every fifth line.
Here is an example of what I want it to look like:
When the reader enlarges the font, some lines may run on to the next line. I want the numbering to accomodate this, for example:
Note that line number 35 still begins with the word "acerepe", etc.
How can this be achieved in InDesign? I have seen an EPUB where this is done, so I'm quite sure it's possible.
Thanks for your help.
Copy link to clipboard
Copied
Hi Rex: You will have to run a separate story alongside of the poem.
You can get Excel to type up the list of numbers for by typing 5, 10 into two empy cells and then using the fill handle to repeat the list by 5s (see https://support.office.com/en-us/article/automatically-number-rows-76ce49e3-d8d2-459b-bd85-ee1d3973e...).
Then place a threaded frame next to the story, paste in the numbers, align the top number with line 5 and set the space after to 5x the leading for the paragraph so that they automatically line up correctly.
~Barb
 
Copy link to clipboard
Copied
Thanks Barb. This is how I've formatted the print version already, so this solution is handy for me.
I have two separate text boxes: one for text, one for numbers. When I export to EPUB, the EPUB shows all the text first, then all the line numbers. I'm not sure how to get these to show side-by-side in the EPUB.
Copy link to clipboard
Copied
I should also mention that I haven't used the threaded frame, just two plain old text boxes, so I'm not sure how to do that.
Copy link to clipboard
Copied
InDesign doesn't technically have this function. A clunky work-around is putting a second column beside the main text, of course:
https://indesignsecrets.com/numbering-lines-of-text.php
I recall a couple of plugins:
https://www.id-extras.com/products/line-numbers/
http://store.eprinttools.in/index.php?route=product/product&product_id=71
And a free script:
https://indesignsecrets.com/quickly-add-line-numbers-with-this-free-script.php
Copy link to clipboard
Copied
Hi Rex: Do you need this to be a reflowable ePub? This works well for a fixed-layout ePub.
I don't see how you can accomplish this as a reflowable ePub—they are designed to reflow when viewed on different screen sizes and orientation. When layout is important, use a fixed-layout ePub.
~Barb
Copy link to clipboard
Copied
> they are designed to reflow
What happens to tables?
Copy link to clipboard
Copied
Optionally use css to take care of this. But you would have to test how well this works in epub readers. Here is an example:
.stanza {
margin-left: 4em;
position: relative; /* for right alignment */
}
.stanza p {
margin: 0;
line-height: 1.2em;
}
.stanza p:nth-child(6n+7) {
text-indent: 1em;
}
.stanza p:nth-child(6n+6) {
margin-bottom: 1em;
}
.stanza p:nth-child(5n+5):before {
float: left;
margin-left: -4em;
font-size: 70%;
content: counter(verse);
counter-increment: verse 5;
/* right aligned */
position: relative;
right: -266px;
}
Then
<div class="stanza"> | |
<p>Ei fu. Siccome immobile,</p> | |
<p>Dato il mortal sospiro,</p> | |
<p>Stette la spoglia immemore</p> | |
<p>Orba di tanto spiro,</p> | |
<p>Così percossa, attonita</p> | |
<p>La terra al nunzio sta,</p> | |
<p>Muta pensando all’ultima</p> | |
<p>Ora dell’uom fatale;</p> | |
<p>Nè sa quando una simile</p> | |
<p>Orma di piè mortale</p> | |
<p>La sua cruenta polvere</p> | |
<p>A calpestar verrà .</p> | |
<p>Lui folgorante in solio</p> | |
<p>Vide il mio genio e tacque;</p> | |
<p>Quando, con vece assidua,</p> | |
<p>Cadde, risorse e giacque,</p> | |
<p>Di mille voci al sonito</p> | |
<p>Mista la sua non ha:</p> | |
</div> |
Copy link to clipboard
Copied
Hi Jongware: If you use a table the content will reflow, but the line numbers will also reflow and won't line up.
~Barb
Find more inspiration, events, and resources on the new Adobe Community
Explore Now