From bbe2da390e5ec49ce6c88e00ba5f1c7f2b4c7c80 Mon Sep 17 00:00:00 2001 From: Andrew Dunning Date: Wed, 13 Mar 2019 20:22:28 -0400 Subject: LaTeX template: Improve readability (#5363) + LaTeX template: Improve template readability Use `hidelinks` option for hyperref, which has the same effect as `pdfborder={0 0 0}`, but its purpose is clearer. Use a simpler conditional for Polyglossia/Babel. Format comments more consistently. + Update tests + Remove hyperref breaklinks option. According to the documentation, hyperref sets this automatically as appropriate to the driver. --- test/lhs-test.latex | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'test/lhs-test.latex') diff --git a/test/lhs-test.latex b/test/lhs-test.latex index fd88fa5d3..9b5d2790a 100644 --- a/test/lhs-test.latex +++ b/test/lhs-test.latex @@ -1,4 +1,5 @@ -\PassOptionsToPackage{unicode=true}{hyperref} % options for packages loaded elsewhere +% Options for packages loaded elsewhere +\PassOptionsToPackage{unicode=true}{hyperref} \PassOptionsToPackage{hyphens}{url} % \documentclass[ @@ -15,7 +16,7 @@ \defaultfontfeatures{Scale=MatchLowercase} \defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1} \fi -% use upquote if available, for straight quotes in verbatim environments +% Use upquote if available, for straight quotes in verbatim environments \IfFileExists{upquote.sty}{\usepackage{upquote}}{} \IfFileExists{microtype.sty}{% use microtype if available \usepackage[]{microtype} @@ -35,9 +36,9 @@ \IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available \IfFileExists{bookmark.sty}{\usepackage{bookmark}}{\usepackage{hyperref}} \hypersetup{ - pdfborder={0 0 0}, - breaklinks=true} -\urlstyle{same} % don't use monospace font for urls + hidelinks, +} +\urlstyle{same} % disable monospaced font for URLs \usepackage{color} \usepackage{fancyvrb} \newcommand{\VerbBar}{|} @@ -76,7 +77,7 @@ \newcommand{\VariableTok}[1]{\textcolor[rgb]{0.10,0.09,0.49}{#1}} \newcommand{\VerbatimStringTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{#1}} \newcommand{\WarningTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{#1}}}} -\setlength{\emergencystretch}{3em} % prevent overfull lines +\setlength{\emergencystretch}{3em} % prevent overfull lines \providecommand{\tightlist}{% \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} \setcounter{secnumdepth}{-\maxdimen} % remove section numbering @@ -90,7 +91,7 @@ \renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}} \fi -% set default figure placement to htbp +% Set default figure placement to htbp \makeatletter \def\fps@figure{htbp} \makeatother -- cgit v1.2.3