Pictured above: a printout of an unformatted NRO source document (see link at bottom to get a PostScript or Plaintext copy)

What is NRO?

‘NRO is a text processor based on the design provided in “Software Tools” by Kernighan and Plauger.’ – taken from the NRO description

(link: https://gitlab.com/FDOS/unix/nro/-/blob/master/HELP/NRO)

But that’s not exactly helpful, is it? Put more simply, NRO is nroff for FreeDOS. Not sure what nroff is? For the GNU/Linux user, it’s the program that makes manpages look the way they do. The GNU version used for GNU/Linux is called groff. For those unfamiliar, each line beginning with a period (.sp 2 for example) starts a formatting command. The letters specify which command is meant. All other lines contain the text that will be formatted. To learn more about nroff, look at the following Wikipeidia article on troff: https://en.wikipedia.org/wiki/Troff

Or visit the related Lemmy:

Does DOS need this? If so, why?

Good question! I am unsure. Nonetheless, it does its intended job well. It’s possible to make easily readable documentation for DOS this way. However, groff can also be used for professional typesetting, akin to LaTeX, albeit with easier and simpler syntax. As I use groff primarily for this purpose, I was curious to see how the NRO version fared. For that, we turn to a printout of my NRO document:

The printout looks awful, and that’s mostly due to the monospaced “typewriter font” that it’s formatted with. Can this be remedied? Not without printing the document on a real PostScript printer with another font, I would think. Why don’t I know for certain? I am printing this to PDF on Linux using CUPS, which creates a PDF document using the processed NRO output. Turning away from the font however, it’s clear to see NRO did some fairly remarkable things to the source file. There is a header, an automatically numbered page, various indenting, bolded text, reasonable margins, and all the fragmented lines in the source file have been joined together to fill the page. Wow! It’s just like every other word processor! But the real question is: should you start to use NRO? Probably not, unless you already use groff on GNU/Linux already, and want to continue to use it in FreeDOS.

Is there a better way to produce professional looking PostScript and PDF documents in FreeDOS? Up next on my schedule is exploring TeX in FreeDOS.

All the files shown here can be located / downloaded at the following address: https://github.com/sennler/nro/tree/main/EXAMPLES

  • erpichtOPM
    link
    1
    edit-2
    2 years ago

    NRO is a bit cumbersome to use without macros, so I wrote mine own simple set, dubbed “MERP”. It’s a work in progress, and more macros will come, largely based on my needs for FreeDOS. Here is the source file of a document explaining the new macro commands (written using them) and pictured below is the document itself:

    Unfortunately, I haven’t yet added the MERP macros to the keywords elvis (a vi clone I use to export a printout of source files) recognizes, so all my new macro commands show up in plaintext, but on the other hand, it’s possible to see how MERP replaces most of the NRO formatting commands with more concise ones. The general goal of the macro is to let the user focus on the content by getting out of the way as much as possible.

    And the printout, while not the prettiest, shows the MERP command guide. Curious about the name? Groff macros usually follow the format -m (for macro) + initial(s), so with that in mind for “erpicht” it would make “-me”, but that is already a groff macro. As I do not intend to replicate the -me macro for NRO, I opted for the hopefully memorable and silly name -merp.

    Get the MERP macro: https://github.com/sennler/nro/tree/main/MACROS

    (All documents pictured above are also available at the github repository)