s1i5pw
Last Updated: July 27, 2016
·
15.49K
· itseranga

# What is LaTeX

• LaTex is a document preparation system for high-quality typesetting

• It can also introduce as a document markup language

• LaTeX is based on Tex

# What is TeX?

• TeX is a very powerful typesetting language that can be used to write almost anything

• It was designed and developed by Donald Knuth, a professor at Stanford University

• TeX is used heavily in the academic and scientific world

# How to install LaTex

• LaTeX version available for Mac is MacTex

• Please note that, I'm using MacTeX on rest of this protip

• Installation details are below

# Install vim-latex-live-preview

cd ~/.vim
git submodule add https://github.com/xuhdev/vim-latex-live-preview.git bundle/vim-latex-live-preview
• You have to specify vim-latex-live-preview plugin related configurations in your ~/. vimrc file

# vimrc configurations

• Following are the ~/. vimrc configurations

• Set the vim option updatetime to a smaller value, which is the frequency that the output PDF is updated

autocmd Filetype tex setl updatetime=1
• Set the PDF viewer. I'm using Preview viewer here
let g:livepreview_previewer = 'open -a Preview'

# Working example

• First goto your workspace and create a LaTeX document (LaTeX document should be with .tex format)
cd ~/Documents/senzors
touch introduction.tex
• Add following sample text to the introduction.tex
\documentclass{article}

\title{SenZors}
\author{Sustainable Computing Research}
\date{October 2014}
\maketitle

\begin{document}

\section{Introduction}

Real time communication platform for sensor devices

\subsection{What is SneZors}

Secured platform to share your sensor data

\subsection{Why SneZors}

\section{Technologies}

\begin{enumerate}
\item Websockets
\item Android
\item IOS
\end{enumerate}

\end{document}

• Use following command to get the PDF preview of the document
:LLPStartPreview
• This command will generates the PDF preview of you LaTeX document

• Now when you changing the text in your LaTeX document, you can see the live update of the changes (in PDF document)

• Following is an example preview

# References

#### 2 Responses

17122

Nice explanation.

over 1 year ago ·
23365

~ cd .vim
➜ .vim git submodule add https://github.com/xuhdev/vim-latex-live-preview.git bundle/vim-latex-live-preview
fatal: Not a git repository (or any of the parent directories): .git

over 1 year ago ·