All Collections
Author Help
In Markua, can I override the global code block line numbering setting?
In Markua, can I override the global code block line numbering setting?

Keywords: override, code block, line numbering

Leanpub Support avatar
Written by Leanpub Support
Updated over a week ago

Yes, you can override the global setting for code block line numbering on a per-code-block basis.

You can check the global setting for "Show line numbers on code samples" on your Book Theme page here:

https://leanpub.com/YOUR_BOOK/settings/theme

...making sure to replace YOUR_BOOK with your book's unique web address.

You can override this setting on any code block.

To turn line numbering off on a code block, you can do this:


โ€‹

{line-numbers: false}

```

Foo

Bar

Baz

```


To turn line numbering on for a code block, you can do this:

{line-numbers: true}

```

Foo

Bar

Baz

```

Here is the relevant section from the Markua manual:


โ€‹

Did this answer your question?