Merge branch 'master' into fradrive/tutorial-overhaul
This commit is contained in:
commit
c7d6467878
@ -25,8 +25,8 @@ mail-from:
|
|||||||
mail-object-domain: "_env:MAILOBJECT_DOMAIN:localhost"
|
mail-object-domain: "_env:MAILOBJECT_DOMAIN:localhost"
|
||||||
mail-use-replyto-instead-sender: "_env:MAIL_USES_REPLYTO:true"
|
mail-use-replyto-instead-sender: "_env:MAIL_USES_REPLYTO:true"
|
||||||
#mail-reroute-to:
|
#mail-reroute-to:
|
||||||
# name: "_env:MAIL_REROUTE_TO_NAME:"
|
# name: "_env:MAIL_REROUTE_TO_NAME:Steffen Jost"
|
||||||
# email: "_env:MAIL_REROUTE_TO_EMAL:"
|
# email: "_env:MAIL_REROUTE_TO_EMAL:jost@tcs.ifi.lmu.de"
|
||||||
#mail-verp:
|
#mail-verp:
|
||||||
# separator: "_env:VERP_SEPARATOR:+"
|
# separator: "_env:VERP_SEPARATOR:+"
|
||||||
# prefix: "_env:VERP_PREFIX:bounce"
|
# prefix: "_env:VERP_PREFIX:bounce"
|
||||||
|
|||||||
@ -35,7 +35,7 @@ let
|
|||||||
(texlive.combine {
|
(texlive.combine {
|
||||||
inherit (texlive) scheme-basic
|
inherit (texlive) scheme-basic
|
||||||
babel-german babel-english booktabs textpos
|
babel-german babel-english booktabs textpos
|
||||||
enumitem eurosym koma-script parskip xcolor
|
enumitem eurosym koma-script parskip xcolor dejavu
|
||||||
# required fro LuaTeX
|
# required fro LuaTeX
|
||||||
luatexbase lualatex-math unicode-math selnolig
|
luatexbase lualatex-math unicode-math selnolig
|
||||||
;
|
;
|
||||||
|
|||||||
@ -87,7 +87,7 @@ in pkgs.mkShell {
|
|||||||
(texlive.combine {
|
(texlive.combine {
|
||||||
inherit (texlive) scheme-basic
|
inherit (texlive) scheme-basic
|
||||||
babel-german babel-english booktabs textpos
|
babel-german babel-english booktabs textpos
|
||||||
enumitem eurosym koma-script parskip xcolor
|
enumitem eurosym koma-script parskip xcolor dejavu
|
||||||
# required fro LuaTeX
|
# required fro LuaTeX
|
||||||
luatexbase lualatex-math unicode-math selnolig
|
luatexbase lualatex-math unicode-math selnolig
|
||||||
;
|
;
|
||||||
|
|||||||
@ -127,7 +127,7 @@ maxLmsUserIdentRetries = 27
|
|||||||
randomText :: MonadIO m => String -> Int -> m Text
|
randomText :: MonadIO m => String -> Int -> m Text
|
||||||
randomText extra n = fmap pack . evalRandTIO . replicateM n $ uniform range
|
randomText extra n = fmap pack . evalRandTIO . replicateM n $ uniform range
|
||||||
where
|
where
|
||||||
num_letters = ['0'..'9'] ++ ['a'..'z']
|
num_letters = ['2'..'9'] ++ ['a'..'z'] \\ ['l']
|
||||||
range = extra ++ num_letters
|
range = extra ++ num_letters
|
||||||
|
|
||||||
--TODO: consider using package elocrypt for user-friendly passwords here, licence requires mentioning of author, etc. though
|
--TODO: consider using package elocrypt for user-friendly passwords here, licence requires mentioning of author, etc. though
|
||||||
@ -150,4 +150,4 @@ randomLMSIdentBut banList = untilJustMaxM maxLmsUserIdentRetries getIdentOk
|
|||||||
randomLMSpw :: MonadIO m => m Text
|
randomLMSpw :: MonadIO m => m Text
|
||||||
randomLMSpw = randomText extra lengthPassword
|
randomLMSpw = randomText extra lengthPassword
|
||||||
where
|
where
|
||||||
extra = "+*:=!?#&" -- you cannot distinguish ;: and ., in printed letters
|
extra = "+=!?" -- you cannot distinguish ;: and ., in printed letters
|
||||||
|
|||||||
@ -850,24 +850,34 @@ cfCI = convertField CI.mk CI.original
|
|||||||
cfCommaSeparatedSet :: (Functor m) => Field m Text -> Field m (Set Text)
|
cfCommaSeparatedSet :: (Functor m) => Field m Text -> Field m (Set Text)
|
||||||
cfCommaSeparatedSet = guardField (not . Set.null) . convertField (Set.fromList . mapMaybe (assertM' (not . T.null) . T.strip) . T.split (==',')) (T.intercalate ", " . Set.toList)
|
cfCommaSeparatedSet = guardField (not . Set.null) . convertField (Set.fromList . mapMaybe (assertM' (not . T.null) . T.strip) . T.split (==',')) (T.intercalate ", " . Set.toList)
|
||||||
|
|
||||||
-- cfAnySeparatedSet :: (Functor m) => Field m Text -> Field m (Set Text)
|
|
||||||
-- cfAnySeparatedSet = guardField (not . Set.null) . convertField (Set.fromList . mapMaybe (assertM' (not . T.null) . T.strip) . T.split anySeparator) (T.intercalate ", " . Set.toList)
|
|
||||||
-- where anySeparator :: Char -> Bool
|
|
||||||
-- anySeparator c = C.isSeparator c || c == ',' || c == ';'
|
|
||||||
|
|
||||||
cfAnySeparatedSet :: (Functor m) => Field m Text -> Field m (Set Text)
|
cfAnySeparatedSet :: (Functor m) => Field m Text -> Field m (Set Text)
|
||||||
cfAnySeparatedSet = guardField (not . Set.null) . convertField (Set.fromList . mapMaybe (assertM' (not . T.null) . T.strip) . splitConditionally) (T.intercalate "; " . Set.toList)
|
cfAnySeparatedSet = guardField (not . Set.null) . convertField (Set.fromList . mapMaybe (assertM' (not . T.null) . T.strip) . T.split anySeparator) (T.intercalate ", " . Set.toList)
|
||||||
where splitConditionally :: Text -> [Text]
|
where anySeparator :: Char -> Bool
|
||||||
splitConditionally t
|
anySeparator c = C.isSeparator c || c == ',' || c == ';'
|
||||||
| ';' `telem` t = T.split (==';') t
|
|
||||||
| ',' `telem` t = T.split (==',') t
|
-- Version that splits conditionally whether or not a separator is found:
|
||||||
| otherwise = T.split C.isSeparator t
|
-- cfAnySeparatedSet :: (Functor m) => Field m Text -> Field m (Set Text)
|
||||||
-- Our version of Data.Text does not yet support T.elem
|
-- cfAnySeparatedSet = guardField (not . Set.null) . convertField (Set.fromList . mapMaybe (assertM' (not . T.null) . T.strip) . splitConditionally) (T.intercalate "; " . Set.toList)
|
||||||
telem :: Char -> Text -> Bool
|
-- where splitConditionally :: Text -> [Text]
|
||||||
telem c = T.any (==c)
|
-- splitConditionally t
|
||||||
|
-- | ';' `telem` t = T.split (==';') t
|
||||||
|
-- | ',' `telem` t = T.split (==',') t
|
||||||
|
-- | otherwise = T.split C.isSeparator t
|
||||||
|
-- -- Our version of Data.Text does not yet support T.elem
|
||||||
|
-- telem :: Char -> Text -> Bool
|
||||||
|
-- telem c = T.any (==c)
|
||||||
|
|
||||||
|
|
||||||
|
-- cfAnySeparatedSet :: (Functor m) => Field m Text -> Field m (Set Text)
|
||||||
|
-- cfAnySeparatedSet = guardField (not . Set.null) . convertField (Set.fromList . mapMaybe (assertM' (not . T.null) . T.strip) . splitConditionally) (T.intercalate "; " . Set.toList)
|
||||||
|
-- where splitConditionally :: Text -> [Text]
|
||||||
|
-- splitConditionally t
|
||||||
|
-- | ';' `telem` t = T.split (==';') t
|
||||||
|
-- | ',' `telem` t = T.split (==',') t
|
||||||
|
-- | otherwise = T.split C.isSeparator t
|
||||||
|
-- -- Our version of Data.Text does not yet support T.elem
|
||||||
|
-- telem :: Char -> Text -> Bool
|
||||||
|
-- telem c = T.any (==c)
|
||||||
|
|
||||||
-- -- TODO: consider using package ordered-containers?
|
-- -- TODO: consider using package ordered-containers?
|
||||||
-- cfAnySeparatedList :: (Functor m) => Field m Text -> Field m [Text]
|
-- cfAnySeparatedList :: (Functor m) => Field m Text -> Field m [Text]
|
||||||
|
|||||||
@ -61,7 +61,13 @@ $endif$
|
|||||||
\usepackage[$if(fontenc)$$fontenc$$else$T1$endif$]{fontenc}
|
\usepackage[$if(fontenc)$$fontenc$$else$T1$endif$]{fontenc}
|
||||||
\usepackage[utf8]{inputenc}
|
\usepackage[utf8]{inputenc}
|
||||||
\usepackage{textcomp} % provide euro and other symbols
|
\usepackage{textcomp} % provide euro and other symbols
|
||||||
\else % if luatex or xetex
|
\usepackage{DejaVuSansMono} % better monofont
|
||||||
|
\else
|
||||||
|
% if luatex or xetex
|
||||||
|
\usepackage{fontspec}
|
||||||
|
\setmonofont{DejaVu Sans Mono}
|
||||||
|
\fi
|
||||||
|
|
||||||
$if(mathspec)$
|
$if(mathspec)$
|
||||||
\ifXeTeX
|
\ifXeTeX
|
||||||
\usepackage{mathspec}
|
\usepackage{mathspec}
|
||||||
|
|||||||
Reference in New Issue
Block a user