From 84147eeff15afe29899578fb5a5cc4cb2af1fb7d Mon Sep 17 00:00:00 2001 From: Enno Date: Tue, 11 Dec 2018 15:22:31 -0300 Subject: [PATCH] Let KOMA document class handle parskip when applicable (#5143) This is just a change to the default latex template. --- data/templates/default.latex | 13 +++++++------ test/lhs-test.latex | 13 +++++++------ test/lhs-test.latex+lhs | 13 +++++++------ test/writer.latex | 13 +++++++------ test/writers-lang-and-dir.latex | 13 +++++++------ 5 files changed, 35 insertions(+), 30 deletions(-) diff --git a/data/templates/default.latex b/data/templates/default.latex index 737ebaa44..1861bde45 100644 --- a/data/templates/default.latex +++ b/data/templates/default.latex @@ -159,12 +159,13 @@ $endif$ }{} $if(indent)$ $else$ -\IfFileExists{parskip.sty}{% -\usepackage{parskip} -}{% else -\setlength{\parindent}{0pt} -\setlength{\parskip}{6pt plus 2pt minus 1pt} -} +\@ifundefined{KOMAClassName}{% + \IfFileExists{parskip.sty}{% + \usepackage{parskip} + }{% else + \setlength{\parindent}{0pt} + \setlength{\parskip}{6pt plus 2pt minus 1pt} + }}{\KOMAoptions{parskip=half}} $endif$ $if(verbatim-in-note)$ \usepackage{fancyvrb} diff --git a/test/lhs-test.latex b/test/lhs-test.latex index 8379864ec..88758c51c 100644 --- a/test/lhs-test.latex +++ b/test/lhs-test.latex @@ -21,12 +21,13 @@ \usepackage[]{microtype} \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts }{} -\IfFileExists{parskip.sty}{% -\usepackage{parskip} -}{% else -\setlength{\parindent}{0pt} -\setlength{\parskip}{6pt plus 2pt minus 1pt} -} +\@ifundefined{KOMAClassName}{% + \IfFileExists{parskip.sty}{% + \usepackage{parskip} + }{% else + \setlength{\parindent}{0pt} + \setlength{\parskip}{6pt plus 2pt minus 1pt} + }}{\KOMAoptions{parskip=half}} \usepackage{hyperref} \hypersetup{ pdfborder={0 0 0}, diff --git a/test/lhs-test.latex+lhs b/test/lhs-test.latex+lhs index 53ab4f713..53b684192 100644 --- a/test/lhs-test.latex+lhs +++ b/test/lhs-test.latex+lhs @@ -21,12 +21,13 @@ \usepackage[]{microtype} \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts }{} -\IfFileExists{parskip.sty}{% -\usepackage{parskip} -}{% else -\setlength{\parindent}{0pt} -\setlength{\parskip}{6pt plus 2pt minus 1pt} -} +\@ifundefined{KOMAClassName}{% + \IfFileExists{parskip.sty}{% + \usepackage{parskip} + }{% else + \setlength{\parindent}{0pt} + \setlength{\parskip}{6pt plus 2pt minus 1pt} + }}{\KOMAoptions{parskip=half}} \usepackage{hyperref} \hypersetup{ pdfborder={0 0 0}, diff --git a/test/writer.latex b/test/writer.latex index 9500c7cf9..0a9cf96f8 100644 --- a/test/writer.latex +++ b/test/writer.latex @@ -21,12 +21,13 @@ \usepackage[]{microtype} \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts }{} -\IfFileExists{parskip.sty}{% -\usepackage{parskip} -}{% else -\setlength{\parindent}{0pt} -\setlength{\parskip}{6pt plus 2pt minus 1pt} -} +\@ifundefined{KOMAClassName}{% + \IfFileExists{parskip.sty}{% + \usepackage{parskip} + }{% else + \setlength{\parindent}{0pt} + \setlength{\parskip}{6pt plus 2pt minus 1pt} + }}{\KOMAoptions{parskip=half}} \usepackage{fancyvrb} \usepackage{hyperref} \hypersetup{ diff --git a/test/writers-lang-and-dir.latex b/test/writers-lang-and-dir.latex index 9a31a7df8..66f1104c6 100644 --- a/test/writers-lang-and-dir.latex +++ b/test/writers-lang-and-dir.latex @@ -21,12 +21,13 @@ \usepackage[]{microtype} \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts }{} -\IfFileExists{parskip.sty}{% -\usepackage{parskip} -}{% else -\setlength{\parindent}{0pt} -\setlength{\parskip}{6pt plus 2pt minus 1pt} -} +\@ifundefined{KOMAClassName}{% + \IfFileExists{parskip.sty}{% + \usepackage{parskip} + }{% else + \setlength{\parindent}{0pt} + \setlength{\parskip}{6pt plus 2pt minus 1pt} + }}{\KOMAoptions{parskip=half}} \usepackage{hyperref} \hypersetup{ pdfborder={0 0 0},