diff options
author | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2007-08-03 22:14:32 +0000 |
---|---|---|
committer | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2007-08-03 22:14:32 +0000 |
commit | 271c3f987e468b77ac9209e9efe3bbaa51717039 (patch) | |
tree | 53b8b8e1595850909c9142d2b3c5ae3ee0b9d68f /src/Text/Pandoc/Writers | |
parent | ee46ee5fa9d2b186091864aea1aa2f6ffc9a9a14 (diff) | |
download | pandoc-271c3f987e468b77ac9209e9efe3bbaa51717039.tar.gz |
Use \url{} for autolinks in LaTeX writer.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@832 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'src/Text/Pandoc/Writers')
-rw-r--r-- | src/Text/Pandoc/Writers/LaTeX.hs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs index 19365a0f5..d907e8b88 100644 --- a/src/Text/Pandoc/Writers/LaTeX.hs +++ b/src/Text/Pandoc/Writers/LaTeX.hs @@ -250,9 +250,12 @@ inlineToLaTeX (HtmlInline str) = return "" inlineToLaTeX (LineBreak) = return "\\\\\n" inlineToLaTeX Space = return " " inlineToLaTeX (Link text (src, tit)) = do - contents <- inlineListToLaTeX $ deVerb text addToHeader "\\usepackage[breaklinks=true]{hyperref}" - return $ "\\href{" ++ src ++ "}{" ++ contents ++ "}" + case text of + [Code x] | x == src -> -- autolink + return $ "\\url{" ++ x ++ "}" + _ -> do contents <- inlineListToLaTeX $ deVerb text + return $ "\\href{" ++ src ++ "}{" ++ contents ++ "}" inlineToLaTeX (Image alternate (source, tit)) = do addToHeader "\\usepackage{graphicx}" return $ "\\includegraphics{" ++ source ++ "}" |