From 9557eb6f8efafaff2e3a61e43e4cc7e4717ad9eb Mon Sep 17 00:00:00 2001 From: Jose Luis Duran Date: Wed, 27 Aug 2014 20:35:57 +0000 Subject: LaTeX writer: Use a declaration for tight lists Currently, pandoc has hard-coded the following in order to make tight lists in LaTeX: ```hs text "\\itemsep1pt\\parskip0pt\\parsep0pt" ``` Which is fine, but does not allow customizations. For example, the `memoir` class already has a `\tightlist` declaration for this purpose: ```tex \newcommand{\tightlist}{% \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} ``` I'm proposing to use a similar solution: ```diff @@ In Writers/LaTeX.hs: -then text "\\itemsep1pt\\parskip0pt\\parsep0pt" +then text "\\tightlist" @@ In templates/default.latex: +\newcommand{\tightlist}{% + \setlength{\itemsep}{1pt}\setlength{\parskip}{0pt}\setlength{\parsep}{0pt}} ``` This allows us to customize the tightness to our needs. Backward Compatibility If a person is using a custom LaTeX template (not based upon the `memoir` class), the `\tightlist` declaration must be added. --- data/templates | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'data/templates/default.docbook4') diff --git a/data/templates b/data/templates index 2d5491bc0..a691447f0 160000 --- a/data/templates +++ b/data/templates @@ -1 +1 @@ -Subproject commit 2d5491bc0b167a5b20c03e4bc02ef8b5fc20379f +Subproject commit a691447f0861e411ce48025da8c4c5c7b0ec5190 -- cgit v1.2.3