Question

What is the best way to document console input and output? In DocBook I have used (SCREEN) and (PROGRAMLISTING) but can't find a similar tag in Doxygen.

I need two formats. A listing of console commands as seen in a script whic can be copy pasted, like:

touch foo
ls -hg foo help

And the other format which is like it was seen on a screen with output:

joe@car:~$ touch help
joe@car:~$ ls -hg foo help
ls: cannot access foo: No such file or directory
-rw-r--r-- 1 joe 9.3K Mar  5 10:23 help

Thanks/hans

Was it helpful?

Solution

I think you want @verbatim / @endverbatim.

Alternatively @code may be the equivalent for the PROGRAMLISTING mode, but I think verbatim suits your needs better.

The format of the resulting text can be adjusted in the CSS file, if you want a particular font etc.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top