|
|
#1 |
|
Still reading
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 15,456
Karma: 114319649
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
text-align: right
On a recent conversion from docx to epub I noticed the lines that were supposed to be right justified were left justified on the Kobo.
They looked OK in preview in the Calibre Editor. Examining the CSS Code:
text-align: end; https://www.w3schools.com/cssref/pr_text_text-align.php it should be Code:
text-align: right; LO Writer Code:
Version: 24.2.7.2 (X86_64) / LibreOffice Community Build ID: 420(Build:2) CPU threads: 8; OS: Linux 6.8; UI render: default; VCL: gtk3 Locale: en-GB (en_GB.UTF-8); UI: en-GB Ubuntu package version: 4:24.2.7-0ubuntu0.24.04.4 Calc: threaded I don't think I've seen this before. |
|
|
|
|
|
#2 | |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,817
Karma: 9501034
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
Quote:
https://developer.mozilla.org/en-US/...ies/text-align end The same as right if direction is left-to-right and left if direction is right-to-left. Maybe the Kobo does not recognise "end". |
|
|
|
|
| Advert | |
|
|
|
|
#3 |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 83,273
Karma: 153646249
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Try your conversion using calibre 9. I don't think that error is going to be fixed in an older calibre.
|
|
|
|
|
|
#4 | |
|
Still reading
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 15,456
Karma: 114319649
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
Quote:
Kobo certainly doesn't. Nor does W3C. It's obviously a stupid, often not implemented addition. I don't think it's a Calibre error, another conversion a few days earlier is fine. Maybe it's the Save As in docx version? |
|
|
|
|
|
|
#5 | |
|
Still reading
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 15,456
Karma: 114319649
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
Quote:
I am now suspecting it's conversion to Word 2010 - 365 docx as in the past that wasn't separate from Word 2007. I'll see what Save As Word 2007 docx does on Calibre. |
|
|
|
|
| Advert | |
|
|
|
|
#6 |
|
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 827
Karma: 2111023
Join Date: Sep 2013
Device: Kobo Sage
|
There's a link near the bottom of their page pointing to where they got the information. It's in the draft spec:
https://drafts.csswg.org/css-text-4/...align-property I don't know why they're using the draft. I think the latest approved spec for that is here: https://www.w3.org/TR/CSS2/text.html#alignment-prop and it does not have the END parameter. |
|
|
|
|
|
#7 |
|
Still reading
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 15,456
Karma: 114319649
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
It looks like the LO Writer SaveAs in docx
Word 2007: The styles seem to map 1:1 Word 2011 - 365: The "right" paragraph style seems to be "end". Calibre has always reliably mapped paragraph / heading named styles to CSS, though heading HTML may be a <p> if the style isn't prefixed "Heading ...". |
|
|
|
|
|
#8 | |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 83,273
Karma: 153646249
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
|
|
|
|
|
#9 |
|
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 827
Karma: 2111023
Join Date: Sep 2013
Device: Kobo Sage
|
I'm not sure, but this seems to indicate LibreOffice, itself, might be using that tag:
https://help.libreoffice.org/latest/.../05030700.html Of course, I can't see underlying css tags. It looks like this might be in support of right-to-left languages. |
|
|
|
|
|
#10 | |
|
Still reading
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 15,456
Karma: 114319649
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
Quote:
There is no such option in alignment: Left, Centre, Right, Justified Last Line has an option Start, Centred, Justified. There are 3 options for Text Direction. Superordinate text direction, LTR, RTL. MS Word up to at least 2003 needed you to hit return on last line of a page and then delete, or a last line could be fully justified, which is usually wrong. |
|
|
|
|
|
|
#11 |
|
Still reading
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 15,456
Karma: 114319649
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
If you rename <file>.docx to <file>.zip then you can see the styles.xml in /word/ in a plain text editor.
|
|
|
|
|
|
#12 |
|
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,748
Karma: 64144480
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
EPUB is not the full set of HTML (WEB page). So I would not expect devices to even work.
Add in on how many OLD devices are out there IN USE, Using a proposed code is insane.
|
|
|
|
|
|
#13 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,236
Karma: 29630732
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
|
|
|
|
|
|
#14 |
|
Still reading
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 15,456
Karma: 114319649
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
Mitigation if you have any right justified styles:
Save As in Word 2007 format if using LO Writer. The "newest" actual MS Word I have is 2007. Earliest is Word 2.0a. I have Office 4.3, 95, 97, 2000 and XP as well as Word 2003 (best for WINE). I set them up recently on WFW3.11, Win 98SE, NT 5.0/Win 2K and XP to see when they added Styles and and seeing an outline. Even when Styles there you couldn't keep the Window open. Open Office was first to let you have a window with all the headings, links, images etc and a window with all the styles, and both open while editing. Word 2.0a was very early. MS had a "Windows" Word on the Mac before Windows and it was seriously better than most of the alternatives. I used Wordstar (CP/M & DOS) as well as Wordperfect and MS Word on DOS. Even Windows 98SE is far poorer than NT 4.0 for text support. Adding Word 2000 to Win98SE seems to patch in Unicode? Serious OS updates. Later versions of Word are NT only. You can add a classic menu to Word 2007, but the website is now gone. You can add support to read docx on Word XP/2002 and Word2003, but it won't write docx. Opening a docx saved from LO Writer and saving messes up various formatting & links, because that is two conversions! Only edit in LO Writer using Styles and odt. Extra Save AS in Word 2007 for docx. Avoid doc now. Upload print ready PDF for paper and proofed, checked epub for ebooks, never doc or docx. |
|
|
|
|
|
#15 | |
|
Still reading
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 15,456
Karma: 114319649
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
Quote:
I looked at the actual xml by renaming the .docx files to .zip, but it's gruesome stuff with no newlines, so most text editors can't load all of styles.xml and some of the data is coded / symbols rather than English. The Save As in Libre Office Writer (editing odt) to Word 2007 docx and import to Calibre is fine apart from the headings name issue you already explained for h tag vs p tag. Last edited by Quoth; 05-11-2026 at 12:44 PM. |
|
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| text-align-last | degn | Recipes | 1 | 03-01-2019 04:14 PM |
| text-align: initial; -- ?? | AlanHK | Kindle Formats | 6 | 10-03-2018 11:18 AM |
| Is text-align-last not supported? | fxp33 | Editor | 2 | 01-28-2018 02:27 PM |
| text-align:lol; | odedta | ePub | 6 | 06-16-2014 09:40 AM |
| I can not align the text...help please! XD | derfel_spain | ePub | 17 | 12-18-2010 09:45 AM |