-
LaTex & TexLive TipsResearch Programming 2013. 3. 13. 16:20[TexLive]설치시 custom install 들어가서 small scheme (~350MB) 설치 뒤,TexLive manager 사용하여 잘 터지는(!) repository 선택하고,medium scheme (~1GB) 설치하여 사용(windows에서 texlive manager에서 오른쪽 클릭으로 박스가 선택되는 기현상 있음).: small scheme에서 package, font missing 일어나고, medium scheme은 충분해 보임[20170623].[Latex]
|x\>\!\> : double bracket
- Use '\begin{cases}', '\substack' and '\nolimits' or '\limits'
f(n) = \begin{cases} n/2 &\mbox{if } n \equiv 0 \\
(3n +1)/2 & \mbox{if } n \equiv 1. \end{cases} \pmod{2} - Inline verbatim environment: \verbatim| xxx |
- Putting figures on side: Use `wrapfig' package.
- Submission to APS:
- include a 'bbl' file for bibtex and upload by a single zip file
- references with hyperlinks are forced to be in a single line that results in references running off pages.; Remove hyperlinks.
- hyperref package => url="http://xxxxx"
- url package => howpublished="\url{http://xxxxx}"
- To keep the capital letters in references, use {x} or {{x}}
Some ``professional'' symbols
- majorization order relations: \succ, \prec
- gradient: \nabla
- normal subgroup: \lhd, \unlhd
- Direct sum
\bigoplus_{j=1}^{d}
\sideset{}{_i}\bigoplus_{j=1}^{d} (amsmath)
\bigoplus\limits_{j=1}^{d}_i (amsmath) - Tensor product
\bigotimes - Arrow with letters
\xrightarrow[under letter]{over letter}
\overset{f}{\rightarrow}, \underset{y}{\leftarrow} - Relational arrows
\implies
\iff
\to - Text in math
\rm text rather than \mathrm{text}
\cal text rather than \mathcal{text} it made some problem such that 1 interpreting as infinity.
etc. - \frac 1 2 rather than \frac{1}{2}
- set complement
\setminus - Use \eqref{} for reference with ().
- Use Fig.~\ref{} to avoid large space bet. Fig. and \ref{}.
- Put \label{} around the end.
- binomial coefficient
{a \choose b}, \binom {a} {b}, {a \brack b}, {a \brace b}, {a \bangle b} - \overline{} to make wide bar on letters.eps figure
- eps figure doesn't show in pdflatexed PDF: change option when saved in Mathematica: ex.) uncheck 'include tiff xxx', choose both 'most compatible', choose 'printer'
ref.)
http://elevatorlady.ca/doc/refcard/expressions.html
- a
tabular
(ortabularx
,tabu
etc.) is totable
what\includegraphics
is to afigure
: the former provides the content whereas the latter serves as a container for proper alignment - To make a box to emphasize equations: Use 'empheq' package
\begin{empheq}[box=\fbox]{equation}
\qi^2=\qj^2=\qk^3=ijk=-\qe.
\end{empheq} or if you want more control:
\documentclass[11pt,a4paper]{report}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{mathtools}
\usepackage{empheq}
\usepackage{tensor}
\usepackage[dvipsnames,table]{xcolor}
\definecolor{medGray}{RGB}{230,230,230}
\newenvironment{important}[2][]{
\setkeys{EmphEqEnv}{#2}
\setkeys{EmphEqOpt}{box={\setlength{\fboxsep}{10pt}\colorbox{medGray}},#1}
\EmphEqMainEnv}
{\endEmphEqMainEnv}
\newenvironment{tres important}[2][]{
\setkeys{EmphEqEnv}{#2}
\setkeys{EmphEqOpt}{box={\setlength{\fboxsep}{10pt}\fcolorbox{red}{medGray}},#1}
\EmphEqMainEnv}
{\endEmphEqMainEnv}
\begin{document}
\begin{tres important}{equation}
H(q,p) = \tensor{\dot{q}}{^i}\,\tensor{p}{_i}-L
\end{tres important}
\begin{important}{equation}
H(q,p) = \tensor{\dot{q}}{^i}\,\tensor{p}{_i}-L
\end{important}
\end{document} - To frame theorems, use `framed' package: \begin{framed} ... \end{framed} or use 'shaded' instead of 'framed'.
- Put `\label' after `\caption' always. C to the L!