Text
Paragraphs and line breaks
A blank line does not make a paragraph, and a line break in the source is not a line break in the page. The reason: LHTML is HTML-first. What is not one of its symbols is HTML, and a browser reading HTML joins the lines of the source, blank lines included. LHTML keeps that rule, so that the HTML you write or paste behaves as it does everywhere else.
A first line
and a second one.
A line after a blank line.HTML produced
A first line
and a second one.
A line after a blank line.To separate them, write the paragraphs and the line breaks in HTML, with <p> and <br>:
<p>A first paragraph.</p>
<p>A second paragraph,<br>
on two lines.</p>HTML produced
<p>A first paragraph.</p>
<p>A second paragraph,<br>
on two lines.</p>Or render every line break of the source: the option line-breaks: true in the configure.yaml of
lhtml-site, or -b for the lhtml command. Each line break then becomes a <br>, blank lines
included; headings, lists and blocks get none.
Bold, italic and inline code
This is **bold**, this is __italic__,
and this is `inline code`.HTML produced
This is <strong>bold</strong>, this is <em>italic</em>,
and this is <code class="code-inline">inline code</code>.**...**is<strong>,__...__is<em>. They nest (**bold __and italic__**), but do not cross.- Bold and italic stay on their line: a
**opened on one line and closed on the next is left as text, with a warning.
Inline code is literal
Nothing between backquotes is converted: neither **, nor __, nor a tag. Its < and > are
shown as they are.
Write `**bold**` to get **bold**.
A list of floats: `std::vector<float>`.HTML produced
Write <code class="code-inline">**bold**</code> to get <strong>bold</strong>.
A list of floats: <code class="code-inline">std::vector<float></code>.Outside the backquotes, <float> would be read as an HTML tag, which the browser does not show.
A space
::nl is a one-line vertical space:
Above
::nl
BelowHTML produced
Above
<div style="height:1em;"></div>
BelowSlide themes have a gap:: macro for spaces of several sizes: gap::s, gap::, gap::l,
gap::xl (see Your own tags: macros).
Next: Blocks and styles. All the rules: Syntax reference.