Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
latex [2016/01/20 11:38] – [Misc stuff to paste in the top] awf | latex [2018/10/31 13:24] – [Misc stuff to paste in the top] awf | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Things I do in LaTeX which may need justifying to co-authors ====== | ====== Things I do in LaTeX which may need justifying to co-authors ====== | ||
+ | |||
+ | |||
+ | Quick things: | ||
+ | * In a hand-marked-up PDF, a tilde at the end of a line indicates a " | ||
+ | * It is useful for version control to issue a soft newline after each full stop. | ||
+ | * Avoid elegant variation https:// | ||
====== All one file ====== | ====== All one file ====== | ||
Line 8: | Line 14: | ||
- If you want to globally search and replace it's much easier to do so in a single file. Yes, of course you should have had the notation right before you started. | - If you want to globally search and replace it's much easier to do so in a single file. Yes, of course you should have had the notation right before you started. | ||
- If you really think compilation is too slow without '' | - If you really think compilation is too slow without '' | ||
+ | - Now, of course it's not a good idea to copy/paste large figures into the main file, but one small tweak makes it much easier to find figure labels etc. Put the graphical content into figs/ | ||
+ | \begin{figure} | ||
+ | \input{figs/ | ||
+ | \caption{lots of lovely plots, all lovingly tikzed (pron TIK-zeed)} | ||
+ | \label{fig: | ||
+ | \end{figure}</ | ||
====== Inline macro definitions ====== | ====== Inline macro definitions ====== | ||
Line 27: | Line 39: | ||
====== Misc stuff to paste in the top ====== | ====== Misc stuff to paste in the top ====== | ||
< | < | ||
+ | %!TEX root = ../ | ||
% -*- compile-command: | % -*- compile-command: | ||
Line 36: | Line 49: | ||
</ | </ | ||
+ | |||
+ | And see http:// | ||
+ | |||
+ | < | ||
+ | % Twocolumn marginpar, e.g. for CVPR/ICCV | ||
+ | \newcommand\authornote[2]{\textcolor{blue}{\hspace{-1pt}\rule{2pt}{2ex}\hspace{-1pt}}% | ||
+ | \marginpar[~\hspace{-12mm}\parbox{16mm}{\tiny \textcolor{blue}{# | ||
+ | {~\hspace{-4mm}~\parbox[t]{20mm}{\tiny \textcolor{blue}{# | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | \def\awf# | ||
+ | \marginpar{\hspace{-4mm}\parbox[b]{1cm}% | ||
+ | {\rotatebox{90}{\parbox{5cm}{\textcolor{red}{\scriptsize $\bullet$ #1}}}}}% | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | ====== Picture with label in circle ====== | ||
+ | <code tex> | ||
+ | \usepackage{tikz} | ||
+ | \def\labelledpic# | ||
+ | \begin{tikzpicture} | ||
+ | \node (pic) {#1}; | ||
+ | \path[fill=white, | ||
+ | node {#2}; | ||
+ | \end{tikzpicture} | ||
+ | } | ||
+ | \labelledpic{\includegraphics[width=0.3\textwidth]{hohum}}{A} | ||
+ | </ | ||
+ | |||
+ | ====== Two pictures with same height, forcing total width ====== | ||
+ | <code TeX> | ||
+ | % \awfTwoPicsSameHeight{WIDTH}{PIC1}{PIC2} | ||
+ | % Make two pictures of different aspect ratio sit neatly in a box of width WIDTH | ||
+ | \newlength{\awfpicH} | ||
+ | \def\awfTwoPicsSameHeight# | ||
+ | \setlength{\awfpicH}{0.25\linewidth} % an initial guess... | ||
+ | \def\pair## | ||
+ | \setlength{\awfpicH}{\awfpicH*\ratio{\linewidth}{\widthof{\pair{\awfpicH}}}} | ||
+ | \pair\awfpicH | ||
+ | } | ||
+ | </ | ||
+ |