css=[[p, li { margin-top: 0 !important; margin-bottom: 0 !important; }]],
},
{
id="paragraph_no_vertical_padding",
title=_("Ignore vertical paragraph padding"),
css=[[p, li { padding-top: 0 !important; padding-bottom: 0 !important; }]],
},
separator=true,
},
{
title=_("Page breaks and blank pages"),
{
id="titles_page-break-before_avoid ";
id="titles_page-break-before_avoid ",
title=_("Avoid blank page on chapter start"),
priority=2,-- so it can override the one put back by publisher_page-break-before_avoid
css=[[h1, h2, h3 { page-break-before: auto !important; }]],
},
{
id="docfragment_page-break-before_avoid ";
id="docfragment_page-break-before_avoid ",
title=_("Avoid blank page on chapter end"),
priority=2,-- so it can override the one put back by publisher_page-break-before_avoid
css=[[DocFragment { page-break-before: auto !important; }]],
},
{
id="publisher_page-breaks_avoid ";
id="publisher_page-breaks_avoid ",
title=_("Avoid publisher page breaks"),
description=_("Disable all publisher page breaks, keeping only KOReader's epub.css ones.\nWhen combined with the two previous tweaks, all page-breaks are disabled."),
@ -362,7 +382,7 @@ Further small adjustments can be done with 'Line Spacing' in the bottom menu.]])
-- no need for priority, this has higher specificity than lineheight_all_inherit below
},
{
id="ruby_inline";
id="ruby_inline",
title=_("Render ruby content inline"),
description=_("Disable handling of <ruby> tags and render them inline."),
css=[[ruby { display: inline !important; }]],
@ -371,28 +391,32 @@ Further small adjustments can be done with 'Line Spacing' in the bottom menu.]])
separator=true,
},
{
title=_("Fonts and line heights"),
title=_("Fontsize and families"),
{
id="font_family_all_inherit";
id="font_family_all_inherit",
title=_("Ignore publisher font families"),
description=_("Disable font-family specified in embedded styles."),
css=[[* { font-family: inherit !important; }]],
separator=true,
},
{
id="font_size_all_inherit";
id="font_size_all_inherit",
title=_("Ignore publisher font sizes"),
description=_("Disable font-size specified in embedded styles."),
priority=-1,-- so in-page footnotes smaller can override this
css=[[* { font-size: inherit !important; }]],
separator=true,
},
},
{
id="lineheight_all_inherit";
title=_("Line heights"),
{
id="lineheight_all_inherit",
title=_("Ignore publisher line heights"),
description=_("Disable line-height specified in embedded styles, and may allow KOReader's line spacing settings to work on books where they would not."),
css=[[* { line-height: inherit !important; }]],
},
{
id="lineheight_all_normal_strut_confined";
id="lineheight_all_normal_strut_confined",
title=_("Enforce steady line heights"),
description=_("Prevent inline content like sub- and superscript from changing their paragraph line height."),
-- strut-confined is among the few cr-hints that are inherited
@ -400,7 +424,7 @@ Further small adjustments can be done with 'Line Spacing' in the bottom menu.]])
separator=true,
},
{
id="sub_sup_smaller";
id="sub_sup_smaller",
title=_("Smaller sub- and superscript"),
description=_("Prevent sub- and superscript from affecting line-height."),
priority=5,-- so we can override "font_size_all_inherit"
@ -416,7 +440,7 @@ sub { font-size: 50% !important; vertical-align: sub !important; }
{
title=_("Paragraphs"),
{
id="paragraph_web_browser_style";
id="paragraph_web_browser_style",
title=_("Generic web browser paragraph style"),
description=_([[
Displayparagraphsasbrowsersdo,infull-blockstylewithoutindentationorjustification,discardingKOReader's book paragraph style.
@ -432,7 +456,7 @@ p {
]],
},
{
id="cjk_tailored";
id="cjk_tailored",
title=_("Tailor widths and text-indent for CJK"),
description=_([[
Adjustparagraphwidthandtext-indenttobeanintegermultipleofthefontsize,sothatlinesofChineseandJapanesecharactersdon't need space added between glyphs for text justification.]]),
@ -442,14 +466,14 @@ Adjust paragraph width and text-indent to be an integer multiple of the font siz
{
title=_("Paragraph first-line indentation"),
{
id="paragraph_no_indent";
id="paragraph_no_indent",
title=_("No indentation on first paragraph line"),
description=_("Do not indent the first line of paragraphs."),
css=[[p { text-indent: 0 !important; }]],
separator=true,
},
{
id="paragraph_indent";
id="paragraph_indent",
title=_("Indentation on first paragraph line"),
description=_("Indentation on the first line of a paragraph is the default, but it may be overridden by publisher styles. This will force KOReader's defaults on common elements."),
description=_("Do not indent the first line of the first paragraph of its container. This might be needed to correctly display drop caps, while still having indentation on following paragraphs."),
priority=2,-- so it can override 'paragraph_indent'
description=_("Add a line of whitespace between paragraphs."),
priority=5,-- Override "Ignore margins and paddings" below
priority=5,-- Override "Ignore margins and paddings" above
css=[[p + p { margin-top: 1em !important; }]],
},
{
id="paragraph_whitespace_half";
id="paragraph_whitespace_half",
title=_("Spacing between paragraphs (half)"),
description=_("Add half a line of whitespace between paragraphs."),
priority=5,
css=[[p + p { margin-top: .5em !important; }]],
},
{
id="paragraph_no_whitespace";
id="paragraph_no_whitespace",
title=_("No spacing between paragraphs"),
description=_("No whitespace between paragraphs is the default, but it may be overridden by publisher styles. This will re-enable it for paragraphs and list items."),
priority=5,
css=[[p, li { margin-top: 0 !important; margin-bottom: 0 !important; }]],
priority=3,-- Override "Pages > Ignore margin and padding"
css=[[p, li { padding-top: 0 !important; padding-bottom: 0 !important; }]],
},
},
{
title=_("Horizontal paragraph margins"),
{
id="paragraph_no_horizontal_margin";
title=_("Ignore horizontal paragraph margins"),
priority=3,-- Override "Pages > Ignore margin and padding"
css=[[p, li { margin-left: 0 !important; margin-right: 0 !important; }]],
},
{
id="paragraph_no_horizontal_padding";
title=_("Ignore horizontal paragraph padding"),
priority=3,
css=[[p, li { padding-left: 0 !important; padding-right: 0 !important; }]],
},
separator=true,
},
{
title=_("List items"),
{
id="ul_li_type_disc";
title=_("Force bullets with unordered lists"),
css=[[ul > li { list-style-type: disc !important; }]],
},
{
id="ol_li_type_decimal";
title=_("Force decimal numbers with ordered lists"),
css=[[ol > li { list-style-type: decimal !important; }]],
},
},
},
title=_("Tables, links, images"),
{
title=_("Tables"),
{
id="table_full_width";
id="table_full_width",
title=_("Full-width tables"),
description=_("Make table expand to the full width of the page. (Tables with small content now use only the width needed to display that content. This restores the previous behavior.)"),
css=[[table { width: 100% !important; }]],
priority=2,-- Override next one
},
{
id="table_td_width_auto";
id="table_td_width_auto",
title=_("Ignore publisher table and cell widths"),
description=_("Ignore table and cells widths specified by the publisher, and let the engine decide the most appropriate widths."),
css=[[table, td, th { width: auto !important; }]],
},
{
id="table_margin_left_right_auto";
id="table_margin_left_right_auto",
title=_("Center small tables"),
description=_("Horizontally center tables that do not use the full page width."),
css=[[table { margin-left: auto !important; margin-right: auto !important; }]],