PRG2LOUT(1)

πŸ“¦ version 3.43.4, in arch rolling, fedora 43, fedora 44, opensuse-leap 16.0

✨ 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. run prg2lout -u to 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 -fCourier for -pfixed, and -fTimes for -pvarying and -psymbol.
  • -s size β€” pick a Lout font size. default is -s9p (meaning 9 points) for -pfixed, and -s10p for -pvarying and -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 is 0.6 ✨
  • -t num β€” set the tab interval to num characters (default is -t8).
  • -T width β€” without this option, prg2lout simulates tabs with spaces. with this option, prg2lout simulates 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.5i produces half-inch tab intervals πŸŽ€
  • -L number β€” attach line numbers to the program text, beginning with number or 1 if number isn't given. heads up bestie, you may need to give the 1 anyway to prevent prg2lout from taking a following file name as a number 😭
  • -N β€” don't print line numbers on blank lines.
  • -M β€” like -N but 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 to prg2lout as command line arguments.
  • -u β€” print usage information on stderr, including available languages, and exit.
  • -V β€” print version information on stderr and 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 πŸ’–βœ¨πŸŽ€