Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 06-12-2026, 12:01 AM   #1
Taccess
Junior Member
Taccess began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jun 2026
Device: Lenovo J607F (SD750g)
Any ways to auto indent on only wanted lines

I created text-only ODT files from LibreOffice Writer. Then, convert it into epub. I use tabs for indents and they are gone when converted to epub. Any things I can do inside Libre Writer, to designate the lines I want indented and will be preserved after the conversion?

Taccess is offline   Reply With Quote
Old 06-12-2026, 12:20 AM   #2
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,846
Karma: 9600930
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
What are you using the tabs for? Is it to indent paragraphs, or are you using them to create faux columns?

Depending on your answer, it would be easier to to fix the indent in the epub.
Karellen is online now   Reply With Quote
Advert
Old 06-12-2026, 08:43 AM   #3
Taccess
Junior Member
Taccess began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jun 2026
Device: Lenovo J607F (SD750g)
Quote:
Originally Posted by Karellen View Post
What are you using the tabs for? Is it to indent paragraphs, or are you using them to create faux columns?

Depending on your answer, it would be easier to to fix the indent in the epub.
It's paragraph headings. Technically, you could say I was indenting paragraphs, but only with one line.
For now, I'm doing it the manual way. After conversion, duplicate & rename a css entry, add text.indent. Then back in the body html, find the lines I want, and manually rename their p tags. But that really takes time and it repeats everytime I change the content and convert.

Last edited by Taccess; 06-12-2026 at 08:46 AM.
Taccess is offline   Reply With Quote
Old 06-12-2026, 09:29 AM   #4
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: 83,741
Karma: 153649587
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 Taccess View Post
I created text-only ODT files from LibreOffice Writer. Then, convert it into epub. I use tabs for indents and they are gone when converted to epub. Any things I can do inside Libre Writer, to designate the lines I want indented and will be preserved after the conversion?

The tabs won't work. Replace them with a style that has a paragraph indent. That will work.
JSWolf is online now   Reply With Quote
Old 06-12-2026, 10:30 AM   #5
retiredbiker
Evangelist
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: 478
Karma: 3972002
Join Date: May 2013
Location: Ontario, Canada
Device: Pop_Os!, Kobo Forma
Quote:
Originally Posted by Taccess View Post
It's paragraph headings. Technically, you could say I was indenting paragraphs, but only with one line.
For now, I'm doing it the manual way. After conversion, duplicate & rename a css entry, add text.indent. Then back in the body html, find the lines I want, and manually rename their p tags. But that really takes time and it repeats everytime I change the content and convert.
Styles are the way to go. A paragraph style in Writer will convert beautifully to a css rule in the epub. There is Doitsu's ODT import plugin for Sigil which is a bit of magic, if you are not using it already. https://www.mobileread.com/forums/sh...d.php?t=274536

I have a Writer template file with styles to match 95% of what I need in an epub novel. I use this file as a starting point to style text output from OCR, for example. Then it goes into Sigil with virtually no further editing needed. Similar will work in Calibre, if not as smoothly.
retiredbiker is offline   Reply With Quote
Advert
Old 06-12-2026, 04:48 PM   #6
Taccess
Junior Member
Taccess began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jun 2026
Device: Lenovo J607F (SD750g)
Quote:
Originally Posted by retiredbiker View Post
Styles are the way to go. A paragraph style in Writer will convert beautifully to a css rule in the epub. There is Doitsu's ODT import plugin for Sigil which is a bit of magic, if you are not using it already. https://www.mobileread.com/forums/sh...d.php?t=274536

I have a Writer template file with styles to match 95% of what I need in an epub novel. I use this file as a starting point to style text output from OCR, for example. Then it goes into Sigil with virtually no further editing needed. Similar will work in Calibre, if not as smoothly.
Was gonna try out Sigil, but my laptop freezes when opening a few Unity games and unfortunately Sigil as well. So, no Sigil for me, I guess. Please also see my reply below, thanks!

Quote:
Originally Posted by JSWolf View Post
The tabs won't work. Replace them with a style that has a paragraph indent. That will work.
Thanks! Styling with indent works with default english writings. The problem now is, I'm asian and I'm creating epub with vertical writing, top to down & right to left. And I achieve that with a CSS code I found on reddit, as follows:
Quote:
{
line-height: 200%;
}

body{
writing-mode: vertical-rl;
-epub-writing-mode: vertical-rl;
-webkit-writing-mode: vertical-rl;
}

p{
margin: 0;
}
I experimented and found using above code will make the indent (by style) ineffective, big or small. While deleting the code and convert using the exact setup will bring the indent back. I suspect the code has caused that but it can also be an internal problem of the software. Sorry I need even more help
Taccess is offline   Reply With Quote
Old 06-12-2026, 06: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,846
Karma: 9600930
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
I'm not familiar with r/l and t/b writing modes.
But from your code examples, you have no indent specified.
You need to modify the <p> code and add another class as follows:

p {
display: block;
margin-top: 0;
margin-bottom: 0;
text-indent: 1em;
}

which will indent all paragraphs using the <p> tag. Adjust the indent size to your liking.

and add...

.noindent {
text-indent: 0;
}

which will remove the indent on selected paragraphs. eg...

<p class="noindent">This is a paragraph that is not indented</p>

Also, what is that line height? There is no class specified for it.
Karellen is online now   Reply With Quote
Old 06-12-2026, 06:21 PM   #8
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: 83,741
Karma: 153649587
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Whatever that line-height is, it's way too large to be useful for anything.
JSWolf is online now   Reply With Quote
Old 06-12-2026, 08:32 PM   #9
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 52,419
Karma: 180944990
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Jon, try to remember the OP is not using an English style left to right top to bottom language with Latin characters.
DNSB is offline   Reply With Quote
Old 06-13-2026, 06:24 AM   #10
Taccess
Junior Member
Taccess began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jun 2026
Device: Lenovo J607F (SD750g)
Quote:
Originally Posted by Karellen View Post
I'm not familiar with r/l and t/b writing modes.
But from your code examples, you have no indent specified.
You need to modify the <p> code and add another class as follows:

p {
display: block;
margin-top: 0;
margin-bottom: 0;
text-indent: 1em;
}

which will indent all paragraphs using the <p> tag. Adjust the indent size to your liking.

and add...

.noindent {
text-indent: 0;
}

which will remove the indent on selected paragraphs. eg...

<p class="noindent">This is a paragraph that is not indented</p>

Also, what is that line height? There is no class specified for it.
Source of the code: SOLUTION for converting Japanese books to kindle (vertical writing and right to left) - Reddit

Then, it seems no automation? If possible, how do I tag and tell the converter, which paragraph is the one I want indented without manual editing afterwards?
Taccess is offline   Reply With Quote
Old 06-13-2026, 11:35 AM   #11
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: 31,815
Karma: 64144480
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Taccess View Post
Source of the code: SOLUTION for converting Japanese books to kindle (vertical writing and right to left) - Reddit

Then, it seems no automation? If possible, how do I tag and tell the converter, which paragraph is the one I want indented without manual editing afterwards?

Pattern matching. Indented always follow this block or symbols (to be removed)
Do not lock your work flow thinking into just Conversion only.
A simple editor session using a previously 'saved search' (change the class in the next <p> following 'xyzfoo' (and remove the 'xyzfoo' mark)

Wham Bam, now convert (or post process after a basic Convert)
theducks is offline   Reply With Quote
Old 06-13-2026, 12:52 PM   #12
Taccess
Junior Member
Taccess began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jun 2026
Device: Lenovo J607F (SD750g)
Quote:
Originally Posted by theducks View Post

Pattern matching. Indented always follow this block or symbols (to be removed)
Do not lock your work flow thinking into just Conversion only.
A simple editor session using a previously 'saved search' (change the class in the next <p> following 'xyzfoo' (and remove the 'xyzfoo' mark)

Wham Bam, now convert (or post process after a basic Convert)
You're right! Just like using "find & replace all" or "RegEx" in Notepad++. Thanks for that idea! That'll be good enough for me for now. 1 step rather than 60 steps for me! But of course, it'll be best if that can be fully automated.

Thank you all!
Taccess is offline   Reply With Quote
Old 06-13-2026, 02:12 PM   #13
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: 31,815
Karma: 64144480
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Taccess View Post
You're right! Just like using "find & replace all" or "RegEx" in Notepad++. Thanks for that idea! That'll be good enough for me for now. 1 step rather than 60 steps for me! But of course, it'll be best if that can be fully automated.

Thank you all!
The Calibre book Editor has great S&R, which is why I suggested Convert first, then 'repair' , so no real need for NPP (just for this task)
theducks is offline   Reply With Quote
Old 06-13-2026, 03:43 PM   #14
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 52,419
Karma: 180944990
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
For what it may be worth, I use Sigil for most of my ePub editing tasks partially because I make quite a bit of its ability to save search/search & replace in groups. Click on the search group and watch the searches run. No typing, no typos during the typing, just the computer doing repetitive tasks.
DNSB is offline   Reply With Quote
Old 06-13-2026, 05:50 PM   #15
Taccess
Junior Member
Taccess began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jun 2026
Device: Lenovo J607F (SD750g)
Just found this out, I used style in Libre Writer to effectively tag all lines I want into one group. Then, the converter will generate a new p tag name for each group. Then I simply add "text-indent: 1.5em;" to the css of the desired p tag. Done! Not even find&replace is needed. Even faster! Smaller room for error.
Thank you for all the help again!
Taccess is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
EPUB to PDF: hyperlinks that span lines make all of both lines clickable metallserge Conversion 4 09-23-2021 06:39 AM
noindent first line, indent all other lines, same paragraph, possible? patrik ePub 3 02-15-2016 11:36 AM
Dashed lines auto removed if output type is mobi flyingfoxlee Recipes 3 05-20-2013 09:08 AM
WTB: Ability to change indent without ticking 'remove spaces between lines' gweminence Calibre 9 08-27-2011 09:05 AM
Calibre Indent Issue When Removing Blank Lines (Converting From HTML to MOBI or EPUB) David Derrico Calibre 5 08-04-2010 12:13 AM


All times are GMT -4. The time now is 07:09 PM.


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