-
The
parskip
command makes a skip between paragraphs. The length of skip can be set using the command\setlength
, e.g.,\setlength{\parskip}{15pt plus 1pt minus 1pt}
-
The command
\itemsep
sets the space between items in lists, e.g.,\begin{itemize} \itemsep = 0.8cm \item \end{itemize}
-
The …
LaTeX for Chinese
xetex
is the state-of-art way for dealing with Chinese type setting. You can installxetex
on Debian series of Linux distributions (Debian, Ubuntu, Linux Mint, etc.) using the following command.
wajig install texlive-xetex
You can use command xelatex
to compile.
The utf-8 format is preferred.
There are 2 good ways …
LaTeX Commands for Compiling
- LaTeX
- If your LaTeX code contains only EPS figures, you can use the
latex
command (also OK to usepdflatex
) to compile your code. - If you use bibtex, you have to compile your code using commands
latex
,bibtex
,latex
andlatex
in sequence. - If you use the
psfrag
package to …
- If your LaTeX code contains only EPS figures, you can use the
Graphics in LaTeX
-
Generally PDF figures are preferred for LaTeX code.
-
There are many useful commands in Linux for converting between different types of figures, e.g.,
convert
,pdf2ps
, etc. So it does not matter much which types of figures you produce. You can always convert them into other format when needed. -
The …
Check Whether an Email Address Is Valid in Java
See the following code.
String email = "test@test.com";
Pattern p = Pattern.compile(".+@.+\\.[a-z]+");
Matcher m = p.matcher(email);
boolean matchFound = m.matches();
if(matchFound){
System.out.println("EMAIL OK");
}else{
System.out.println("EMAIL ERROR");
}
Useful Packages and Commands for LaTex
Math Packages
- \usepackage{amssymb}
- popular math fonts
- \usepackage{dsfont}
\mathds
font
- \usepackage{bm} % bold math symbols
- bold math symbols
- \usepackage{amsmath}
- math formulas.
- \usepackage{amsthm}
- theorem environments
- proof enviroment
List Packages
- \usepackage{enumerate}
- universal list
Graphics Packages
- \usepackage{ifpdf}
- allow including figures without extensions and select the right type of …