313313\newcommand {\VerbatimStringTok }[1]{\textcolor [rgb]{0.25,0.44,0.63}{#1}}
314314\newcommand {\WarningTok }[1]{\textcolor [rgb]{0.38,0.63,0.69}{\textbf {\textit {#1 } }}}
315315\usepackage {longtable,booktabs,array }
316+ \usepackage {graphicx }
317+ \makeatletter
318+ \newsavebox\pandoc@box
319+ \newcommand *\pandocbounded [1]{% scales image to fit in text height/width
320+ \sbox\pandoc@box {#1}%
321+ \Gscale@div\@tempa {\textheight }{\dimexpr\ht\pandoc@box +\dp\pandoc@box\relax }%
322+ \Gscale@div\@tempb {\linewidth }{\wd\pandoc@box }%
323+ \ifdim \@tempb\p@ <\@tempa\p@\let\@tempa\@tempb \fi % select the smaller of both
324+ \ifdim \@tempa\p@ <\p@\scalebox {\@tempa }{\usebox\pandoc@box }%
325+ \else \usebox {\pandoc@box }%
326+ \fi %
327+ }
328+ % Set default figure placement to htbp
329+ \def\fps@figure {htbp}
330+ \makeatother
316331
317332\usepackage {graphicx,grffile }
318333\makeatletter
@@ -482,9 +497,9 @@ \subsection{Inline markup}\label{inline-markup}
482497below gives a small example.
483498
484499\begin {longtable }[]{@{}
485- >{\raggedright\arraybackslash }p{(\columnwidth - 4\tabcolsep ) * \real {0.3014}}
486- >{\centering\arraybackslash }p{(\columnwidth - 4\tabcolsep ) * \real {0.3562}}
487- >{\centering\arraybackslash }p{(\columnwidth - 4\tabcolsep ) * \real {0.3288}}@{}}
500+ >{\raggedright\arraybackslash }p{(\linewidth - 4\tabcolsep ) * \real {0.3014}}
501+ >{\centering\arraybackslash }p{(\linewidth - 4\tabcolsep ) * \real {0.3562}}
502+ >{\centering\arraybackslash }p{(\linewidth - 4\tabcolsep ) * \real {0.3288}}@{}}
488503\caption {Basic inline markup and examples.}\tabularnewline
489504\toprule\noalign {}
490505\begin {minipage }[b]{\linewidth }\raggedright
@@ -565,12 +580,12 @@ \subsubsection{Images}\label{images}
565580e.g.~when adding an image as part of a paragraph. The Markdown
566581\texttt {!{[}Nyan\ cat{]}(nyan-cat.png)\{ height="9pt"\} } includes the
567582image `` nyan-cat.png''
568- \includegraphics [width=\textwidth ,height=0.125in]{images/nyan-cat.png}
583+ \includegraphics [width=\linewidth ,height=0.125in,keepaspectratio ]{images/nyan-cat.png}
569584while scaling it to a height of 9\, pt.
570585
571586\begin {figure }
572587\centering
573- \includegraphics {images/mandrill.jpg}
588+ \pandocbounded { \ includegraphics[keepaspectratio] {images/mandrill.jpg} }
574589\caption {The `` Mandrill'' standard test image, sometimes erroneously
575590called `` Baboon'' , is a popular sample photo and used in image
576591processing research.}\label {fig:mandrill }
@@ -883,7 +898,7 @@ \section{Internal references}\label{internal-references}
883898
884899\begin {figure }
885900\centering
886- \includegraphics [width=1\textwidth ,height=\textheight ]{images/sylt.jpg}
901+ \includegraphics [width=1\linewidth ,height=\textheight ,keepaspectratio ]{images/sylt.jpg}
887902\caption {View of coastal dunes in a nature reserve on Sylt, an island in
888903the North Sea. Sylt (Danish: \emph {Slid }) is Germany's northernmost
889904island.}\label {sylt }
@@ -907,11 +922,11 @@ \subsection{Tables and figures}\label{tables-and-figures}
907922gives `` \ref {proglangs }'' .
908923
909924\begin {longtable }[]{@{}
910- >{\raggedright\arraybackslash }p{(\columnwidth - 8\tabcolsep ) * \real {0.1493}}
911- >{\centering\arraybackslash }p{(\columnwidth - 8\tabcolsep ) * \real {0.2537}}
912- >{\centering\arraybackslash }p{(\columnwidth - 8\tabcolsep ) * \real {0.2836}}
913- >{\raggedright\arraybackslash }p{(\columnwidth - 8\tabcolsep ) * \real {0.1791}}
914- >{\raggedright\arraybackslash }p{(\columnwidth - 8\tabcolsep ) * \real {0.1343}}@{}}
925+ >{\raggedright\arraybackslash }p{(\linewidth - 8\tabcolsep ) * \real {0.1493}}
926+ >{\centering\arraybackslash }p{(\linewidth - 8\tabcolsep ) * \real {0.2537}}
927+ >{\centering\arraybackslash }p{(\linewidth - 8\tabcolsep ) * \real {0.2836}}
928+ >{\raggedright\arraybackslash }p{(\linewidth - 8\tabcolsep ) * \real {0.1791}}
929+ >{\raggedright\arraybackslash }p{(\linewidth - 8\tabcolsep ) * \real {0.1343}}@{}}
915930\caption {Comparison of programming languages used in the publishing
916931tool. {}}\tabularnewline
917932\toprule\noalign {}
0 commit comments