LaTeX template: Group graphics-related code ()

* LaTeX template: Group graphics-related code

The default figure placement was added in <f3ab4bc2b9>; there does not appear to have been a reason for placing it at the end of the preamble.

* Update tests
This commit is contained in:
Andrew Dunning 2019-03-23 00:35:55 -04:00 committed by John MacFarlane
parent 1e60776226
commit e91af0a8a3
5 changed files with 18 additions and 35 deletions

View file

@ -1,5 +1,5 @@
% Options for packages loaded elsewhere % Options for packages loaded elsewhere
\PassOptionsToPackage{unicode=true$for(hyperrefoptions)$,$hyperrefoptions$$endfor$}{hyperref} \PassOptionsToPackage{unicode$for(hyperrefoptions)$,$hyperrefoptions$$endfor$}{hyperref}
\PassOptionsToPackage{hyphens}{url} \PassOptionsToPackage{hyphens}{url}
$if(colorlinks)$ $if(colorlinks)$
\PassOptionsToPackage{dvipsnames,svgnames*,x11names*}{xcolor} \PassOptionsToPackage{dvipsnames,svgnames*,x11names*}{xcolor}
@ -100,7 +100,7 @@ $endif$
\usepackage[$if(fontenc)$$fontenc$$else$T1$endif$]{fontenc} \usepackage[$if(fontenc)$$fontenc$$else$T1$endif$]{fontenc}
\usepackage[utf8]{inputenc} \usepackage[utf8]{inputenc}
\usepackage{textcomp} % provides euro and other symbols \usepackage{textcomp} % provides euro and other symbols
\else % if luatex or xelatex \else % if luatex or xetex
$if(mathspec)$ $if(mathspec)$
\ifxetex \ifxetex
\usepackage{mathspec} \usepackage{mathspec}
@ -267,6 +267,10 @@ $if(graphics)$
% margins by default, and it is still possible to overwrite the defaults % margins by default, and it is still possible to overwrite the defaults
% using explicit options in \includegraphics[width, height, ...]{} % using explicit options in \includegraphics[width, height, ...]{}
\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio} \setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio}
% Set default figure placement to htbp
\makeatletter
\def\fps@figure{htbp}
\makeatother
$endif$ $endif$
$if(links-as-notes)$ $if(links-as-notes)$
% Make links footnotes instead of hotlinks: % Make links footnotes instead of hotlinks:
@ -304,11 +308,6 @@ $if(pagestyle)$
\pagestyle{$pagestyle$} \pagestyle{$pagestyle$}
$endif$ $endif$
% Set default figure placement to htbp
\makeatletter
\def\fps@figure{htbp}
\makeatother
$for(header-includes)$ $for(header-includes)$
$header-includes$ $header-includes$
$endfor$ $endfor$

View file

@ -1,5 +1,5 @@
% Options for packages loaded elsewhere % Options for packages loaded elsewhere
\PassOptionsToPackage{unicode=true}{hyperref} \PassOptionsToPackage{unicode}{hyperref}
\PassOptionsToPackage{hyphens}{url} \PassOptionsToPackage{hyphens}{url}
% %
\documentclass[ \documentclass[
@ -11,7 +11,7 @@
\usepackage[T1]{fontenc} \usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc} \usepackage[utf8]{inputenc}
\usepackage{textcomp} % provides euro and other symbols \usepackage{textcomp} % provides euro and other symbols
\else % if luatex or xelatex \else % if luatex or xetex
\usepackage{unicode-math} \usepackage{unicode-math}
\defaultfontfeatures{Scale=MatchLowercase} \defaultfontfeatures{Scale=MatchLowercase}
\defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1} \defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1}
@ -91,11 +91,6 @@
\renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}} \renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}}
\fi \fi
% Set default figure placement to htbp
\makeatletter
\def\fps@figure{htbp}
\makeatother
\date{} \date{}

View file

