aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJose Luis Duran <jlduran@users.noreply.github.com>2014-08-28 03:12:37 +0000
committerJose Luis Duran <jlduran@users.noreply.github.com>2014-08-28 03:12:37 +0000
commit1fc665c07dc0ccbb10efae61fdcea251d4cf53be (patch)
tree38e11465cc09ccf5652631d01caf7d7ee8b43a5e /src
parent8f2aa45d69be2f625a8c558744e980bde30c1457 (diff)
downloadpandoc-1fc665c07dc0ccbb10efae61fdcea251d4cf53be.tar.gz
LaTeX writer: Make Horizontal Rules more flexible
Currently, pandoc has hard-coded the following in order to make horizontal rules in LaTeX: ```hs "\\begin{center}\\rule{3in}{0.4pt}\\end{center}" ``` Which is fine, but does not allow customizations. It also does not take into consideration the current line width. I'm proposing this change: ```diff @@ In Writers/LaTeX.hs: -"\\begin{center}\\rule{3in}{0.4pt}\\end{center}" +"\\begin{center}\\rule{0.5\\linewidth}{\\linethickness}\\end{center}" ```
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Writers/LaTeX.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs
index d200ecee1..966cabe67 100644
--- a/src/Text/Pandoc/Writers/LaTeX.hs
+++ b/src/Text/Pandoc/Writers/LaTeX.hs
@@ -465,7 +465,7 @@ blockToLaTeX (DefinitionList lst) = do
return $ text ("\\begin{description}" ++ inc) $$ spacing $$ vcat items $$
"\\end{description}"
blockToLaTeX HorizontalRule = return $
- "\\begin{center}\\rule{3in}{0.4pt}\\end{center}"
+ "\\begin{center}\\rule{0.5\\linewidth}{\\linethickness}\\end{center}"
blockToLaTeX (Header level (id',classes,_) lst) =
sectionHeader ("unnumbered" `elem` classes) id' level lst
blockToLaTeX (Table caption aligns widths heads rows) = do