sample.e

Sample Source-Code File

If you write your documentation as part of your source-code then docs will not get lost and docs will be easier to maintain.

Euphoria comes with eudoc and creole tools. Optionally, you can install wkhtmltopdf if you want to convert html files into a pdf.

The source-code containing documentation looks like doc_Sample_e

And, when converted into documentation looks like doc_Sample_html The ultimate look can be changed with an html stylesheet.

Write your code

  • sample.e

Add some documentation using Creole style markup. Extract the documentation and automatically extract signatures by running eudoc

  • $> eudoc sample.e -o foo.txt

Convert the temporary foo.txt into html

  • $> creole foo.txt

Convert html into a pdf

  • $> wkhtmltopdf sample_e.html sample.pdf

Simple Documents

  1. Use --**** as a marker to start a standalone document section
  2. Use --** before a routine for automatic extraction of the signature
  3. Write your documentation as a block of text, each line starts with --
  4. A blank line will terminate (disrupt) a block of documentation.

Large Documents

  1. Add standard headings like Description:, Warning:

Add Hyperlinks

  1. Headings automatically become anchors
  2. For an "anchor" write @[: puts |]
  3. For a "see also" write [[: puts ]]

Table of Contents

  1. <<LEVELTOC level=2 depth=4 >>

wkhtmltopdf

Visit http://wkhtmltopdf.org/ for a utility (Windows or Linux) that converts html files into a pdf document.

Search



Quick Links

User menu

Not signed in.

Misc Menu