diff options
Diffstat (limited to 'support/make4ht/mkparams.lua')
-rw-r--r-- | support/make4ht/mkparams.lua | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/support/make4ht/mkparams.lua b/support/make4ht/mkparams.lua index ed766f9770..10ddd04744 100644 --- a/support/make4ht/mkparams.lua +++ b/support/make4ht/mkparams.lua @@ -21,6 +21,7 @@ Available options: possible values: tex4ht or lua4ht -c,--config (default xhtml) Custom config file -d,--output-dir (default nil) Output directory + -B,--build-dir (default nil) Build directory -e,--build-file (default nil) If build file is different than `filename`.mk4 -f,--format (default html5) Output file format -h,--help Display this message @@ -191,12 +192,20 @@ local function process_args(args) local outdir = "" local packages = "" - if args["output-dir"] ~= "nil" then + if args["output-dir"] ~= "nil" then outdir = args["output-dir"] or "" outdir = outdir:gsub('\\','/') outdir = outdir:gsub('/$','') end + local builddir = "" + + if args["build-dir"] ~= "nil" then + builddir = args["build-dir"] or "" + builddir = builddir:gsub('\\','/') + builddir = builddir:gsub('/$','') + end + -- make4ht now requires UTF-8 output, because of DOM filters -- numeric entites are expanded to Unicode characters. These -- characters would be displayed incorrectly in 8 bit encodings. @@ -274,7 +283,7 @@ local function process_args(args) local parameters = { htlatex = compiler ,input=input - ,tex_file=tex_file + ,tex_file=tex_file ,packages=packages ,latex_par=table.concat(latex_params," ") --,config=ebookutils.remove_extension(args.config) @@ -291,6 +300,7 @@ local function process_args(args) --,t4ht_dir_format=t4ht_dir_format } if outdir then parameters.outdir = outdir end + if builddir then parameters.builddir = builddir end log:info("Output dir: "..outdir) log:info("Compiler: "..compiler) log:info("Latex options: ".. table.concat(latex_params," ")) |