Skip to content

PillarSyntax

Etienne DELAY edited this page Feb 6, 2019 · 6 revisions

Install pillar on our computer

Most of the information about pillar are available here. But we provide there a quick starter quite in order to compile in PDF/html the book source code.

Install for Linux users

Those command line will download a pharo distribution made for pillar.

git clone [email protected]:cormas/Booklet-CORMAS.git
cd Booklet-CORMAS/
git clone https://github.com/pillar-markup/pillar.git -b dev-7
cd pillar && ./scripts/build.sh && cd ..
cd Booklet-CORMAS/
. pillar/scripts/ci/ensure_latex.sh
./pillar/scripts/ci/ensure_book_dependencies.sh
./pillar/build/pillar build pdf

It produce a pdf file : _result/pdf/book.pdf

Compilation from sources

In order to build a human reading file, you need to compile the source file :

./pillar export --to=html book.pillar

Cheatsheets

information from html. Pillar is a maked language as markdown.

Chapters & Sections

A line starting with ! represents a heading. Use multiple ! to create sections and subsections.

Paragraphs and Framed Paragraphs

An empty line starts a new paragraph.

An annotated paragraph starts with @@ followed by a keyword such as todo and note. For example,

@@note this is a note annotation.

Formatting

  • To make something bold, write ""bold"" (with 2 double quotes)
  • To make something italic, write ''italic'' (with 2 single quotes)
  • To make something monospaced, write ==monospaced==
  • To make something strikethrough, write --strikethrough--
  • To make something subscript, write @@subscript@@
  • To make something superscript, write ^^superscript^^
  • To make something underlined, write __underlined__

Unordered Lists

Bullet point :

-A block of lines,
-where each line starts with ==-==
-is transformed to a bulleted list

generate

  • A block of lines,
  • where each line starts with ==-==
  • is transformed to a bulleted list

Ordered Lists

#A block of lines,
#where each line starts with ==#==
#is transformed to an ordered list

for

  1. A block of lines,
  2. where each line starts with ==#==
  3. is transformed to an ordered list

Introduce code

[[[label=script1|caption=My script that works|language=smalltalk
self foo bar
]]]

Bibliographie

Cassou D. Ducasse S. Fabresse L. Fabry J. Caekenberghe S. V., 2016,Documenting and Presenting with Pillar , in Enterprise Pharo a Web Perspective, p 209-232.

Ducasse S. and Polito G., 2017, Publishing Documents with Pillar 7.0, Square Bracket tutorials

It creates an output.html.json file note yet readable by humans.

./mustache --data=output.html.json --template=support/templates/html.mustache > myfile.html

Et voilà !

Clone this wiki locally