Bug 158518 - Allow user to specify any of three italic types (It, Em, Cite) in character styles; allow this to determine html code of created ebooks
Summary: Allow user to specify any of three italic types (It, Em, Cite) in character s...
Status: RESOLVED INSUFFICIENTDATA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: needsUXEval
Depends on:
Blocks:
 
Reported: 2023-12-04 14:12 UTC by R. Green
Modified: 2024-03-01 13:56 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot epub (34.55 KB, image/png)
2024-02-01 09:13 UTC, Heiko Tietze
Details

Note You need to log in before you can comment on or make changes to this bug.
Description R. Green 2023-12-04 14:12:29 UTC
Version: 7.5.4.2 (X86_64) / LibreOffice Community
Build ID: 36ccfdc35048b057fd9854c757a8b67ec53977b6
CPU threads: 2; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-GB (en_GB.UTF-8); UI: en-GB
Calc: threaded

Currently if the user want to specify an italic character style s/he must use choose "Emphasis". This is all you need for WP docs. But if you intend to make a e-book you are likely to want to be more specific, because e-book readers may treat the three types of italic differently (e.g. for narration purposes), namely:

1. ITALIC : Used for non-English quotations
2. EMPHASIS: Used to emphasize a word or phrase
3. CITATION: Used to italicise the titles of creative works.

Suggestion: Simply make three different character styles available for italics. They will look identical in WP documents but when converted to ebook would code for the equivalent html tag.
Comment 1 V Stuart Foote 2023-12-04 15:05:12 UTC
Seems a bit off core ODF, but the additional Emphasis styles could support E-Book conversion filters.
Comment 2 Heiko Tietze 2023-12-05 06:16:52 UTC
Doesn't it depend entirely on the font whether more than one italic form is available, eg. oblique? Or do you have a slider control in mind that adjusts the slantness? => NEEDINFO

In any case you can define character styles with your choices. We predefine "Emphasis" using just italic (and show this on the "Formatting (Styles)" toolbar). And "Quotation" (not using the same attributes, indeed a bit odd.

Bug 35538 requests a better handling of fonts with more than 4 styles and bug 151322 is about to stop identifying italic with slanted/oblique. Maybe we can make this ticket a duplicate of one.
Comment 3 Heiko Tietze 2024-01-31 09:12:59 UTC
No further input, making it a duplicate.

*** This bug has been marked as a duplicate of bug 151322 ***
Comment 4 V Stuart Foote 2024-01-31 15:03:20 UTC
(In reply to Heiko Tietze from comment #2)
> Doesn't it depend entirely on the font whether more than one italic form is
> available, eg. oblique? Or do you have a slider control in mind that adjusts
> the slantness? => NEEDINFO
> 
> In any case you can define character styles with your choices. We predefine
> "Emphasis" using just italic (and show this on the "Formatting (Styles)"
> toolbar). And "Quotation" (not using the same attributes, indeed a bit odd.
> 
> Bug 35538 requests a better handling of fonts with more than 4 styles and
> bug 151322 is about to stop identifying italic with slanted/oblique. Maybe
> we can make this ticket a duplicate of one.

Back to NEW. Not a font issue at all.

Rather, this was a request for expanding our "Emphasis" character style(s) to support additional named styles within the document--not the "slantness" of a particular font (either its foundry provided, or our VCL implementation).

Not clear if there is native ODF support for the additional 'Italic', 'Emphasis', or 'Citation' that ebook and html could consume.
Comment 5 Regina Henschel 2024-01-31 15:43:48 UTC
(In reply to V Stuart Foote from comment #4)
> Not clear if there is native ODF support for the additional 'Italic',
> 'Emphasis', or 'Citation' that ebook and html could consume.

Export filters are not related to ODF. If an application uses a specific style to export a specific element/attribute in the target format, then this is entirely up to the application. The issue here is not only the definition of further styles, but in addition changes to the export filter.
Comment 6 Heiko Tietze 2024-01-31 17:15:58 UTC
(In reply to V Stuart Foote from comment #4)
> Rather, this was a request for expanding our "Emphasis" character style(s)
What hinders a user to create a new character style? Why should we ship more default styles, given that users complain about too many items in the Stylist (see bug 158791 for instance).
Comment 7 V Stuart Foote 2024-01-31 17:24:52 UTC
(In reply to Heiko Tietze from comment #6)
> (In reply to V Stuart Foote from comment #4)
> > Rather, this was a request for expanding our "Emphasis" character style(s)
> What hinders a user to create a new character style? Why should we ship more
> default styles, given that users complain about too many items in the
> Stylist (see bug 158791 for instance).

A user defined CS could not support export filter needs.

As Regina notes, requirement would need to be both the additional character styles but also adjustments to the export filters (EPub, HTML and probably PDF).  

Enhancing the export filters to support ebooks/EPub in general would need a well crafted set of pre-defined CS (italic, emphasis, citation of some markup) for the export filters to correctly parse.
Comment 8 Heiko Tietze 2024-02-01 09:13:21 UTC
Created attachment 192319 [details]
Screenshot epub

heard (=> Emphasis) quiet (=> Strong Emphasis) steps (=> "Test" with style = Bold Italic), exported as epub3 and shown in Okular.

Why would we need another pre-defined CS?
Comment 9 V Stuart Foote 2024-02-01 12:18:15 UTC
(In reply to Heiko Tietze from comment #8)
> Created attachment 192319 [details]
> Screenshot epub
> 
> heard (=> Emphasis) quiet (=> Strong Emphasis) steps (=> "Test" with style =
> Bold Italic), exported as epub3 and shown in Okular.
> 
> Why would we need another pre-defined CS?

@R. Green, the NEEDINFO to you to describe your use case beyond our current Epub export filter with the LibreOffice Emphasis/Strong Emphasis/or a custom style with 'Bold Italic' defined in the source ODT.

What additional pre-defined global styles would be needed to support ebook/HTML5 destined ODF prepared in LibreOffice?

And, is your workflow working with the LO provided Epub, PDF, or our weak HTML4 transitional export filters?  Or are you using some external program to convert from our ODF 1.3 compliant documents?
Comment 10 Heiko Tietze 2024-03-01 13:56:16 UTC
Resolving for now, please reopen with more information.