23 Commits
Author SHA1 Message Date
Suraj Patil de034b70f8 epub.css: remove background-color (#10264)
With this greyish background color, epubs look bad on a Kindle.
Closes #10263.
2024-10-07 08:00:52 -07:00
John MacFarlane 196bf96932 epub.css: add styling for sup and sub.
Closes #9160.
2023-10-28 09:46:56 -07:00
samuel-weinhardt edbea270f5 Apply style to h6 2023-09-23 22:10:52 -07:00
samuel-weinhardt 957489de85 Format styles 2023-09-23 22:10:52 -07:00
samuel-weinhardt 35b23526b2 Combine identical styles under shared selectors 2023-09-23 22:10:52 -07:00
John MacFarlane a682e72c03 Add code { hyphens: manual; } to HTML and EPUB CSS.
Closes #8530.
2023-01-06 10:50:48 -08:00
John MacFarlane 355794549d epub.css: comment out flex rules.
This fixes commit 3666d79ae7
which closed #8379.
2023-01-02 22:35:17 -08:00
John MacFarlane 2dfa5e06b7 Remove stray character in epub.css. 2022-11-06 20:46:41 -08:00
John MacFarlane 56e35cd958 epub.css: left-align h1, as before. 2022-11-02 10:16:44 -07:00
John MacFarlane 3666d79ae7 EPUB CSS changes.
With this change, we reduce the amount of inline CSS used
for EPUBs.  Almost everything is now in the default EPUB
CSS (`data/epub.css`), which can be overridden either by
putting `epub.css` in the user data directory or by using
`--css` on the command line.  Inline styles are only used
for syntax highlighting (which depends on the style specified,
and is only included on pages with highlighted code) and
for bibliography formatting (which can depend on the CSL
style, and is only used in the page containing the bibliography).

Note that, for compatibility with older readers, we don't
use flexbox to style `column/columns` divs by default, as
we do in HTML.  Instead, we use an older method which only
works when there are two `column` divs inside a `columns`
div.  If you need more than two columns and aren't worried
about support for older EPUB readers, you can modify the
default CSS (there is a comment in the CSS telling you what to do).

Closes #8379.
2022-10-17 13:36:18 -07:00
a-vrma 6cae8208e7 epub.css: Fix cover page selectors and add note explaining their use. (#6649) 2020-08-30 15:12:12 -07:00
John MacFarlane e2bc913c27 epub.css: wrap overlong lines in highlighted code blocks.
This fixes a problem in iBooks v2.4 with our earlier
horizontally scrolling code blocks.  The problem seems to
be a bug in iBooks, not pandoc, but since iBooks is a major
target we're changing pandoc's default behavior so that
pandoc-produced epubs work on that platform.

Closes #6242.
2020-05-18 22:58:33 -07:00
John MacFarlane 5d790db5cf Add CSS for hanging-indent div to epub.css.
This is for hanging indents with pandoc-citeproc, to be
supported in a later release.
2019-09-05 12:44:29 -07:00
John MacFarlane 8478997980 EPUB2/3 templates: Move inline styles to default epub.css.
Those who use a custom CSS stylesheet with EPUB should
add these lines:

```css
code{ white-space: pre-wrap; }
span.smallcaps{ font-variant: small-caps; }
span.underline{ text-decoration: underline; }
q { quotes: "“" "”" "‘" "’"; }
div.column{ display: inline-block; vertical-align: top; width: 50%; }
```

See #5466.
2019-05-03 22:25:46 -07:00
John MacFarlane 9097ec41a9 EPUB writer: small fixes to nav.xhtml.
* Add 'landmarks' id attribute to the landmarks nav.
* Replace old default CSS removing numbers from ol.toc li
  with new rules that match `nav#toc ol, nav#landmarks ol`.
* We keep the `toc` class on `ol` for backwards compatibility.
2019-01-02 11:24:53 -08:00
mb21 8d7ce0fdf0 HTML Writer: consistently use dashed class-names
see #3556
2017-10-31 10:40:16 +01:00
Pablo Rodríguez 74d37517eb added selectors for nested emphasis (epub.css) 2015-08-07 22:32:36 +02:00
John MacFarlane 4560447041 Don't use sup element for epub footnotes.
Instead, just use an a element with class `footnoteRef`.
This allows more styling options, and provides better results
in some readers (e.g. iBooks, where anything inside the a
tag breaks popup footnotes).

Closes #1995.
2015-05-11 21:58:01 -07:00
John MacFarlane 851703044e Simplified margin fields in default epub CSS file. 2013-07-13 14:48:14 -07:00
John MacFarlane 7445fc5382 Default epub CSS: Removed highlighting styles.
These are added automatically to individual chapter files,
depending on the highlighting style selected on the command line.
2013-07-13 14:45:12 -07:00
John MacFarlane 76c5ebf141 EPUB writer: Include html TOC even in epub2.
* The TOC is included in `<spine>`, but `linear` is set
  to `no` unless the `--toc` option is specified.
* Include `<guide>` element in OPF.
* This should allow the TOC to be useable in Kindles when
  converted with kindlegen.
* Results validate with epubcheck 3.0 for both epub and epub3
  output.
* Closes #773.
2013-03-03 08:42:45 -08:00
John MacFarlane 6666277fa2 Epub CSS: left-align headers by default.
This is more consistent with the rest of the writers.
2013-01-05 12:10:25 -08:00
John MacFarlane 2f984b6074 Moved all data files and templates to data/. 2012-12-29 18:14:29 -08:00