Codebase list mediawiki2latex / 2c6872f
Update upstream source from tag 'upstream/7.51' Update to upstream version '7.51' with Debian dir 2d281ee725ab9d9ab59291592a91a440f89cfed3 georgesk 10 months ago
6 changed file(s) with 25 addition(s) and 11 deletion(s). Raw diff Collapse all Expand all
0 Version 7.51
1 * src
2 fixing latex error message for no line here to end
3 in citations inside lists
4 removing superflous tables
5 removal of superfluous content introduced by
6 new wikipedia website layout
7 added link and img tags be allowed to also closed
8 with > instead of />
09 Version 7.50
110 * src
211 removal of superfluous content introduced by
00 Name: mediawiki2latex
1 Version: 7.50
1 Version: 7.51
22 License: GPL
33 License-File: LICENSE
44 Author: Dirk Hünniger <dirk.hunniger@googlemail.com>
8484 templates
8585 tabs
8686 formulas (vectorr st))
87 HTML No -> do --liftIO (Tools.writeFile "/home/dirk/dhudhu" (show (printPrepareTree(parseit minparsers text))))
87 HTML No -> do -- liftIO (Tools.writeFile "/home/dirk/dhudhu" (show (printPrepareTree(parseit minparsers text))))
8888 return
8989 (run b mylanguage mytitle
9090 (printPrepareTree (parseit minparsers text))
471471 outputLastRowOfHeader = 0, inputLastRowOfHeader = 0,
472472 lastRowHadEmptyMultiRowMap = True,
473473 outputTableHasHeaderRows = False, activeColumn = Nothing}
474 put $ newstate{getF = getF st}
475 r <- return $
474 if spec == "" then return () else put $ newstate{getF = getF st}
475 r <- if spec == "" then treeToLaTeX2 l else return $
476476 lsb ++
477477 sb ++
478478 (if (env /= "tabular") then "\n" else "\\scalebox{0.85}{") ++
26452645 = do st <- get
26462646 walk ((fontsetter (font st)) ++ "\\textsubscript{") l "}"
26472647 nodeToLaTeX (Environment Tag (TagAttr "cite" _) l)
2648 = walk "\\newline\n \\quad {\\scshape " l "}"
2648 = walk "{$\\text{ }$}\\newline\n\\quad {\\scshape " l "}"
26492649 nodeToLaTeX (Environment Sup (Str s) _)
26502650 = return $ "{$^{\\textrm{\\scriptsize " ++ s ++ "}}$}"
26512651 nodeToLaTeX (Environment Sub (Str s) _)
11281128
11291129 attr :: GenParser Char () ([Char], [Char])
11301130 attr
1131 = do try (skipMany1 (oneOf " \n")) <|> (lookAhead (char '=')>> return ())
1131 = do try (skipMany1 (oneOf " \t\n")) <|> (lookAhead (char '=')>> return ())
11321132 k <- try (many1 (try (alphaNum) <|> oneOf ":-")) <|> (((lookAhead (char '=')) >> return "class"))
11331133 v <- try
1134 (do skipMany (oneOf " \n")
1134 (do skipMany (oneOf " \t\n")
11351135 _ <- char '='
1136 skipMany (oneOf " \n")
1136 skipMany (oneOf " \t\n")
11371137 vv <- try
11381138 (do _ <- try (char '"')
11391139 vvv <- many (attrinside "\"><")
12501250 return (),
12511251 allowed = SpaceIndent : everywheretbl, self = Tag}
12521252
1253 {-DHUN| Parser for the 'meta' tag of HTML DHUN-}
1253 {-DHUN| Parser for the 'meta' and 'link' tag of HTML DHUN-}
12541254
12551255 metatagparser :: MyParser Char
12561256 metatagparser
12571257 = baseParser{start =
12581258 \ _ ->
12591259 do _ <- string "<"
1260 t <- (oneOfTheStrings ["meta"])
1260 t <- (oneOfTheStrings ["meta", "link", "img"])
12611261 atr <- many (try (attr))
12621262 _ <- try (many (oneOf " \n")) <|> return []
12631263 _ <- try (char '/') <|> (return '/')
19491949 printPrepareNode (Environment Tag (TagAttr "div" m) _)
19501950 | (Map.lookup "id" m) == (Just "vector-user-links-dropdown")
19511951 = []
1952 printPrepareNode (Environment Tag (TagAttr "div" m) _)
1953 | (Map.lookup "class" m) == (Just "vector-settings")
1954 = []
1955
1956
19521957 printPrepareNode (Environment Tag (TagAttr "div" m) _)
19531958 | (Map.lookup "id" m) == (Just "p-personal")
19541959 = []
202202
203203 versionHeader :: String
204204 versionHeader
205 = "mediawiki2latex version 7.50\n" ++ (usageInfo header options)
205 = "mediawiki2latex version 7.51\n" ++ (usageInfo header options)
206206
207207 {-DHUN| print the version string of mediawiki2latex. Takes the output of the compilerOpts function as input. Prints the version string if no options were given or the version command was given does noting otherwise DHUN-}
208208