diff options
-rw-r--r-- | src/Site.hs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Site.hs b/src/Site.hs index 03b6e16..bf501d8 100644 --- a/src/Site.hs +++ b/src/Site.hs | |||
@@ -214,16 +214,16 @@ texTransform :: Pandoc -> Compiler Pandoc | |||
214 | texTransform = walkM texTransformInline <=< walkM texTransformBlock | 214 | texTransform = walkM texTransformInline <=< walkM texTransformBlock |
215 | where | 215 | where |
216 | texTransformInline :: Inline -> Compiler Inline | 216 | texTransformInline :: Inline -> Compiler Inline |
217 | texTransformInline (Math mathType tex) = (\html -> Span ("", [classOf mathType], []) [RawInline "html" html]) <$> texTransform' (wrapMath tex) | 217 | texTransformInline (Math mathType tex) = (\html -> Span ("", [classOf mathType], []) [RawInline "html" html]) <$> texTransform' wrapMath tex |
218 | texTransformInline (RawInline "latex" tex) = (\html -> Span ("", [], []) [RawInline "html" html]) <$> texTransform' tex | 218 | texTransformInline (RawInline "latex" tex) = (\html -> Span ("", [], []) [RawInline "html" html]) <$> texTransform' id tex |
219 | texTransformInline x = return x | 219 | texTransformInline x = return x |
220 | texTransformBlock :: Block -> Compiler Block | 220 | texTransformBlock :: Block -> Compiler Block |
221 | texTransformBlock (RawBlock "latex" tex) = (\html -> Div ("", [], []) [RawBlock "html" html]) <$> texTransform' tex | 221 | texTransformBlock (RawBlock "latex" tex) = (\html -> Div ("", [], []) [RawBlock "html" html]) <$> texTransform' id tex |
222 | texTransformBlock x = return x | 222 | texTransformBlock x = return x |
223 | texTransform' :: String -> Compiler String | 223 | texTransform' :: (String -> String) -> String -> Compiler String |
224 | texTransform' tex = do | 224 | texTransform' texT tex = do |
225 | let | 225 | let |
226 | texId = texTranslation' tex | 226 | texId = texTranslation' $ texT tex |
227 | alignment <- loadSnapshotBody texId "alignment" | 227 | alignment <- loadSnapshotBody texId "alignment" |
228 | return $ printf "<object data=\"/%s\" type=\"image/svg+xml\" style=\"vertical-align:-%s\">%s</object>" | 228 | return $ printf "<object data=\"/%s\" type=\"image/svg+xml\" style=\"vertical-align:-%s\">%s</object>" |
229 | (toFilePath texId) (alignment :: String) tex | 229 | (toFilePath texId) (alignment :: String) tex |