5.2. Reports

Reports are slightly more complex but related to consoles. They are used to produce full output of some program. It is the base object for producing textual files with images embedded.

Reports are created in the project in two ways:

5.2.1. Bulding up the reports

This method has two ways of proceeding. Either the user constructs the report along the way, using commands:

report r:
r.chapter "chapter1"
r.write "this and that"
r.section "asdf"
r.write
r.section "section2"

Or construct the pieces paste them together:

report r:
Section s: "section1"
s.write "asdfsadf"
section s2: "section2"
s.write "asdsaf"
# here, the report is still empty
r.add s1
r.add s2
#  now the report is complete

Those two ways can be mixed and used in the same report, like:

(Example)

5.2.2. Reports from templates

The second way to write reports, is just have a template ready, prepared with other software, and fill-in some data:

report r: .template myfile.latex

Logically, those reports can be only be saved in the format that came with the template. (i.e, a report from a latex template can’t be later saved as .html)

5.2.3. Output format

Reports can be produced in pdf, html:

report r:
r.chapter "chapter1"
r.write: The sooner comes sooner as the later
.save report1.pdf ## if a line starts with . , the
                  ## last object is assumed

5.2.4. Some objects for reports

5.2.4.1. Formulas

Formulas can be introduced in reports, using the mathxml or latex format


5.2.5. chapter, sections and paragraphs

Reports can be structured using several heading levels.


5.2.6. Figures

figures are central to the reports: Don’t forget that, in anableps, reports are here just to be able to present the figures in a good way:

figure f: -source canvas1

5.2.6.1. Sources

The utility of figures is that they point directly to the scene. Any changes in the scene will be immediately reflected on the output, so the document is always updated

5.2.6.2. Multifig

Examples:

multifig f: -source1 canvas1 -source2 canvas4 -source3 myScene

a multifig can choose making some cell larger:

multifig f: -cells 4x5  cell(4,4).span 2x2

Que se le pasa a las figuras??? canvas o escenas


5.2.7. Table

tables are a powerful tool. they serve both as a source of data (being usually imported from cvs files) and as powerful displaying tool:

table c: .from file1.csv
d = c.region rows 3 4 5 .cols 2 3
     # we create d table out of data from c

5.2.7.1. working with tables

5.2.7.2. displaying tables

Table object contain several attributes that can be used to customize the