Skip to content

MS File Format (.ms)

An MS file is a troff document marked up with the ms macro package, one of the original Unix macro sets for typesetting papers, letters and reports through groff or troff.

.msDocuments

MS at a glance#

Full nameroff ms macros
File extension.ms
CategoryDocuments
DeveloperM. E. Lesk (Bell Laboratories)
First released1978
MIME typestext/troff
CompressionUncompressed
FileFlip supportFileFlip writes this format but cannot open one

What a .ms file can hold#

These are the things a MS file either supports or does not, and they are what decides whether a conversion keeps everything or quietly drops something.

Selectable textYes
Human readableYes

Strengths and limitations of MS#

What MS does well

  • Predates LaTeX and still ships with every groff install, so it needs nothing extra on any Unix-like system
  • Compiles fast, since troff is a lightweight single-pass formatter rather than LaTeX's multi-pass engine
  • Produces PostScript or PDF output solid enough that Bell Labs used it for real internal manuals and books

Where MS falls short

  • Markup is terser and less mnemonic than LaTeX's, with two-letter macro names like .PP and .LP instead of named commands
  • Math typesetting is much weaker than LaTeX's, so it's rarely chosen for anything math-heavy
  • Almost nothing outside the roff toolchain reads an .ms file directly, so it's usually encountered only as a Pandoc or groff output target

Use the ms macros to produce a document on a minimal Unix system where a full TeX install isn't available or wanted.

Convert ms output to PDF or HTML when the reader needs a normal document instead of a file that has to run through troff first.

How to open a .ms file#

A .ms file opens in the programs below, grouped by the platform you are on.

PlatformPrograms that open it
macOSgroff (via Homebrew), Vim
Linuxgroff, Vim, Emacs

MS questions people ask#

What is an .ms file?

An .ms file is plain text written with the ms macro package for troff, one of the original Unix formatters for papers and reports. It's read by feeding it to groff or troff rather than opening it in a document viewer.

How do I turn an .ms file into a PDF?

Running `groff -ms -T pdf file.ms > file.pdf` compiles an .ms file to PDF. The `-ms` flag tells groff to load the ms macro package before processing the file.

What's the difference between ms and man macros?

Both are troff macro packages from the same Unix-era toolchain, but ms formats standalone documents like papers, letters and reports, while man formats the terse, section-based layout of a Unix manual page.

Converting MS files#

FileFlip cannot open a .ms file, so there is nothing to convert it into here. It appears on the site as something other formats can be converted to.

Every conversion runs inside your browser. The file is read from your disk, the work happens on your own machine, and nothing is uploaded. How FileFlip works names the engine behind each family and how to verify that for yourself.