Senmantic template for pyppl_report

TOC

(Click here to go back to github repository)

Table of contents will be automatically generated by scanning the document for headings.

If you want some headings to be excluded from TOC, you just do:

The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.

The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.

## Exluded {toc=false}
      whatever

Following heading will be excluded:

TOC-excluded

This is a very very very very very very very very very long heading

This is a third-level heading

Admonitions

This is a note

:::{.admon .note head=Hello}
      This is a note
      :::

This is a warning class: .warn/.warning

This is an info class: .info

This is an error

:::{.admon .error}
      This is an error
      :::

This is an example class: .example

No head

head=false

Tables

Tables with all data

You can insert links into the table by using <ALT: HREF>.

Numbers are rounded to 3 decimals if length > 10.

Tables with subset of data and download available

Tables without data file

```table
      caption: Data table
      download: true
      csvargs:
        delimiter: ","
      ---
      ID,Name,Sex,Age
      1,Bob,M,49
      2,Alice,F,20
      ```

References/Links

  • Something needs ref [1]

        - Something needs ref [[ 1 ]] <!--- No space in real case  -->
          
              - Another statement needs ref [[ 2 ]]
          
              ... ...
          
              [[1]](#PYPPL-REF-1){.pyppl-report-refindex}: ref1
              [[2]](#PYPPL-REF-2){.pyppl-report-refindex}: ref2
  • Another statement needs ref [2]

  • A link with attributes

    [A link with attributes](somelink "title"){a=1 b=2 c="xy" d=False f="m, n"}
  • A downloadable link

    [A downloadable link](./downloadfile.txt){download=true}

    If links are relative path to local files, they should be relative to the markdown file.

Images

Images are lazy-loaded.

Add a single image

<!-- empty line -->
      ![Snapshot](./snapshot.png){attributes ...}
      <!-- empty line -->
Snapshot

Add images as a combined figure

<!-- no empty lines among the images -->
      ![Snapshot](./snapshot.png)
      ![Snapshot](./snapshot.png)
      ![Snapshot](./snapshot.png)

Snapshot Snapshot Snapshot

Relative image path should be relative to the markdown file.

When pyppl_report work as a PyPPL plugin, we usually pass the absolute path. However, when it works as a CLI tool, relative path may be used.

Panels

A set of panels are blocks that only occupy one panel space in the page by using tabs or accordions, based on the number of this set of panels.

Auto-decision to use tabs or accordions

When number of panels <= 4 we will use tabs, otherwise accordions are used.

::: {.panel head=Panel1}
      Panel1 contents ...
      :::
      
      ::: {.panel head=Panel2}
      ![Snapshot](./snapshot.png)
      :::

We can also use headings (H1 up to H5) as the head/title of the panel, which will be useful if you want to put the headings in TOC.

::: {.panel}
      ### Panel1
      
      Panel1 contents ...
      :::
      
      ::: {.panel}
      ### Panel2
      
      ![Snapshot](./snapshot.png)
      :::

Panel1

Panel1 contents …

Panel2

Snapshot

A collection of panels will be automatically formed a tab or accordion sets. However, they have to be adjacent. Otherwise, they will be built as separate sets of tabs or accordions.

Accordions

Panel1

Panel1 contents

Panel2 contents

This panel will be hidden in TOC, as I used: ::: {.panel head=Panel2}

Panel3

Panel3 contents

Panel4

The quick brown fox jumps over the lazy dog.

The quick brown fox jumps over the lazy dog.

The quick brown fox jumps over the lazy dog.

The quick brown fox jumps over the lazy dog.

The quick brown fox jumps over the lazy dog.

The quick brown fox jumps over the lazy dog.

The quick brown fox jumps over the lazy dog.

The quick brown fox jumps over the lazy dog.

The quick brown fox jumps over the lazy dog.

The quick brown fox jumps over the lazy dog.

The quick brown fox jumps over the lazy dog.

The quick brown fox jumps over the lazy dog.

The quick brown fox jumps over the lazy dog.

The quick brown fox jumps over the lazy dog.

The quick brown fox jumps over the lazy dog.

The quick brown fox jumps over the lazy dog.

The quick brown fox jumps over the lazy dog.

The quick brown fox jumps over the lazy dog.

The quick brown fox jumps over the lazy dog.

The quick brown fox jumps over the lazy dog.

The quick brown fox jumps over the lazy dog.

The quick brown fox jumps over the lazy dog.

The quick brown fox jumps over the lazy dog.

The quick brown fox jumps over the lazy dog.

The quick brown fox jumps over the lazy dog.

The quick brown fox jumps over the lazy dog.

The quick brown fox jumps over the lazy dog.

Panel5

Snapshot

Panel6

Force tabs or accordions

::: {.panel .tab head=Panel1}
      panel1
      :::
      
      ::: {.panel head=Panel2}
      panel2
      :::
::: {.panel .accordion head=Panel1}
      The quick brown fox jumps over the lazy dog.
      :::
      
      ::: {.panel head=Panel2}
      panel2
      :::

Reference

[1]: ref1[2]: ref2