Line numbers?

Is there any way to get Scrivener to output line numbers in the compiled document? Or any way to do this using MultiMarkdown?

Willis Morse

I’m not sure about MultiMarkdown, but there is no way to do this normally.

Thanks for the quick reply, Keith. Actually, I need even more :slight_smile:

State judicial transcript requirements can be extremely finicky, dictating things like:

the number of lines per page
the average number of characters per page
specific ruler layouts for different structural sections
line numbers on every page. 

We handle this now in Word with hand-crafted styles, but every time we change Word (and hence it’s internal font rasterization), we have to tweak these styles. And these styles don’t perform exactly the same between Mac and Windows versions of Word.

I’m trying to cobble together a replacement pipeline for transcript production based on Scrivener, but as none of this is handled out of the box, I assume I’m going to have to do some MMD/LaTEX/XSLT development and apply it as a postprocess. Any hints on how to approach this?


It might be worth either asking on the MMD section of the forum or on the MultiMarkdown message lists (there is a a link to it in the sticky post of the MMD forum). I don’t use MultiMarkdown myself, so I can’t really help on that score. I know that sounds odd, given that I developed Scrivener, but Scrivener really just provides a couple of front-end parts and a pipeline to MultiMarkdown, and MMD’s creator, Fletcher Penney, helped me get that right. The best people to help you are Fletcher himself - who does check these forums from time to time and may reply (otherwise he is almost certain to reply via the MMD lists) or Amber, who is a Scrivener “power-user” (one of the first Scrivener users) and uses MMD extensively.

So, hopefully one of those guys will be able to give you some tips. It sounds like the sort of thing you should be able to do, having seen poetry formats done in MMD (Fletcher never fails to impress me in what he can do with MMD), but I wouldn’t want to say for sure…


It sounds as if your best luck would be to use MMD to convert from text into LaTeX. You would need a LaTeX document class that provided the proper settings, and a MultiMarkdown XSLT stylesheet to use that LaTeX class.

A good example to look at would be the sffms styling. It was designed to use the specifications for a novel manuscript, which included font, font size, lines per page, characters per line, etc.

I would start by creating the LaTeX class and getting it working, then create a stylesheet to use that latex class and provide any specific LaTeX code that you need.

You could probably post to the MMD discussion list or to various LaTeX support sites to get assistance as you hit trouble spots. I know there are LaTeX files out there for some legal document formatting, but I don’t use them.


Thanks for all the help, guys. I’ve been meaning to dive into latex for years, and this will be the final push.


As for LaTeX and line numbers, there is a feature in the memoir poetry mode that allows for line numbers. Otherwise, I have never experimented with them personally, but I do seem to remember seeing a class for legal documents that included line numbers…