Ulysses Style Sheets:
How To…

…create a new style?

The best way to start is by duplicating one of the built-in style sheets. Open the “Preferences” of Ulysses and enter the “Styles” section. Just double-click one of the built-in Rich Text styles and duplicate it. If you double-click the copy again, you may edit it with a text editor. For some text editors, we provide plugins for syntax highlighting and auto-completion.

…set a custom font?

Just change the setting font-family inside the style classes you want to change. If you like to change the font of a heading, change heading-all or heading-1. If you want to change the general font, modify the defaults style:

defaults {
    font-family:  "Avenir Next";

heading-all {
    font-family:  "Futura";

…use the light or condensed variant of a font?

To use a certain variant of a font family, use the font-style setting:

heading-all {
    font-family:  "Helvetica Neue"
    font-style:   "UltraLight"

You get an overview on all font families and font styles from the Font Book application in OS X. Inside the font list, just expand the font family entry and you will get a list of all available font styles.

…center a heading?

Just set the text-alignment of a heading:

heading-all {
    text-alignment: center

If you like to center only a specific heading level, use selectors like heading-1 or heading-4.

…add a page break before a heading?

If you like to add a page break before a certain heading level, add the page-break: before setting to the heading class.

Additionally, if page breaks should also restart numbering of footnotes, you should consider updating the section-break setting in the document-settings class.

…change the indent of the first paragraph?

Using the pseudo-class :first, you can create styles that only match the first paragraph of your sheet:

paragraph {
    first-line-indent: 10pt

paragraph :first {
    first-line-indent: 0pt

If you like to vary the first line indent after a heading, you may use a class relation:

heading-all + paragraph {
    first-line-indent: 0pt

This style only matches those paragraph which follow a heading. To learn more about pseudo-classes and style relations, please refer to the syntax reference.

…change the enumeration of lists?

The enumeration style of text lists can be set using the enumeration-format and enumeration-style settings. For instance, to set alphabetic enumeration of text lists, just change the style of list-ordered:

list-ordered {
    enumeration-format: "%p)"
    enumeration-style:  lowercase-alpha

The placeholder %p will be replaced by the enumeration character during export. Using this style, your list will be enumerated by “a), b), c)”. If you would like to vary enumerations among list levels, use a relative style:

list-ordered {
    enumeration-format: "%p."
    enumeration-style:  decimal

list-ordered list-ordered {
    enuemration-format: "%p)"
    enumeration-style:  lowercase-alpha

Using this style, the first level will be enumerated by “1., 2., 3.”. All nested levels will be enumerated alphabetically: “a), b), c)”.

…change the enumeration or placement of footnotes?

To change the way footnotes are enumerated or placed, adjust the footnote-enumeration and footnote-placement settings inside the document-settings class.

…export my original markup?

For all technical content, you can use classes like ulysses-tag or ulysses-escape-character. These classes are invisible by default. To make them visible, insert the following code snippet:

ulysses-tag {
    visibility: visible

…set the paper format?

To adjust the paper format for your PDF file, you can use the paper-height and paper-width settings inside the document-settings class. You may also create a two-sided document with varying page insets there.

…create a table of contents, bibliography or a reference?

Unfortunately, this is currently not supported. However, we have plans to add it in future releases of Ulysses.