Avoid pointless Latex comments: as an example of how to re-define document output.

This commit is contained in:
Makarius Wenzel 2021-12-19 17:51:38 +01:00
parent fadd982285
commit 70617f59fe
1 changed files with 21 additions and 0 deletions

View File

@ -13,5 +13,26 @@ object DOF_Document_Build
class Engine extends Document_Build.Bash_Engine("dof")
{
override def use_build_script: Boolean = true
override def prepare_directory(
context: Document_Build.Context,
dir: Path,
doc: Document_Build.Document_Variant): Document_Build.Directory =
{
context.prepare_directory(dir, doc, new Latex_Output(context.options))
}
}
class Latex_Output(options: Options) extends Latex.Output(options)
{
override def latex_environment(
name: String,
body: Latex.Text,
optional_argument: String = ""): Latex.Text =
{
XML.enclose(
"\n\\begin{" + name + "}" + optional_argument + "\n",
"\n\\end{" + name + "}", body)
}
}
}