Archive for the ‘Latex’ Category

Revtex4 for Latex on Lucid

To use Revtex 4.1 in Latex for (american) scientific papers install the package texlive-publishers (direct install) and use in your document

\documentclass[11pt]{revtex4-1}
\begin{document}
\end{document}

For older Revtex versions check the package revtex.

Latex in Examples – Greek Unicode Letters / Hypperref

An example how to use greek utf enconded text letters, like τ,Γ,π,ω…, as direct input method in latex instead of $\tau$, $\Gamma$, $\pi$,$\omega$… . Each letter requires a newcommand in the preface.

PDF: greek_unicode.pdf

Files: greek_unicode.zip

Latex Code

\documentclass[10pt,a4paper]{article}
\usepackage[utf8x]{inputenc}

%small letters
\newcommand\textalpha{\ensuremath{\alpha}}
\newcommand\textgamma{\ensuremath{\gamma}}
\newcommand\textpi{\ensuremath{\pi}}
%capital letters
\newcommand\textGamma{\ensuremath{\Gamma}}
\newcommand\textPi{\ensuremath{\Pi}}
\begin{document}

Formula using Latex standard math environments versus unicode:

\begin{eqnarray*}
\mathrm{latex input} &  & \mathrm{unicode} \\
\alpha & \Leftrightarrow & α\\
\gamma \Gamma & \Leftrightarrow & γ Γ \\
\pi \Pi & \Leftrightarrow & π Π
\end{eqnarray*}

\end{document}

Hypperref Problem

When the hypperref package is used additionally  some greek letters cannot be defined via the \newcommand anymore, such as \textmu and \textbeta.  The error looks something like that

! LaTeX Error: Command \textmu unavailable in encoding OT1.
! LaTeX Error: Command \textbeta unavailable in encoding OT1.

A workaround is to remove the error causing commands and load additionally the tipa package and the textcomp package, that will do the trick.

\documentclass[10pt,a4paper]{article}
\usepackage[utf8x]{inputenc}
\usepackage{hyperref}
\usepackage{tipa,textcomp}

%small letters
\newcommand\textalpha{\ensuremath{\alpha}}
\newcommand\textgamma{\ensuremath{\gamma}}
\newcommand\textpi{\ensuremath{\pi}}
%capital letters
\newcommand\textGamma{\ensuremath{\Gamma}}
\newcommand\textPi{\ensuremath{\Pi}}

\begin{document}

μ, β, α, γ, π, Γ, Π

\end{document}

Latex in Examples – figure, subfloat & minipage

An example how to arrange three pictures  in columns and rows.

Files:  subfloat_1

PDF: examples

Latex Code

\documentclass[10pt,a4paper,draft]{article}
\usepackage[utf8x]{inputenc}

\usepackage{graphicx}%
\usepackage{subfig}%

\begin{document}

\begin{figure}[ht]
\begin{minipage}{0.62\textwidth}
\subfloat[]{\label{subfig:a}\includegraphics[width=1\textwidth]{fcc}}%
\end{minipage}\quad %
\begin{minipage}{0.33\textwidth}%
\subfloat[]{\label{subfig:b}\includegraphics[width=1\textwidth]{fcc}}\\%
\subfloat[]{\label{subfig:c}\includegraphics[width=1\textwidth]{fcc}}%
\end{minipage}%

 \label{fig:diamond_lattice}
 \caption{Face-Center-Cubic - \ref{subfig:a}  \ref{subfig:b} \ref{subfig:c} }

\end{figure}
Return top