Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
latex [2018/04/25 10:34] – [Misc stuff to paste in the top] awflatex [2018/10/31 13:24] – [Misc stuff to paste in the top] awf
Line 5: Line 5:
   * In a hand-marked-up PDF, a tilde at the end of a line indicates a "tie", to keep characters bound to the word that precedes them, see https://tex.stackexchange.com/questions/9633/why-should-i-put-a-before-ref-or-cite   * In a hand-marked-up PDF, a tilde at the end of a line indicates a "tie", to keep characters bound to the word that precedes them, see https://tex.stackexchange.com/questions/9633/why-should-i-put-a-before-ref-or-cite
   * It is useful for version control to issue a soft newline after each full stop.    * It is useful for version control to issue a soft newline after each full stop. 
 +  * Avoid elegant variation https://www.bartleby.com/116/302.html
 +
 ====== All one file ====== ====== All one file ======
  
Line 61: Line 63:
 \marginpar{\hspace{-4mm}\parbox[b]{1cm}% \marginpar{\hspace{-4mm}\parbox[b]{1cm}%
 {\rotatebox{90}{\parbox{5cm}{\textcolor{red}{\scriptsize $\bullet$ #1}}}}}% {\rotatebox{90}{\parbox{5cm}{\textcolor{red}{\scriptsize $\bullet$ #1}}}}}%
 +}
 +</code>
 +
 +====== Picture with label in circle ======
 +<code tex>
 +\usepackage{tikz}
 +\def\labelledpic#1#2{
 +\begin{tikzpicture}
 +\node (pic) {#1};
 +\path[fill=white,draw=gray,thick] (pic.south west) +(3ex,3ex) circle (2ex)
 +   node {#2};
 +\end{tikzpicture}
 +}
 +\labelledpic{\includegraphics[width=0.3\textwidth]{hohum}}{A}
 +</code>
 +
 +====== 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#1#2#3{
 +\setlength{\awfpicH}{0.25\linewidth} % an initial guess...
 +\def\pair##1{\includegraphics[height=##1]{#2}~\includegraphics[height=##1]{#3}}
 +\setlength{\awfpicH}{\awfpicH*\ratio{\linewidth}{\widthof{\pair{\awfpicH}}}}
 +\pair\awfpicH
 } }
 </code> </code>
  
latex.txt · Last modified: 2024/02/01 16:37 by awf
CC Attribution 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0