Skip to content

Syntax

In this page you can find special characters, commands and general syntax.

This plugin strives to faithfully follow the rules and syntax described in the original Tex book: The TeXBook

Special characters

In LaTeX, certain characters are reserved for specific commands and functions. Here's a brief description of each character you mentioned:

  1. { } (Curly Braces):

    • Usage: Used to group expressions or to specify arguments for LaTeX commands.
    • Example: \textbf{bold text} makes "bold text" bold.
  2. \ (Backslash):

    • Usage: Introduces LaTeX commands.
    • Example: \dddot creates a three doot element.
  3. % (Percent Sign):

    • Usage: Denotes a comment. Anything following % on that line is ignored by the LaTeX compiler.
    • Example: % This is a comment.
  4. & (Ampersand):

    • Usage: Used in tabular environments to separate columns.
    • Example: \begin{tabular}{ c c } A & B \end{tabular} creates a table with columns A and B.
  5. $ (Dollar Sign):

    • Usage: Used to delimit inline math mode.
    • Example: $E = mc^2$ typesets the equation (E = mc^2).
  6. ^ (Caret):

    • Usage: Used to denote superscripts in math mode.
    • Example: $x^2$ typesets (x^2).
  7. _ (Underscore):

    • Usage: Used to denote subscripts in math mode.
    • Example: $x_1$ typesets (x_1).

These characters have special meanings in LaTeX and are crucial for proper document formatting and mathematical typesetting.

Spacing

In LaTeX, controlling the spacing in mathematical expressions and text is essential for proper formatting and readability.

  1. \ (Backslash Space):
    • Usage: Inserts a space equivalent to the normal interword space.
    • Example: A\ B results in "A B".
  2. \; (Thick Space):
    • Usage: Inserts a thick space, equivalent to 5/18 of an em (where an em is the width of the letter "M" in the current font).
    • Example: A\; B results in a thicker space between "A" and "B".
  3. \, (Thin Space):
    • Usage: Inserts a thin space, equivalent to 1/6 of a quad (a quad is a space equal to the current font size).
    • Example: A\, B results in a thinner space between "A" and "B".
  4. \: (Medium Space):
    • Usage: Inserts a medium space, equivalent to 4/18 of an em (slightly thinner than a thick space).
    • Example: A\: B results in a medium space between "A" and "B".
  5. \kern (Explicit Space):
    • Usage: Inserts a space of a specified length, which can be positive or negative.
    • Example:
      1. A\kern1em B inserts a space of one em between "A" and "B".
      2. A\kern-1em B inserts a negative space, moving "B" closer to "A".
  6. \quad (1em Space):
    • Usage: Inserts a space of 1em.
    • Example: f(x) = \frac{a}{b} \quad \text{and} \quad g(x) = \frac{c}{d}

Units

List of supported units:

  • px (Pixel)
  • em (Em)
  • pt (Point)
  • pc (Pica)
  • in (Inch)
  • bp (BigPoint)
  • cm (Centimeter)
  • mm (Millimeter)
  • dd (DidotPoint)
  • cc (Cicero)
  • sp (ScaledPoint)

Font

Text fonts available in this plugin:

... \rm \sf \tt \bf\rm \bf\sf \bf\tt
\up ✅ cmr ✅ cmss ✅ cmtt ✅ cmbx ✅ cmssbx ✅ cmtex
\it ✅ cmti ✅ cmssi ✅ cmitt ✅ cmbxti ❌ ❌
\sl ✅ cmsl ❌ ✅ cmsltt ✅ cmbxsl ❌ ❌
\sc ✅ cmcsc ❌ ✅ cmtcsc ❌ ❌ ❌

Fonts combination

Command

The following list represents all the commands implemented by the library. For more details, it is recommended to read the library used: MicroTeX

Math Text Styles

mathbf
bf
mathit
it
mathrm
rm
mathsf
sf
mathtt
tt
mathsl
sl

Text Styles

mathscr
mathbb
mathcal
cal
mathfrak
mathds
frak
Bbb
oldstylenums
bold

Accents

^
'
"
`
=
.
~
u
v
H
r
U
T
t
accent
grkaccent
hat
widehat
tilde
acute
grave
ddot
cyrddot
mathring
bmathring
bar
breve
check
vec
dot
widetilde

Others

fatalIfCmdConflict
breakEverywhere
newenvironment
renewenvironment
makeatletter
makeatother
hspace
vspace
llap
rlap
clap
mathllap
mathrlap
mathclap
frac
sfrac
genfrac
over
atop
overwithdelims
atopwithdelims
abovewithdelims
choose
brace
brack
bangle
underscore
mbox
text
intertext
binom
nbsp
overrightarrow
overleftarrow
overleftrightarrow
underrightarrow
underleftarrow
underleftrightarrow
underbrace
overbrace
underbrack
overbrack
underparen
overparen
sqrtsign
overline
underline
mathop
mathpunct
mathord
mathrel
mathinner
mathbin
mathopen
mathclose
joinrel
vdots
ddots
iddots
nolimits
limits
normal
(
\[
left
middle
cr
linebreak
multicolumn
shoveright
shoveleft
\\
fbox
boxed
questeq
accentset
underaccent
undertilde
overset
Braket
Set
underset
boldsymbol
big
Big
bigg
Bigg
bigl
Bigl
biggl
Biggl
bigr
Bigr
biggr
Biggr
displaystyle
textstyle
scriptstyle
scriptscriptstyle
sideset
prescript
reflectbox
resizebox
shadowbox
ovalbox
cornersize
doublebox
phantom
hphantom
vphantom
definecolor
textcolor
fgcolor
bgcolor
colorbox
fcolorbox
c
IJ
ij
TStroke
tStroke
Lcaron
tcaron
lcaron
k
cong
doteq
externalFont
Text
Textit
Textbf
Textitbf
DeclareMathSizes
magnification
hline
tiny
scriptsize
footnotesize
small
normalsize
large
Large
LARGE
huge
Huge
mathcumsup
mathcumsub
hstrok
Hstrok
dstrok
Dstrok
dotminus
ratio
smallfrowneq
geoprop
minuscolon
minuscoloncolon
simcolon
simcoloncolon
approxcolon
approxcoloncolon
coloncolon
equalscolon
equalscoloncolon
colonminus
coloncolonminus
colonequals
coloncolonequals
colonsim
coloncolonsim
colonapprox
coloncolonapprox
kern
char
roman
Roman
textcircled
textsc
sc
,
:
;
thinspace
medspace
thickspace
!
negthinspace
negmedspace
negthickspace
quad
surd
iint
iiint
iiiint
idotsint
int
oint
lmoustache
rmoustache
-
XML
above
st
rowcolor
columncolor
arrayrulecolor
newcolumntype
color
cellcolor
multirow
longdiv
cancel
bcancel
xcancel

With optional Parameter

newcommand
renewcommand
rule
cfrac
xleftarrow
xrightarrow
sqrt
smash
hdotsfor
stackrel
stackbin
rotatebox
scalebox
raisebox

Environment command

smallmatrix
matrix
array
align
aligned
flalign
alignat
alignedat
multline
gather
gathered