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-use-replyto-instead-sender: "_env:MAIL_USES_REPLYTO:true"
|
||||
#mail-reroute-to:
|
||||
# name: "_env:MAIL_REROUTE_TO_NAME:"
|
||||
# email: "_env:MAIL_REROUTE_TO_EMAL:"
|
||||
# name: "_env:MAIL_REROUTE_TO_NAME:Steffen Jost"
|
||||
# email: "_env:MAIL_REROUTE_TO_EMAL:jost@tcs.ifi.lmu.de"
|
||||
#mail-verp:
|
||||
# separator: "_env:VERP_SEPARATOR:+"
|
||||
# prefix: "_env:VERP_PREFIX:bounce"
|
||||
|
||||
@ -35,7 +35,7 @@ let
|
||||
(texlive.combine {
|
||||
inherit (texlive) scheme-basic
|
||||
babel-german babel-english booktabs textpos
|
||||
enumitem eurosym koma-script parskip xcolor
|
||||
enumitem eurosym koma-script parskip xcolor dejavu
|
||||
# required fro LuaTeX
|
||||
luatexbase lualatex-math unicode-math selnolig
|
||||
;
|
||||
|
||||
@ -87,7 +87,7 @@ in pkgs.mkShell {
|
||||
(texlive.combine {
|
||||
inherit (texlive) scheme-basic
|
||||
babel-german babel-english booktabs textpos
|
||||
enumitem eurosym koma-script parskip xcolor
|
||||
enumitem eurosym koma-script parskip xcolor dejavu
|
||||
# required fro LuaTeX
|
||||
luatexbase lualatex-math unicode-math selnolig
|
||||
;
|
||||
|
||||
@ -127,7 +127,7 @@ maxLmsUserIdentRetries = 27
|
||||
randomText :: MonadIO m => String -> Int -> m Text
|
||||
randomText extra n = fmap pack . evalRandTIO . replicateM n $ uniform range
|
||||
where
|
||||
num_letters = ['0'..'9'] ++ ['a'..'z']
|
||||
num_letters = ['2'..'9'] ++ ['a'..'z'] \\ ['l']
|
||||
range = extra ++ num_letters
|
||||
|
||||
--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 = randomText extra lengthPassword
|
||||
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 = 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 = 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)
|
||||
|
||||
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 == ';'
|
||||
|
||||
-- Version that splits conditionally whether or not a separator is found:
|
||||
-- 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)
|
||||
|
||||
|
||||
-- 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?
|
||||
-- cfAnySeparatedList :: (Functor m) => Field m Text -> Field m [Text]
|
||||
|
||||
@ -61,7 +61,13 @@ $endif$
|
||||
\usepackage[$if(fontenc)$$fontenc$$else$T1$endif$]{fontenc}
|
||||
\usepackage[utf8]{inputenc}
|
||||
\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)$
|
||||
\ifXeTeX
|
||||
\usepackage{mathspec}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user