-
Notifications
You must be signed in to change notification settings - Fork 3
Macros description
Here are the available macros provided by pandoc-gpp
:
\include{filepath}
\code{language}{filepath}
\tabular{title}{data}
\u{text}
\color{color}{text}
\abbr{title}{abbreviation}
\relativeSizeImage{caption}{percentage}{path}
\graph{chartType}{path}{title}{imgdir}{caption}
This macros allows you to include the content of a file inside the current file. This macro is available for every input/output format.
some data
\include{content.md}
other stuff.
Here is the content of content.md
:
## Hello my World !
some data
Hello my World !
----------------
other stuff.
This macro allows you to include code from a file. This macros is available for every output format but is only available from markdown input format.
\code{java}{HelloWorld.java}
~~~~ {.java}
import java.lang.*;
int public static main(String[] args){
System.out.println("Hello World !");
return 0;
}
~~~~
This macro allows you to include a table with caption, the data been taken from a csv table included in the data file provided. This macros is available for every output format but is only available from markdown input format.
blabla
\tabular{"What a cool table!"}{test.csv}
yeah some cool stuff
blabla
+-------------+--------------+----------------+-------------+-------------+
| | january-13 | february-13 | march-13 | april-13 |
+=============+==============+================+=============+=============+
| number | 7 | 23 | 96 | 79 |
+-------------+--------------+----------------+-------------+-------------+
| quantity | 17 | 76 | 25 | 21 |
+-------------+--------------+----------------+-------------+-------------+
| sum | 11124 | 32221 | 43242323 | 44432 |
+-------------+--------------+----------------+-------------+-------------+
: What a cool table!
yeah some cool stuff
This macro is used to underline text. This macros is available for html/epub/latex/pdf output format but is available for every input formats.
some data
\u{This text will by underlined}
other output
<p>some data</p>
<p><u>This text will by underlined</u></p>
<p>other output</p>
This macro is used to put text in color. This macros is available for html/epub/latex/pdf output format but is available for every input formats.
For the moment only known colors such as "blue", "red", etc are available for both HTML and LaTeX-based output formats.
some text
\color{blue}{**This one will be in bold face**}
the rest of the text.
<p>some text</p>
<p><span style="color:'blue'"><strong>This one will be in bold face</strong></span></p>
<p>the rest of the text.</p>
This macros is create footnotes and abbreviations. This macros is available for html/epub/latex/pdf output format but is available for every input formats. It creates abbreviations in HTML-based output formats and footnotes in LaTeX-based ones.
some text.
Look at me, \abbr{It means NOW!}{right now}
I'm just kidding! :)
<p>some text.</p>
<p>Look at me, <abbr title="It means NOW!">right now</abbr></p>
<p>I'm just kidding! :)</p>
This macros allows you to include images with defined percentage (based on the line width of the image container) with a caption. This macros is available for html/epub/latex/pdf output format but is available for every input formats. The percentage must be a value between 0 and 1 (something like 0.8 for example).
some text
\relativeSizeImage{"Oh yeah!"}{0.8}{hello-world-sandwich.jpg}
This is the end.
<p>some text</p>
<figure>
<img style="width:'80.0%'" src="hello-world-sandwich.jpg"/>
<figcaption>
"Oh yeah!"
</figcaption></figure>
This macro allows you to include graphs based on a csv table from a data file with a caption.
The only available chart type is bar chart.
The imgdir
correspond to the location where the images corresponding to the charts will be stored.
This macros is available for html/epub/latex/pdf output format but is available for every input formats.
before the graph
\graph{bar}{test.csv}{"my freaking title"}{.}{"my fraking caption"}
after the graph
<p>before the graph</p>
<figure>
<img src="./bar_chart.png"/>
<figcaption>
"my fraking caption"
</figcaption></figure>
<p>after the graph</p>