gillescastel / latex-snippets

Vim + LaTeX snippets setup
MIT License
1.03k stars 201 forks source link

latex math packages #9

Closed ivannomad closed 3 years ago

ivannomad commented 4 years ago

Hello! For math I use next \usepackage{mathtools, amssymb}. If I type \mathbb{R} in .tex file it compile as double-struck R which means real numbers. But in your tex.snippet file you use next code for number sets:

snippet RR "real" iA
\R
endsnippet

I think, that is more convenient than \mathbb{R}. But unfortunately, my compiler not recognise \R even if I use it in math mode $\R$ What math packages do you use for this?

NikitaEvs commented 4 years ago

Hello! You can find a definition for \R command in his preamble.tex. \newcommand\R{\ensuremath{\mathbb{R}}}

ivannomad commented 4 years ago

Thanks, it really help me! But I made minor changes. Now my commands look as follow:

\newcommand{\N}{\mathbb{N}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\Q}{\mathbb{Q}}
\renewcommand{\O}{\emptyset}
NikitaEvs commented 4 years ago

You are welcome!

gillescastel commented 3 years ago

Great question @ivannomad and thanks for answering @NikitaEvs!