OpenBSD Journal


Contributed by jose on from the pretty-pf-syntax dept.

Maik writes: "sent to

Graphical syntax diagrams for pf.conf (pdf): (71k)

I have made a smal shell-script that creats a tex file with the syntax from "man pf.conf".

The tex file produced by pf2syn: (11k)

The script, a sed commands file and a sample main_pdf.tex file (tgz): (2k)

How to create the pdf file:

  $  pf2syn > syn.tex
  $  pdflatex main_pdf.tex
  $  rail main_pdf
  $  makeindex main_pdf
  $  pdflatex main_pdf.tex
You need the program rail:


  • "-" in non-terminal, at the moment replaced by "."
  • links non-terminal -> definition
Does someone else know programs to prodcue "rail way diagrams" in LaTeX? I found "rail" and "syngen", but I only get "rail" to work..."

(Comments are closed)

  1. By Anonymous Coward () on

    Screw pf.conf. Why not make it follow the parser (.y) source ?

    1. By m () on

      like this?

  2. By marklar () on

    Nice work! I guess my procrastination on learning pf paid off, this should make things easier now.

  3. By Anonymous Coward () on

    Nice, I'll probably start carrying this around in stead of a printout of the manpage :)

Latest Articles


Copyright © - Daniel Hartmeier. All rights reserved. Articles and comments are copyright their respective authors, submission implies license to publish on this web site. Contents of the archive prior to as well as images and HTML templates were copied from the fabulous original with Jose's and Jim's kind permission. This journal runs as CGI with httpd(8) on OpenBSD, the source code is BSD licensed. undeadly \Un*dead"ly\, a. Not subject to death; immortal. [Obs.]