Ulysses distinguishes between writing and formatting the text during export to provide a distraction-free environment. This means that you need to customize the export style to change the appearance of your exported file.
Please note: The ability to customize an export style is currently only available for Mac.
If you do not have a Mac or need help customizing your export style, please get in touch with our support team directly.
Here's how to customize an export style:
- Go to the menu Ulysses and select Settings…
- Switch to Styles and choose a style from the PDF/DOCX section, e.g., Swiss Knife
- Right-click on the stylesheet and select Duplicate
- Right-click the duplicated stylesheet and select Edit in
- Select an editor of your choice, e.g., TextEdit or TextMate
- From the list below, choose what you want to adjust in your export style to see the next step:
First Line Indent
To indent the first line of the first paragraph, find or add the selector
paragraph
and adjust thefirst-line-indent
. Here is an example:paragraph { first-line-indent: 5pt }
You can also indent the first line of a paragraph, except for the first paragraph. To do so, find or add the selectorparagraph + paragraph
and adjust thefirst-line-indent
. Here is an example:paragraph + paragraph { first-line-indent: 5pt }
Typography
To adjust the default typography, find the selector
defaults
and change the name offont-family
. Here is an example:defaults { font-family: "Optima" font-size: 12pt line-height: 24pt text-alignment: justified hyphenation: yes }
You can also change the font family of other selectors such as headings or footnotes. In this case, find the specific selector (for example
heading-1
) and adjust the font to your liking.Font Size
To adjust the default font size, find the selector
defaults
and adjust the value offont-size
. Here is an example:defaults { font-family: "Avenir Next" font-size: 14pt line-height: 28pt text-alignment: justified hyphenation: yes }
You can also change the font size of all selectors, such as headings or footnotes. In this case, find the specific selector (for exampleheading-1
) and adjust it to your liking.You may also want to adjust the line height accordingly when you adjust the font size. This will make the result look proportional.
Text Alignment
To define the horizontal alignment of a paragraph’s text, find the selector
defaults
and add or changetext-alignment
toleft
,right
,center
,justified
orauto
. Here is an example:defaults { font-family: "Avenir Next" font-size: 12pt line-height: 24pt text-alignment: left hyphenation: yes }
To adjust thetext-alignment
of your headings, please find the selectorheading-all
:heading-all { line-height: 100% keep-with-following: true text-alignment: center }
Footnote Placement
To adjust the placement of your footnotes, find the selector
document-settings
and change thefootnote-placement
variable toend-of-document
,end-of-section
orend-of-page
. Here is an example:document-settings { footnote-enumeration: per-section footnote-placement: end-of-document footnote-style: decimal }
Custom Header/Footer
In Ulysses, you can only add the top-level heading or page number to your header or footer. However, a workaround allows you to display customized text in the header or footer of your document.
Find the selector
document-settings
and add the following text:page-number-format: "Individual Text / %p"; page-number-style: decimal;
Replace the “Individual Text” placeholder with a text of your choice, e.g., the author's name and/or the book title. In case you don’t want your document to contain page numbers, delete%p
.
Afterward, look for the selectorarea-footer
orarea-header
(depending on where you want to place the custom text) and make sure that the valuecontent
is set topage-number
. You can also adjust/add the valuetext-alignment
to change the alignment. Here is an example:area-header { content: page-number text-alignment: center top-spacing: 10mm bottom-spacing: 3mm }
- Save the stylesheet (optional: rename it)
- Select your customized export style in the export preview
For more information on how to customize your PDF/DOCX document, check out the following guides: