@@ -29,7 +29,6 @@ Conversion of 'Pandoc' documents to groff man page format.
32−[ ] warning for non-rendered raw content
33[ ] is there a better way to do strikeout?
32[ ] is there a better way to do strikeout?
34[ ] options for hyperlink rendering (currently footnote)
33[ ] options for hyperlink rendering (currently footnote)
35[ ] can we get prettier output using .B, etc. instead of
34[ ] can we get prettier output using .B, etc. instead of
@@ -57,7 +56,8 @@ import Data.List ( stripPrefix, intersperse, intercalate, sort )
57import Data.Maybe (fromMaybe)
56import Data.Maybe (fromMaybe)
58import Text.Pandoc.Pretty
57import Text.Pandoc.Pretty
59import Text.Pandoc.Builder (deleteMeta)
58import Text.Pandoc.Builder (deleteMeta)
60−import Text.Pandoc.Class (PandocMonad)
59+import Text.Pandoc.Class (PandocMonad, report)
60+import Text.Pandoc.Logging
61import Control.Monad.State
61import Control.Monad.State
62import Data.Char ( isDigit, isLower, isUpper, toUpper )
62import Data.Char ( isDigit, isLower, isUpper, toUpper )
63import Text.TeXMath (writeEqn)
63import Text.TeXMath (writeEqn)
@@ -223,9 +223,11 @@ blockToMs opts (Para inlines) = do
223 contents <- liftM vcat $ mapM (inlineListToMs' opts) $
223 contents <- liftM vcat $ mapM (inlineListToMs' opts) $
224 splitSentences inlines
224 splitSentences inlines
225 return $ text ".LP" $$ contents
225 return $ text ".LP" $$ contents
226−blockToMs _ (RawBlock f str)
226+blockToMs _ b@(RawBlock f str)
227 | f == Format "man" = return $ text str
227 | f == Format "man" = return $ text str
229+ report $ BlockNotRendered b
228− | otherwise = return empty
230+ return empty
229blockToMs _ HorizontalRule = return $ text ".PP" $$ text " * * * * *"
231blockToMs _ HorizontalRule = return $ text ".PP" $$ text " * * * * *"
230blockToMs opts (Header level _ inlines) = do
232blockToMs opts (Header level _ inlines) = do
231 contents <- inlineListToMs' opts inlines
233 contents <- inlineListToMs' opts inlines
@@ -419,9 +421,11 @@ inlineToMs opts (Math DisplayMath str) = do
419 return $ cr <> text ".RS" $$ contents $$ text ".RE"
421 return $ cr <> text ".RS" $$ contents $$ text ".RE"
420 Right r -> return $
422 Right r -> return $
421 cr <> text ".EQ" $$ text (escapeBar r) $$ text ".EN"
423 cr <> text ".EQ" $$ text (escapeBar r) $$ text ".EN"
422−inlineToMs _ (RawInline f str)
424+inlineToMs _ il@(RawInline f str)
423 | f == Format "man" = return $ text str
425 | f == Format "man" = return $ text str
427+ report $ InlineNotRendered il
424− | otherwise = return empty
428+ return empty
425inlineToMs _ (LineBreak) = return $ cr <> text ".br" <> cr
429inlineToMs _ (LineBreak) = return $ cr <> text ".br" <> cr
426inlineToMs opts SoftBreak = handleNotes opts cr
430inlineToMs opts SoftBreak = handleNotes opts cr
427inlineToMs opts Space = handleNotes opts space
431inlineToMs opts Space = handleNotes opts space