Skip to content

Commit

Permalink
doc: added new quick-start file
Browse files Browse the repository at this point in the history
refer: #1946
  • Loading branch information
lervag committed May 24, 2021
1 parent d569ed8 commit 96dfb03
Show file tree
Hide file tree
Showing 2 changed files with 162 additions and 16 deletions.
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,18 @@ If you use the new package feature in Vim, please note the following:

The following is a video guide for how to use VimTeX (credits:
[@DustyTopology](https://github.com/lervag/vimtex/issues/1946#issuecomment-846345095)).
It displays some of the main features. Users are of course _strongly_
encouraged to read the documentation, at least the introduction, to learn about
the different features and possibilities provided by VimTeX (see [`:h
vimtex`](doc/vimtex.txt)).
It displays some of the main features. The example LaTeX file used in the video
is available under
[`test/example-quick-start/main.tex`](test/example-quick-start/main.tex) and it
may be instructive to copy the file and play with it to learn some of these
basic functions.

https://user-images.githubusercontent.com/66584581/119213849-1b7d4080-ba77-11eb-8a31-7ff7b9a4a020.mp4

Users are of course _strongly_
encouraged to read the documentation, at least the introduction, to learn about
the different features and possibilities provided by VimTeX (see [`:h
vimtex`](doc/vimtex.txt)).
Advanced users and potential developers may also be interested in reading the
supplementary documents:

Expand Down
165 changes: 153 additions & 12 deletions test/example-quick-start/main.tex
Original file line number Diff line number Diff line change
@@ -1,12 +1,153 @@
\documentclass{minimal}
\begin{document}

% \ll Start/Stop compiling the document
% \lk Stop the running compilation
% \lv Open pdf viewer and/or do forward searching with
% \le Parse the log file for errors and warnings
% \lc Clean auxiliary files (\lC to also clean pdf files)

Hello world!

\end{document}
\documentclass{article}

% These are only here for the sake of this tutorial.
\usepackage{amsmath}
\newcommand{\lt}{\textbackslash{}lt }
\newcommand{\lk}{\textbackslash{}lk }
\newcommand{\lv}{\textbackslash{}lv }
\newcommand{\lc}{\textbackslash{}lc }
\renewcommand{\ll}{\textbackslash{}ll }
\renewcommand{\le}{\textbackslash{}le }

\begin{document}

\section{Compiling}

Press \ll to start (or stop) compiling the document.
This turns on automatic compiling if supported by your compiler, meaning your
document will be compiled each time you save.

Press \lk to stop the compilation process

Press \lc to clear auxiliary files.














\section{Forward and Backward Search}

Press \lv to forward search. This will open the compiled PDF.

Some PDF viewers support the ability to jump to the current location in the PDF.

Some also support backward search (jumping from PDF to source).
















\section{Errors, Warnings and the QuickFix window}

VimTeX will populate the QuickFix menu with any errors and warnings it finds in
the log file.

This is done after (attempting to) compile or pressing \le.

\le also closes the QuickFix menu when it is open.

\emph{Example.} Let's put some undefined commands here and compile:

Moving to the QuickFix window and pressing enter on the error entry moves the
cursor to the line containing the error. We can fix the error and continue.










\section{Document Overview}

Press \lt to show a window with a table of contents for your document.

Also shows labels, references and TODOs.

Can be used to jump to sections, labels, references and TODOs.

% TODO: Show table of contents.














\section{Motions and Text Objects}

VimTeX adds various LaTeX specific motions and text objects.

\emph{Example motion.} move between section boundaries with [[, [], ][ and ]].

\emph{Example text object.} ic refers to a LaTeX command excluding the
backslash. ac includes the backslash.

cic: \( \alpha \)

dac: \( \)











\section{Other Cool Stuff}

cse changes the surrounding environment:

\begin{equation}
v \cdot \nabla_x f_1 = -\sigma_a f_1, \quad f_1 \rvert_{\Gamma_-} = \phi(x,v).
\end{equation}

tsd toggles between () and \( \left( \right) \):

\begin{equation*}
\frac{d}{ds} \left[ e^{\int_k^s \sigma_a(x + tv)\,dt} F_1(s) \right] = 0
\end{equation*}

tse toggles the * in environments:

\begin{equation}
f_1(x, v) = e^{-\int_0^{\tau_-(x, v)} \sigma_a(x - sv)\,dt} \phi(x_-, v),
\end{equation}

This is only a tiny sliver of what VimTeX offers.
Read the README for an overview, and read :h vimtex for a full description of
all things VimTeX.

\end{document}

0 comments on commit 96dfb03

Please sign in to comment.