Reference
Sections
Similar to Markdown headers, plus *
for unnumbered sections.
!
goes up a level above section, while .
goes down to the paragraph level:
Emphasis
Similar to Markdown emphasis.
You can also redefine the meaning of these symbols:
To use the LaTeX character *
, wrap it in braces
(so that pairs of emphasis characters aren’t in the same group):
Lists
Similar to Markdown lists, but with less strict requirements on indentation.
Label/Ref
If your label needs spaces or trailing punctation, put it in quotes or braces:
If you want to use a custom \ref
system, such as cleveref
, you can
override the meaning of these symbols:
To use the LaTeX character @
(that’s not part of an email link),
wrap it in braces:
Cite
Links
Similar to Markdown autolinks.
Commands
\command:
makes it easier to specify commands with arguments.
The argument can be on the same line and/or on indented lines.
If the command is in the middle of a line, the argument needs to be either on the same line or indented:
Multiple arguments can be specified like a list:
~
items get treated as optional arguments:
Environments
>env
is shorthand for \begin{env} ... \end{env}
.
Indent the contents.
Required arguments can be specified with a colon:
If indented, they must use a bullet (to separate the environment from the content):
Use Packages
>>use
is shorthand for putting \usepackage{...}
in the preamble.
You can use many packages at once as an indented block:
If you put >>use
after \begin{document}
, it gets hoisted up to the preamble.
Preamble
>>preamble
puts LaTeX code in the preamble.
If it appears after \begin{document}
, it gets hoisted up.
Automatic Document Boilerplate
Texlish automatically adds the following LaTeX boilerplate if needed:
\documentclass[11pt]{article}
as the first line. To use a different document class or option, specify it manually.\begin{document}
before the first top-level line starting with apparent text content. Commands and braced text are considered valid preamble, while environments (in particularabstract
) are considered text content.\maketitle
after an added\begin{document}
, if the document uses\title
. Won’t be added if you manually specify\begin{document}
, so you can use this to override the automatic insertion of\maketitle
.\end{document}
as the last line. If you want uncompiled notes at the end of the file, feel free to specify\end{document}
yourself to delimit them.
If Texlish gets the placement wrong, add the boilerplate manually, and/or report a bug.
For clarity, most examples in this documentation disable this feature
(via the fragment: true
compiler option).