Text and Markup
texish turns ASCII source into proper typography, as TeX does — the body font enables these so they fire in ordinary running text:
Input conventions
texish turns ASCII source into proper typography, as TeX does — the body font enables these so they fire in ordinary running text:
| You type | You get |
|---|---|
``…'' | “curly double quotes” |
`…' | ‘curly single quotes’ |
-- | en–dash |
--- | em—dash |
... | an ellipsis (\dots also works) |
~ | a tie: an ordinary word space where the line may not break, as in Figure~1 |
A tie is the current font’s interword space, so on a justified line it stretches and shrinks
with every other space; it is never widened to a sentence space, so Dr.~Smith sets a plain
space after the full stop. Where the only way to fit a line would be to break at a tie, the
line breaks elsewhere or runs long. A no-break space character (U+00A0) typed in the source
is read as a tie too.
Commands and whitespace
Unlike TeX, a texish command does not swallow the whitespace that follows it. A space after a command name stays in the text, so you write commands inline and the spacing comes out as typed:
lines the way \TeX does, then \dots and on.
Because of this there is no control-space (TeX’s \ ): you never need \TeX{} or a trailing
backslash just to keep a following space — \TeX does already renders as “TeX does”. Writing
\TeX\ is in fact an error, since \ is read as a command named space, which does not
exist. Use the empty group {} only when you genuinely need to stop a command’s argument
or name early — e.g. to butt text directly against a command with no space, as in
\TeX{}nically.
A command that sets nothing — a declaration such as \itshape, \bfseries or \small, an
assignment such as \set or \stepcounter, a \def — never doubles a space, though. A typed
space is not set when the last thing set is already a space, so these all space exactly like
aa bb and aa bb cc:
aa {\itshape bb}
aa \bfseries bb
aa {\small bb} cc
aa \set n {3} bb
A command that sets text keeps the spaces on both sides as usual (\TeX does). A deliberate
extra space is \space, which is always set: aa\space\space bb is a double gap.
Line breaks and paragraphs
A single line break is a space; a blank line — nothing on it but spaces — ends the
paragraph, as does \par. A line holding only a command that sets nothing is not blank, so
this is one paragraph, “aa bb”:
aa
\set foo {3}
bb
A comment line (// …) swallows its own line break, so it neither ends a paragraph nor adds a
space. One exception keeps the usual way of closing a font or direction group working: a line
holding only a closing brace ends the paragraph, as a blank line would, so in
\rtl
{\font amiri 16 regular
…text…
}
\ltr
the text is broken right-to-left before \ltr switches back.
Emphasis and weight
The shape-wrapping commands each set their argument in one shape and revert at the closing brace:
\italic{emphasis} italic
\bold{strong} bold
\slanted{oblique} slanted (the oblique cut, distinct from italic)
\smallcaps{Small Caps} small capitals
Monospaced text
\mono sets its argument in Latin Modern Mono at the surrounding size — for file names,
inline code, and the like:
The file \mono{document.texish} defines \mono{\\maketitle}.
Because the mono face is cut to sit with the roman body, the code matches the text around it rather than looming over it.
Subscripts and superscripts
\textsub and \textsup set a subscript or superscript in running text, sized from the
current font (so they scale with the body):
H\textsub{2}O the 1\textsup{st} x\textsup{2}
(The chem package’s \dn / \up are these under chemistry-friendly names.)
Colour
\color sets the pen for the rest of the current group; \textcolor colours just its
argument. A colour is a CSS name (blue, darkred, …), a #RRGGBB hex code, a #RRGGBBAA
hex code that carries its own alpha, or the keyword transparent.
\textcolor{firebrick}{a single red word}, then black again.
{\color{blue}the rest of this group is blue.}
To make a colour translucent, add an optional [alpha] (0–1) or use an eight-digit code —
the two are equivalent:
\textcolor[0.5]{firebrick}{a half-opaque word}
\textcolor{#b2222280}{the same, written as #RRGGBBAA}
\pagecolor sets the colour painted across the whole page, under all content — a solid
band, a translucent tint, or transparent to leave the page clear. It applies to the
document’s pages, so give it in the preamble. A translucent or transparent page composites
correctly when the output is used as an overlay (for example a video lower-third):
\pagecolor[0.6]{black} // a 60%-opaque black band the video shows through
\pagecolor{transparent} // clear page; only the drawn content is opaque
The optional [alpha] and eight-digit codes work for the box fills too — \colorbox and
\fcolorbox (see Boxes) and the picture-mode \fill / \stroke.
For a band of a fixed size regardless of the text — a lower-third that is always, say, a
third of the frame tall — put the text in a fixed-height \parbox inside a translucent
\colorbox. The [height] and inner-position arguments of \parbox hold the content (a
heading and a paragraph here) top, centre, or bottom within a box that keeps its size:
\pagecolor{transparent}
\vfill
\noindent\colorbox[0.6]{black}{\parbox[c][180pt][c]{\linewidth}{
\color{white}\font lmroman 40 {sans bold}A Lower-Third Heading
\color{white}\font lmroman 22 {sans}A paragraph of normal flowing text beneath it, which
wraps as usual while the band around it stays a fixed 180pt tall.
}}
Clickable links
\href and \url produce real clickable link annotations in PDF output (and draw the
text blue on every backend). The URL is read verbatim, so a //, ~, or % in the
address survives intact.
Visit the \href{https://example.org/docs}{documentation} for details, or go straight to
\url{https://example.org}.
\href{url}{text} links the display text; \url{url} typesets the address itself, in
the monospaced face, as a link to itself.