Labels

Friday, March 29, 2019

Very useful latex tricks

\usepackage[normalem]{ulem}  
\sout{}


sout in the section (a)



\usepackage{ulem}
\usepackage{hyperref}
\usepackage{nameref}
\DeclareRobustCommand{\hsout}[1]{\texorpdfstring{\sout{#1}}{#1}}

\section{\hsout{Striked out section title}}\label{foo}
\sout{\mbox{\cite{a,b}}} 




color (b)



\usepackage{color}
\definecolor{darkgreen}{rgb}{0,0.3,0}
\definecolor{darkblue}{rgb}{0,0,0.2}
\definecolor{darkred}{rgb}{0.5,0,0}
\definecolor{lightgrey}{rgb}{0.8,0.8,0.8}
\definecolor{black}{rgb}{0,0,0}
\def\red#1{\textcolor{red}{#1}}
\def\red#1{\textcolor{red}{#1}}\def\red#1{\textcolor{red}{#1}}\def\red#1{\textcolor{red}{#1}}\def\red#1{\textcolor{red}{#1}}
\def\red#1{\textcolor{red}{#1}}
\def\red#1{\textcolor{red}{#1}}
\def\red#1{\textcolor{red}{#1}}
figure
set figure position
\usepackage[section]{placeins} (c)
\FloatBarrier

\usepackage[dvipsnames,table,xcdraw]{xcolor}
\newcommand{\ricardo}[1]{\colorbox{ForestGreen}{\color{white}   \textsf{\textbf{Ricardo}}} \textcolor{ForestGreen}{#1}}


organize two figures in one page
\begin{figure}[!htbp] (d)
\centering
\includegraphics{fig1}
\caption{Caption 1}
\includegraphics{fig2}
\caption{Caption 2}
\end{figure}

latex color http://latexcolor.com/

both spelling and grammar in a dozen languages https://github.com/sylvainhalle/textidote

much less , 'll', '<<'
much greater, 'gg', '>>'  

wide bar
\documentclass[11pt]{article}
\newcommand*\xbar[1]{%
   \hbox{%
     \vbox{%
       \hrule height 0.5pt % The actual bar
       \kern0.5ex%         % Distance between bar and symbol
       \hbox{%
         \kern-0.1em%      % Shortening on the left side
         \ensuremath{#1}%
         \kern-0.1em%      % Shortening on the right side
       }%
     }%
   }%
 
\begin{document}
   $\xbar{\Psi}$
\end{document}


degree
\usepackage{xspace} 
\renewcommand{\deg}{\ensuremath{^{\circ}}\xspace}

No comments:

Post a Comment