module Text.Pandoc.Writers.JATS.Types
( JATS
, JATSEnv (..)
, JATSState (..)
, JATSTagSet (..)
)
where
import Citeproc.Types (Reference)
import Control.Monad.Reader (ReaderT)
import Control.Monad.State (StateT)
import Data.Text (Text)
import Text.DocLayout (Doc)
import Text.Pandoc.Builder (Block, Inline, Inlines)
import Text.Pandoc.Options (WriterOptions)
data JATSTagSet
= TagSetArchiving
| TagSetPublishing
| TagSetArticleAuthoring
deriving (JATSTagSet -> JATSTagSet -> Bool
(JATSTagSet -> JATSTagSet -> Bool)
-> (JATSTagSet -> JATSTagSet -> Bool) -> Eq JATSTagSet
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: JATSTagSet -> JATSTagSet -> Bool
== :: JATSTagSet -> JATSTagSet -> Bool
$c/= :: JATSTagSet -> JATSTagSet -> Bool
/= :: JATSTagSet -> JATSTagSet -> Bool
Eq)
newtype JATSState = JATSState
{ JATSState -> [(Int, Doc Text)]
jatsNotes :: [(Int, Doc Text)]
}
data JATSEnv m = JATSEnv
{ forall (m :: * -> *). JATSEnv m -> JATSTagSet
jatsTagSet :: JATSTagSet
, forall (m :: * -> *).
JATSEnv m
-> (Block -> Bool) -> WriterOptions -> [Block] -> JATS m (Doc Text)
jatsBlockWriter :: (Block -> Bool)
-> WriterOptions -> [Block] -> JATS m (Doc Text)
, forall (m :: * -> *).
JATSEnv m -> WriterOptions -> [Inline] -> JATS m (Doc Text)
jatsInlinesWriter :: WriterOptions -> [Inline] -> JATS m (Doc Text)
, forall (m :: * -> *). JATSEnv m -> [Reference Inlines]
jatsReferences :: [Reference Inlines]
}
type JATS m = StateT JATSState (ReaderT (JATSEnv m) m)