git.iko.soy/typeable/pandoc
on master help sign in
LaTeX writer: Removed stLink, link template variable.

Reason: we now always include hyperref in the template. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1796 788f1e2b-df1e-0410-8736-df70ead52e1b

commite1e9bfc004ddea81e1082362dbd212b3b75ca5ca authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> dateTue 5 Jan 2010, 08:36 (17 years ago) parentb4925d0
1 file changed+2−5
src/Text/Pandoc/Writers/LaTeX.hs+2−5
src/Text/Pandoc/Writers/LaTeX.hs+2−5
@@ -46,7 +46,6 @@ data WriterState =
4646 , stTable :: Bool -- true if document has a table
4747 , stStrikeout :: Bool -- true if document has strikeout
4848 , stSubscript :: Bool -- true if document has subscript
49− , stLink :: Bool -- true if document has links
5049 , stUrl :: Bool -- true if document has visible URL link
5150 , stGraphics :: Bool -- true if document contains images
5251 , stLHS :: Bool -- true if document has literate haskell code
@@ -60,7 +59,7 @@ writeLaTeX options document =
6059 WriterState { stInNote = False, stOLLevel = 1, stOptions = options,
6160 stVerbInNote = False, stEnumerate = False,
6261 stTable = False, stStrikeout = False, stSubscript = False,
63− stLink = False, stUrl = False, stGraphics = False,
62+ stUrl = False, stGraphics = False,
6463 stLHS = False, stBook = False }
6564
6665pandocToLaTeX :: WriterOptions -> Pandoc -> State WriterState String
@@ -95,7 +94,6 @@ pandocToLaTeX options (Pandoc (Meta title authors date) blocks) = do
9594 [ ("tables", "yes") | stTable st ] ++
9695 [ ("strikeout", "yes") | stStrikeout st ] ++
9796 [ ("subscript", "yes") | stSubscript st ] ++
98− [ ("links", "yes") | stLink st ] ++
9997 [ ("url", "yes") | stUrl st ] ++
10098 [ ("lhs", "yes") | stLHS st ] ++
10199 [ ("graphics", "yes") | stGraphics st ]
@@ -329,8 +327,7 @@ inlineToLaTeX (TeX str) = return $ text str
329327inlineToLaTeX (HtmlInline _) = return empty
330328inlineToLaTeX (LineBreak) = return $ text "\\\\"
331329inlineToLaTeX Space = return $ char ' '
332−inlineToLaTeX (Link txt (src, _)) = do
333− modify $ \s -> s{ stLink = True }
330+inlineToLaTeX (Link txt (src, _)) =
334331 case txt of
335332 [Code x] | x == src -> -- autolink
336333 do modify $ \s -> s{ stUrl = True }