: Re: Writing a programming book: how to present directory structures What is good/preferred way of presenting directory trees in programming books? My main criteria are following: It should be readable
I would go with option 2. However, you do not need to manually build the structure. I instead recommend using a tool such as Tree which should handle the pretty-printing for you as below:
$ tree -d /var
var
|-- backups
|-- cache
| |-- app-install
| |-- apt
| | `-- archives
| | `-- partial
| |-- apt-xapian-index
| | |-- index.1
| | `-- index.2
| |-- cups
| | `-- rss
| |-- debconf
| |-- dictionaries-common
| |-- flashplugin-installer
| |-- fontconfig
| |-- hald
| |-- jockey
| |-- ldconfig [error opening dir]
| |-- man
The script should be available as a package in your distro. I can confirm that it is in Ubuntu.
I also suggest that you contact your editor to get his/her opinion. The publisher very likely has its own style guidelines for such matters (with layout in mind). If you do go ahead with a text representation, I recommend that you add a sticky somewhere reminding you to check the indentation in the final - whitespace often gets messed up when the book is laid out.
P.S. ... and your editor will prefer a textual representation as well - saves ink ;)
More posts by @Welton431
: Describing a machine's world in a metaphorical manner The actual meaning that I want to convey is sort of like a good design covers up the nitty gritty technical aspects of a machine and provides
: A friendlier way to write charges or fees to clients? What is a better way to write in an email to tell my client that I will charge him a fee of say 0? Often, I feel very reluctant
Terms of Use Privacy policy Contact About Cancellation policy © selfpublishingguru.com2024 All Rights reserved.