Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 03-15-2023, 05:45 AM   #1
wisark
Junior Member
wisark began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Mar 2023
Device: Kindle Paperwhite
Line break for poetry

Hello, I need to edit several poetry books and convert them to epub format. The problem I run into is that I need to somehow indicate when a verse (line) ends, and depending on the device and font size the verses (lines) could be broken and the words that don't fit go to the next line.

I would like that if that happens, the words that do not fit in the line go automatically to the next line (which it already happens) but with some indentation, like for example:

Quote:
When a verse does not fit in the
same line
it should be shown with some indentation
Or that those words are displayed to the right of the line with "[" to indicate it:

Quote:
When a verse does not fit in the
[same line
it should be shown with an opening bracket
Any of these solutions would work for me, and I would like to know if this is possible to configure somehow in Calibre, Sigil or in another way. I don't know how to code CSS but I suspect that maybe it can be solved using CSS code.

I found an old thread (from 2013) in this forum in which some solutions were presented but it was said that there was still no simple solution, and I think that perhaps now there may be already some possible resolution to this problem.

Thanks for everything and best regards.
wisark is offline   Reply With Quote
Old 03-15-2023, 05:50 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,019
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Look at the files from https://manual.calibre-ebook.com/con...ormatting-demo it tells you exactly how to do that.
kovidgoyal is offline   Reply With Quote
Advert
Old 03-15-2023, 06:00 AM   #3
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,681
Karma: 26966376
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@wisark - convert them from what?

Best place to look is in the Workshop and ePub forums - search for 'poetry' in thread titles.

I can move this to ePub of you say 'yes'

BR
BetterRed is offline   Reply With Quote
Old 03-15-2023, 06:36 AM   #4
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,981
Karma: 56143930
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
A Hanging (- value) indent Paragraph style will do the split line the way you want.
theducks is offline   Reply With Quote
Old 03-15-2023, 07:49 AM   #5
wisark
Junior Member
wisark began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Mar 2023
Device: Kindle Paperwhite
Quote:
Originally Posted by kovidgoyal View Post
Look at the files from https://manual.calibre-ebook.com/con...ormatting-demo it tells you exactly how to do that.
Thank you so much! I checked that demo file with Calibre viewer and that was exactly what I was talking about! The problem is that I am really a newbie and I have no idea how to get it done. I see that the settings are:

Quote:
ebook-convert demo.zip .epub -vv --authors "Kovid Goyal" --language en --level1-toc '//*[@class="title"]' --disable-font-rescaling --page-breaks-before / --no-default-epub-cover
Would you please be so kind as to indicate me the steps I would have to take in order to get it done? My original file is a .docx and I am using Calibre to converting it to ePub.

Quote:
Originally Posted by BetterRed View Post
@wisark - convert them from what?

Best place to look is in the Workshop and ePub forums - search for 'poetry' in thread titles.

I can move this to ePub of you say 'yes'
BR
yes

Sorry I am really new and I had no Idea, I am now taking a look at the Workshop, thanks for pointing me in the right direction. My original file is a .docx and I am converting it into a .epub file using Calibre (I've done it successfully I think, but I'd love to solve this last problem)

Quote:
Originally Posted by theducks View Post
A Hanging (- value) indent Paragraph style will do the split line the way you want.
Thanks for your answer friend but as I started a few days ago using Calibre I have no idea what do you mean, I'm going to do my research. Thanks again.
wisark is offline   Reply With Quote
Advert
Old 03-15-2023, 03:55 PM   #6
retiredbiker
Addict
retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.
 
retiredbiker's Avatar
 
Posts: 389
Karma: 1638210
Join Date: May 2013
Location: Ontario, Canada
Device: Kindle KB, Oasis, Pop_Os!, Jutoh, Kobo Forma
Quote:
My original file is a .docx and I am converting it into a .epub file using Calibre
Your best bet by far will be to use paragraph styles in the .docx in Word (or whatever you are using to make the docx). The paragraph styles will convert to the style you want in the epub. The style you will want for this is called a hanging indent; it has a generous left margin and then a negative value for the first-line indent. The result is, if a line over-flows, it will be indented below the first line.

Search for using paragraph styles in Word Help, and also search for poetry styles or hanging indent styles. By setting the margin and the indent you can control exactly how it works in your document. This will save you mucking about with conversion settings or editing the epub.

In general, use paragraph styles for ALL formatting on the word processor side, except for italics and bold within a paragraph. It will make everything soooo much easier.

Below is a picture of what a setting like this looks like in Writer; Word will be somewhat similar. This setting will indent the whole poem 1 cm from the margin and give a further .5 cm indent to overflow lines.
Attached Thumbnails
Click image for larger version

Name:	versestyle.jpg
Views:	75
Size:	27.9 KB
ID:	200346  
retiredbiker is offline   Reply With Quote
Old 03-15-2023, 04:09 PM   #7
Karellen
Wizard
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
Posts: 1,166
Karma: 4917720
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
Quote:
Originally Posted by wisark View Post
I would like that if that happens, the words that do not fit in the line go automatically to the next line (which it already happens) but with some indentation, like for example:
Use a hanging indent. Something like this in your css file...

Code:
.hanging {
  text-indent: -1em;
}
and then use...

Code:
<p class="hanging">My poetry line</p>

Last edited by Karellen; 03-15-2023 at 04:11 PM.
Karellen is offline   Reply With Quote
Old 03-15-2023, 05:27 PM   #8
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,681
Karma: 26966376
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@wishart - if you regard your DOCX file as your manuscript, I recommend you make the changes as outlined by @retiredbiker using Word. Do a search for "Microsoft word template for poetry" in your browser ro get some examples

Word keeps its Styles in template files.

BR

Last edited by BetterRed; 03-15-2023 at 05:34 PM.
BetterRed is offline   Reply With Quote
Old 03-15-2023, 06:48 PM   #9
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 74,648
Karma: 130140792
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Karellen View Post
Use a hanging indent. Something like this in your css file...

Code:
.hanging {
  text-indent: -1em;
}
and then use...

Code:
<p class="hanging">My poetry line</p>
That CSS is not going to work properly because you've left out the left-margin..

Code:
.hanging {
  left-margin: 1em;
  text-indent: -1em;
}
JSWolf is online now   Reply With Quote
Old 03-17-2023, 09:45 AM   #10
wisark
Junior Member
wisark began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Mar 2023
Device: Kindle Paperwhite
Quote:
Originally Posted by retiredbiker View Post
Your best bet by far will be to use paragraph styles in the .docx in Word (or whatever you are using to make the docx). The paragraph styles will convert to the style you want in the epub. The style you will want for this is called a hanging indent; it has a generous left margin and then a negative value for the first-line indent. The result is, if a line over-flows, it will be indented below the first line.

Search for using paragraph styles in Word Help, and also search for poetry styles or hanging indent styles. By setting the margin and the indent you can control exactly how it works in your document. This will save you mucking about with conversion settings or editing the epub.

In general, use paragraph styles for ALL formatting on the word processor side, except for italics and bold within a paragraph. It will make everything soooo much easier.

Below is a picture of what a setting like this looks like in Writer; Word will be somewhat similar. This setting will indent the whole poem 1 cm from the margin and give a further .5 cm indent to overflow lines.
I tried this solution and it worked for me! Thank you very much! I used hanging indent in my paragraph style for the poems, and then I converted the file into ePub and checked on my Kindle and it seems it worked, so I would recommend (if you are like me, a person who does not know how to code HTML/CSS and is new to the art of creating ebooks) to use this solution so that way you can mark the end of a verse using hanging indents.

Thanks again everyone.
wisark is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Line break problem onqun KOReader 3 05-03-2022 12:34 AM
Sigil line break ebookscovers Sigil 6 09-07-2020 09:07 PM
Starting a line indented to end of previous line (Poetry) sjfan ePub 18 01-22-2019 06:39 PM
Poetry: line numbers aligned to the right. 1v4n0 ePub 20 12-16-2017 04:02 AM
Style poetry - line break on verse ramsaa Sigil 15 10-22-2013 04:28 PM


All times are GMT -4. The time now is 06:18 PM.


MobileRead.com is a privately owned, operated and funded community.