Skip to content

Update MANUAL.txt to mention custom-style works with ODT #9655

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 12 additions & 11 deletions MANUAL.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7165,16 +7165,16 @@ To disable highlighting, use the `--no-highlight` option.

# Custom Styles

Custom styles can be used in the docx and ICML formats.
Custom styles can be used in the docx, odt and ICML formats.

## Output

By default, pandoc's docx and ICML output applies a predefined set of styles
for blocks such as paragraphs and block quotes, and uses largely default
formatting (italics, bold) for inlines. This will work for most
purposes, especially alongside a `reference.docx` file. However, if you
need to apply your own styles to blocks, or match a preexisting set of
styles, pandoc allows you to define custom styles for blocks and text
By default, pandoc's odt, docx and ICML output applies a predefined set of
styles for blocks such as paragraphs and block quotes, and uses largely
default formatting (italics, bold) for inlines. This will work for most
purposes, especially alongside a [reference doc]{#option--reference-doc} file.
However, if you need to apply your own styles to blocks, or match a preexisting
set of styles, pandoc allows you to define custom styles for blocks and text
using `div`s and `span`s, respectively.

If you define a `div` or `span` with the attribute `custom-style`,
Expand All @@ -7185,7 +7185,7 @@ the `bracketed_spans` syntax,

[Get out]{custom-style="Emphatically"}, he said.

would produce a docx file with "Get out" styled with character
would produce a file with "Get out" styled with character
style `Emphatically`. Similarly, using the `fenced_divs` syntax,

Dickinson starts the poem simply:
Expand All @@ -7197,8 +7197,9 @@ style `Emphatically`. Similarly, using the `fenced_divs` syntax,

would style the two contained lines with the `Poetry` paragraph style.

For docx output, styles will be defined in the output file as inheriting
from normal text, if the styles are not yet in your reference.docx.
Styles will be defined in the output file as inheriting
from normal text (docx) or Default Paragraph Style (odt), if the
styles are not yet in your [reference doc]{#option--reference-doc}.
If they are already defined, pandoc will not alter the definition.

This feature allows for greatest customization in conjunction with
Expand All @@ -7209,7 +7210,7 @@ want all italics to be transformed to the `Emphasis` character style
transform all italicized inlines to inlines within an `Emphasis`
custom-style `span`.

For docx output, you don't need to enable any extensions for
For docx or odt output, you don't need to enable any extensions for
custom styles to work.

[pandoc filters]: https://pandoc.org/filters.html
Expand Down