Latex Commands


Some handy dandy Latex commands I use but keep forgetting.

A wordcunter for LaTeX
https://app.uio.no/ifi/texcount/online.php
Image

\FloatBarrier
\begin{figure}[H]%H for exactly here
    \centering
    \includegraphics[width=0.9\textwidth]{img.png}
    \caption{CAPTION}
    \label{LABEL}
\end{figure} 
\FloatBarrier
                                                  
Wrap Figure

% Requires: \usepackage{wrapfig}
\begin{wrapfigure}{r}{0.5\textwidth}
  \begin{center}
    \includegraphics[width=0.48\textwidth]{}
  \end{center}
  \caption{}
  \label{}
\end{wrapfigure}                              
Cite URL

@misc{LABEL,
  title = {TITLE},
  howpublished = {\url{URL}},
  note = {2019 Accessed: 2024-12-25}
}                                   
Hyperlink to File

\href{run:/PATH/FILENAME.xls}{TEXT DO DISPLAY}                                   
Merge Collumns in a Table

& \multicolumn{x}{c}{Text}\\
%Where x is the number of collumns to merge, c the allignment and Text the text to display in the table.

Reference a page in citation

\cite[p.~150]{kopka2003guide}.

Include a file in PDF

\usepackage{attachfile}
\attachfile[icon=Paperclip]{FULLPATH.xls}							

Long Table

\begin{landscape}
\begin{center}
\begin{longtable}{llll}
\caption{<++>}\label{tab:<++>}\\

\hline
\textbf{<++>} & 
\textbf{<++>} & 
\textbf{<++>} & 
\textbf{<++>} & 
\hline 
\endfirsthead

%Header for following pages
\multicolumn{4}{c}%
{{\tablename\ \thetable{} -- continued from previous page}} \\

\hline
\textbf{<++>} & 
\textbf{<++>} & 
\textbf{<++>} & 
\textbf{<++>} & 
\hline 
\endhead
%End header for following pages


\hline \multicolumn{4}{r}{{Continued on next page...}} \\ \hline
\endfoot

\hline \hline
\endlastfoot
%Begin Table Content


\end{longtable}
\end{center}
\end{landscape}