@ -1,5 +1,5 @@
% Options for packages loaded elsewhere % Options for packages loaded elsewhere
\PassOptionsToPackage{unicode=true}{hyperref} \PassOptionsToPackage{unicode}{hyperref}
\PassOptionsToPackage{hyphens}{url} \PassOptionsToPackage{hyphens}{url}
% %
\documentclass[ \documentclass[
@ -11,7 +11,7 @@
\usepackage[T1]{fontenc} \usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc} \usepackage[utf8]{inputenc}
\usepackage{textcomp} % provides euro and other symbols \usepackage{textcomp} % provides euro and other symbols
\else % if luatex or xelatex \else % if luatex or xetex
\usepackage{unicode-math} \usepackage{unicode-math}
\defaultfontfeatures{Scale=MatchLowercase} \defaultfontfeatures{Scale=MatchLowercase}
\defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1} \defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1}
@ -58,11 +58,6 @@
\renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}} \renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}}
\fi \fi
% Set default figure placement to htbp
\makeatletter
\def\fps@figure{htbp}
\makeatother
\date{} \date{}

View file

@ -1,5 +1,5 @@
% Options for packages loaded elsewhere % Options for packages loaded elsewhere
\PassOptionsToPackage{unicode=true}{hyperref} \PassOptionsToPackage{unicode}{hyperref}
\PassOptionsToPackage{hyphens}{url} \PassOptionsToPackage{hyphens}{url}
% %
\documentclass[ \documentclass[
@ -11,7 +11,7 @@
\usepackage[T1]{fontenc} \usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc} \usepackage[utf8]{inputenc}
\usepackage{textcomp} % provides euro and other symbols \usepackage{textcomp} % provides euro and other symbols
\else % if luatex or xelatex \else % if luatex or xetex
\usepackage{unicode-math} \usepackage{unicode-math}
\defaultfontfeatures{Scale=MatchLowercase} \defaultfontfeatures{Scale=MatchLowercase}
\defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1} \defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1}
@ -52,6 +52,10 @@
% margins by default, and it is still possible to overwrite the defaults % margins by default, and it is still possible to overwrite the defaults
% using explicit options in \includegraphics[width, height, ...]{} % using explicit options in \includegraphics[width, height, ...]{}
\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio} \setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio}
% Set default figure placement to htbp
\makeatletter
\def\fps@figure{htbp}
\makeatother
\usepackage[normalem]{ulem} \usepackage[normalem]{ulem}
% Avoid problems with \sout in headers with hyperref % Avoid problems with \sout in headers with hyperref
\pdfstringdefDisableCommands{\renewcommand{\sout}{}} \pdfstringdefDisableCommands{\renewcommand{\sout}{}}
@ -69,11 +73,6 @@
\renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}} \renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}}
\fi \fi
% Set default figure placement to htbp
\makeatletter
\def\fps@figure{htbp}
\makeatother
\title{Pandoc Test Suite} \title{Pandoc Test Suite}
\author{John MacFarlane \and Anonymous} \author{John MacFarlane \and Anonymous}

View file

@ -1,5 +1,5 @@
% Options for packages loaded elsewhere % Options for packages loaded elsewhere
\PassOptionsToPackage{unicode=true}{hyperref} \PassOptionsToPackage{unicode}{hyperref}
\PassOptionsToPackage{hyphens}{url} \PassOptionsToPackage{hyphens}{url}
% %
\documentclass[ \documentclass[
@ -12,7 +12,7 @@
\usepackage[T1]{fontenc} \usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc} \usepackage[utf8]{inputenc}
\usepackage{textcomp} % provides euro and other symbols \usepackage{textcomp} % provides euro and other symbols
\else % if luatex or xelatex \else % if luatex or xetex
\usepackage{unicode-math} \usepackage{unicode-math}
\defaultfontfeatures{Scale=MatchLowercase} \defaultfontfeatures{Scale=MatchLowercase}
\defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1} \defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1}
@ -54,11 +54,6 @@
\renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}} \renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}}
\fi \fi
% Set default figure placement to htbp
\makeatletter
\def\fps@figure{htbp}
\makeatother
\ifxetex \ifxetex
% Load polyglossia as late as possible: uses bidi with RTL langages (e.g. Hebrew, Arabic) % Load polyglossia as late as possible: uses bidi with RTL langages (e.g. Hebrew, Arabic)
\usepackage{polyglossia} \usepackage{polyglossia}