lambdatex-0.2.0.0: Type-Safe LaTeX EDSL

Text.LaTeX.LambdaTeX.Selection.Internal

Contents

Synopsis

# Documentation

selects :: Part -> [Selector] -> Bool Source #

Whether a part is selected by a given list of selectors.

A part is selected if:

All parts are selected or It it is matched and not ignored.

Whether the current part is selected to be generated

# Current part Helpers

Returns the current part from the ΛTeX state

inPart :: Monad m => Text -> ΛTeXT m () -> ΛTeXT m () Source #

Execute the following function with a given sub-part name

pushCurrentPart :: Monad m => Text -> ΛTeXT m () Source #

Push a new part name onto the current part stack

WARNING: This should never be used outside of inPart

popCurrentPart :: Monad m => ΛTeXT m () Source #

Pop a part name off the current part stack

WARNING: This should never be used outside of inPart

# Text Helpers

split :: String -> [String] Source #

Split a string on a dot. This can be useful to convert from a Selectors textual representation back to a selector

split = splitOn '.'

splitOn :: Char -> String -> [String] Source #

Split a string on a specific character