PRG2LOUT(1)
β¨ PRG2LOUT π
okay bestie so this is a page from the General Commands Manual, and the command is literally called prg2lout π yes it's a whole vibe.
πΈ NAME πΈ
prg2lout β turns computer program text into Lout, no cap π
π¦ SYNOPSIS π¦
prg2lout -l language [ options ] files...
β¨ DESCRIPTION β¨
so what this does is reformat computer program text so it can be fed into the Lout document formatting system β and it handles all the fiddly stuff for you: comments, character strings, tab characters, etc. π«Ά
prg2lout reads the program source files you name and spits out output that's ready to be piped into lout -s. so like:
prg2lout -l C foo.c | lout -s | lpr
that right there will print the C program foo.c on a PostScript printer. periodt. π
and each file starts on a fresh new page, with its name in bold up at the top like the main character it is π
π OPTIONS π
-llanguageβ compulsory!! like you genuinely have to give this one. your files are written in this programming language. runprg2lout -uto see the full list of languages available π-pfixedβ use a fixed width font (this is the default for C).-pvaryingβ use a varying-width italic font with non-italic bold keywords (this is the default for Eiffel).-psymbolβ use a varying-width italic font with mathematical symbols and non-italic bold keywords.-nβ don't print the file name before each source file.-f fontβ pick a font family. default is-fCourierfor-pfixed, and-fTimesfor-pvaryingand-psymbol.-s sizeβ pick a Lout font size. default is-s9p(meaning 9 points) for-pfixed, and-s10pfor-pvaryingand-psymbol. these ones work well with 80-character-wide programs π-v vsizeβ pick a Lout vertical inter-line gap. default is-v1.1fx, meaning 1.1 times the font size, measured from baseline to baseline.-b numβ pick a blank line scale factor. default is-b1.0, meaning no scaling at all. a good alternative is0.6β¨-t numβ set the tab interval to num characters (default is-t8).-T widthβ without this option,prg2loutsimulates tabs with spaces. with this option,prg2loutsimulates tabs with Lout tabulation operators; width is the width of one tab interval in the final print, measured in Lout units. this guarantees alignment of characters following tabs even with varying-width fonts, provided width is sufficiently large. for example,-T0.5iproduces half-inch tab intervals π-L numberβ attach line numbers to the program text, beginning with number or1if number isn't given. heads up bestie, you may need to give the1anyway to preventprg2loutfrom taking a following file name as a number π-Nβ don't print line numbers on blank lines.-Mβ like-Nbut it also doesn't assign line numbers to blank lines.-S filenameβ use filename as the setup file instead of the system default setup file. the setup file determines the value of all formatting options that weren't given toprg2loutas command line arguments.-uβ print usage information onstderr, including available languages, and exit.-Vβ print version information onstderrand exit.
π Raw Mode π
there's a "raw mode" usage of prg2lout that you invoke with a -r flag β and it must be the first argument, no exceptions π. this converts one program file into Lout-readable source with no heading and no trailing information. synopsis:
prg2lout -r -i infile -o out -e err -t num -T width
bestie you should literally never need this mode. it gets invoked automatically from inside Lout by symbols supplied with the standard configuration (see reference). so like, don't touch it, it's giving internal machinery π
π₯ SEE ALSO π₯
lout(1), lpr(1), ghostview(1).
π REFERENCES π
Jeffrey H. Kingston, βA User's Guide to the Lout Document Formatting Systemβ, Chapter 11.
π AUTHOR π
Jeffrey H. Kingston
and that's the whole page, bestie π«Ά shoutout to the General Commands Manual and to that little PRG2LOUT(1) footer tag chilling at the bottom β you ate, fr fr πβ¨π
π¦ where this page comes from
- arch rolling: lout 3.43.4-1 Β· GPL-3.0-or-later
- fedora 43: lout 3.40-30.fc43 Β· GPL-2.0-or-later
- fedora 44: lout 3.40-31.fc44 Β· GPL-2.0-or-later
- opensuse-leap 16.0: lout 3.41.0-bp160.1.34 Β· GPL-2.0-or-later
- opensuse-leap 16.0: lout 3.41.0-bp160.1.34 Β· GPL-2.0-or-later
- opensuse-leap 16.0: lout 3.41.0-bp160.1.34 Β· GPL-2.0-or-later
- opensuse-leap 16.0: lout 3.41.0-bp160.1.34 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms