module Text.Pandoc.Writers.LaTeX.Types
( LW
, WriterState (..)
, startingState
) where
import Control.Monad.State.Strict (StateT)
import Data.Text (Text)
import Text.DocLayout (Doc)
import Text.Pandoc.Options
( WriterOptions (writerIncremental, writerTopLevelDivision)
, TopLevelDivision (..)
)
type LW m = StateT WriterState m
data WriterState =
WriterState
{ WriterState -> Bool
stInNote :: Bool
, WriterState -> Bool
stInQuote :: Bool
, WriterState -> Bool
stExternalNotes :: Bool
, WriterState -> Bool
stInMinipage :: Bool
, WriterState -> Bool
stInHeading :: Bool
, WriterState -> Bool
stInItem :: Bool
, WriterState -> Bool
stInFigure :: Bool
, WriterState -> [Doc Text]
stNotes :: [Doc Text]
, WriterState -> Int
stOLLevel :: Int
, WriterState -> WriterOptions
stOptions :: WriterOptions
, WriterState -> Bool
stVerbInNote :: Bool
, WriterState -> Bool
stTable :: Bool
, WriterState -> Bool
stSubfigure :: Bool
, WriterState -> Bool
stMultiRow :: Bool
, WriterState -> Bool
stStrikeout :: Bool
, WriterState -> Bool
stUrl :: Bool
, WriterState -> Bool
stGraphics :: Bool
, WriterState -> Bool
stSVG :: Bool
, WriterState -> Bool
stLHS :: Bool
, WriterState -> Bool
stHasChapters :: Bool
, WriterState -> Bool
stCsquotes :: Bool
, WriterState -> Bool
stHighlighting :: Bool
, WriterState -> Bool
stIncremental :: Bool
, WriterState -> Bool
stZwnj :: Bool
, WriterState -> [Text]
stInternalLinks :: [Text]
, WriterState -> Bool
stBeamer :: Bool
, WriterState -> Bool
stEmptyLine :: Bool
, WriterState -> Bool
stHasCslRefs :: Bool
, WriterState -> Bool
stIsFirstInDefinition :: Bool
}
startingState :: WriterOptions -> WriterState
startingState :: WriterOptions -> WriterState
startingState WriterOptions
options =
WriterState
{ stInNote :: Bool
stInNote = Bool
False
, stInQuote :: Bool
stInQuote = Bool
False
, stExternalNotes :: Bool
stExternalNotes = Bool
False
, stInHeading :: Bool
stInHeading = Bool
False
, stInMinipage :: Bool
stInMinipage = Bool
False
, stInItem :: Bool
stInItem = Bool
False
, stInFigure :: Bool
stInFigure = Bool
False
, stNotes :: [Doc Text]
stNotes = []
, stOLLevel :: Int
stOLLevel = Int
1
, stOptions :: WriterOptions
stOptions = WriterOptions
options
, stVerbInNote :: Bool
stVerbInNote = Bool
False
, stTable :: Bool
stTable = Bool
False
, stSubfigure :: Bool
stSubfigure = Bool
False
, stMultiRow :: Bool
stMultiRow = Bool
False
, stStrikeout :: Bool
stStrikeout = Bool
False
, stUrl :: Bool
stUrl = Bool
False
, stGraphics :: Bool
stGraphics = Bool
False
, stSVG :: Bool
stSVG = Bool
False
, stLHS :: Bool
stLHS = Bool
False
, stHasChapters :: Bool
stHasChapters = case WriterOptions -> TopLevelDivision
writerTopLevelDivision WriterOptions
options of
TopLevelDivision
TopLevelPart -> Bool
True
TopLevelDivision
TopLevelChapter -> Bool
True
TopLevelDivision
_ -> Bool
False
, stCsquotes :: Bool
stCsquotes = Bool
False
, stHighlighting :: Bool
stHighlighting = Bool
False
, stIncremental :: Bool
stIncremental = WriterOptions -> Bool
writerIncremental WriterOptions
options
, stZwnj :: Bool
stZwnj = Bool
False
, stInternalLinks :: [Text]
stInternalLinks = []
, stBeamer :: Bool
stBeamer = Bool
False
, stEmptyLine :: Bool
stEmptyLine = Bool
True
, stHasCslRefs :: Bool
stHasCslRefs = Bool
False
, stIsFirstInDefinition :: Bool
stIsFirstInDefinition = Bool
False
}