@@ -399,9 +399,10 @@ options =
399399 (ReqArg
400400 (\arg opt -> do
401401 text <- readFile arg
402− let oldBefore = optBefore opt
403− -- add new text to end, so it is included in proper order
404− return opt { optBefore = oldBefore ++ [text] })
402+ -- add new ones to end, so they're included in order specified
403+ let newvars = optVariables opt ++ [("include-before",text)]
404+ return opt { optVariables = newvars,
405+ optStandalone = True })
405406 "FILENAME")
406407 "" -- "File to include before document body"
407408
@@ -409,9 +410,10 @@ options =
409410 (ReqArg
410411 (\arg opt -> do
411412 text <- readFile arg
412− let oldAfter = optAfter opt
413− -- add new text to end, so it is included in proper order
414− return opt { optAfter = oldAfter ++ [text]})
413+ -- add new ones to end, so they're included in order specified
414+ let newvars = optVariables opt ++ [("include-after",text)]
415+ return opt { optVariables = newvars,
416+ optStandalone = True })
415417 "FILENAME")
416418 "" -- "File to include after document body"
417419