summaryrefslogtreecommitdiff
path: root/support
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-03-09 03:03:31 +0000
committerNorbert Preining <norbert@preining.info>2023-03-09 03:03:31 +0000
commit716c428e47ad2e893c0f970b9fa866d2a88f00e4 (patch)
treed9b683b0eefb5503c3ec99d4be99d0cfefd4daf2 /support
parenta0867c71356c67c442bdebc0de39b7996f847bf7 (diff)
CTAN sync 202303090303
Diffstat (limited to 'support')
-rw-r--r--support/TeX4ht/source/ChangeLog6
-rw-r--r--support/TeX4ht/source/mktex4ht-cnf.tex3
-rw-r--r--support/TeX4ht/source/tex4ht-4ht.tex24
-rw-r--r--support/TeX4ht/source/tex4ht-fonts-noncjk.tex12
-rw-r--r--support/light-latex-make/LICENSE2
-rw-r--r--support/light-latex-make/README.md72
-rw-r--r--support/light-latex-make/llmk-doc.cls22
-rw-r--r--support/light-latex-make/llmk-logo-code.tex2
-rw-r--r--support/light-latex-make/llmk.16
-rwxr-xr-xsupport/light-latex-make/llmk.lua79
-rw-r--r--support/light-latex-make/llmk.pdfbin99421 -> 114804 bytes
-rw-r--r--support/light-latex-make/llmk.tex69
12 files changed, 224 insertions, 73 deletions
diff --git a/support/TeX4ht/source/ChangeLog b/support/TeX4ht/source/ChangeLog
index 6e7294edca..f172361dba 100644
--- a/support/TeX4ht/source/ChangeLog
+++ b/support/TeX4ht/source/ChangeLog
@@ -1,3 +1,9 @@
+2023-03-07 Michal Hoftich <michal.h21@gmail.com>
+
+ * tex4ht-4ht.tex (physics.4ht): fixed MathML issues with the Physics
+ package.
+ https://github.com/michal-h21/make4ht/issues/109
+
2023-03-02 Michal Hoftich <michal.h21@gmail.com>
* tex4ht-html4.tex (html4.4ht): added jpeg to list of supported
diff --git a/support/TeX4ht/source/mktex4ht-cnf.tex b/support/TeX4ht/source/mktex4ht-cnf.tex
index 6617373113..b99917a7c9 100644
--- a/support/TeX4ht/source/mktex4ht-cnf.tex
+++ b/support/TeX4ht/source/mktex4ht-cnf.tex
@@ -1,4 +1,4 @@
-% $Id: mktex4ht-cnf.tex 1285 2023-01-12 13:43:41Z michal_h21 $
+% $Id: mktex4ht-cnf.tex 1304 2023-03-07 12:50:09Z michal_h21 $
% Manually-maintained file, listing *.4ht files created by tex4ht-4ht.tex.
% Read by tex4ht-cond4ht.
%
@@ -259,6 +259,7 @@
\AddFile{8}{euler}
\AddFile{8}{eucal}
\AddFile{9}{longdiv}
+\AddFile{9}{physics}
\AddFile{7}{index}
\AddFile{7}{multind}
\AddFile{7}{imakeidx}
diff --git a/support/TeX4ht/source/tex4ht-4ht.tex b/support/TeX4ht/source/tex4ht-4ht.tex
index 57e5e215b9..4d36f3a472 100644
--- a/support/TeX4ht/source/tex4ht-4ht.tex
+++ b/support/TeX4ht/source/tex4ht-4ht.tex
@@ -1,4 +1,4 @@
-% $Id: tex4ht-4ht.tex 1300 2023-02-25 21:15:50Z michal_h21 $
+% $Id: tex4ht-4ht.tex 1304 2023-03-07 12:50:09Z michal_h21 $
% tex tex4ht-4ht or ht tex tex4ht-4ht
%
% Copyright 2009-2023 TeX Users Group
@@ -31257,6 +31257,28 @@ UnDFexyz%
\NewConfigure{longdiv}{2}
>>>
+\Section{physics.sty}
+
+\<physics.4ht\><<<
+% physics.4ht (|version), generated from |jobname.tex
+% Copyright 2023 TeX Users Group
+|<TeX4ht license text|>
+|<physics argopen|>
+\Hinput{physics}
+\endinput
+>>> \AddFile{9}{physics}
+
+argopen and argclose cause issues in MathML, so we make a dummy definition, which is then
+used outside of Pictures. The original version added automatically left and right, which is
+not necessary in MathML anyway.
+
+\<physics argopen\><<<
+\DeclareDocumentCommand\physics:argopen{s}{} % Special open grouping for argument of a function
+\DeclareDocumentCommand\physics:argclose{s}{} % Special close grouping for argument of a function
+\HLet\argopen\physics:argopen
+\HLet\argclose\physics:argclose
+>>>
+
%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{Indexes}
\SubSection{index.sty}
diff --git a/support/TeX4ht/source/tex4ht-fonts-noncjk.tex b/support/TeX4ht/source/tex4ht-fonts-noncjk.tex
index 2440f4a88f..2681238c7c 100644
--- a/support/TeX4ht/source/tex4ht-fonts-noncjk.tex
+++ b/support/TeX4ht/source/tex4ht-fonts-noncjk.tex
@@ -1,4 +1,4 @@
-% $Id: tex4ht-fonts-noncjk.tex 1250 2022-11-24 14:12:46Z michal_h21 $
+% $Id: tex4ht-fonts-noncjk.tex 1301 2023-02-27 10:13:24Z michal_h21 $
% tex tex4ht-fonts-noncjk
% or ht tex tex4ht-fonts-noncjk
%
@@ -39749,7 +39749,7 @@ htfcss: cmcitt font-family: monospace,monospace; font-style: italic;
\<cmcbxti-uni\><<<
cmcbxti 25 127
-'&#x2216;' '' 25 `<version 0`>
+'&#x2116;' '' 25 `<version 0`>
'' '' 26 % cmcbxti.htf (unicode) `version %
'' '' 27 % Copyright `CopyYear.2000. Eitan M. Gurari %
'' '' 28 `<version 2`>
@@ -39863,7 +39863,7 @@ htfcss: cmcbxti font-weight: bold; font-style: italic;
\<cmcbxti-1251\><<<
cmcbxti 25 127
-'&#x2216;' '1'25 `<version 0`>
+'&#x2116;' '1'25 `<version 0`>
'' '' 26 % cmcbxti.htf (win 2151) `version %
'' '' 27 % Copyright `CopyYear.2000. Eitan M. Gurari %
'' '' 28 `<version 2`>
@@ -39975,7 +39975,7 @@ htfcss: cmcbxti font-weight: bold; font-style: italic;
\<cmcbxti-5\><<<
cmcbxti 25 127
-'&#x2216;' '1'25 `<version 0`>
+'&#x2116;' '1'25 `<version 0`>
'' '' 26 % cmcbxti.htf (iso-8859-2) `version %
'' '' 27 % Copyright `CopyYear.2000. Eitan M. Gurari %
'' '' 28 `<version 2`>
@@ -40124,7 +40124,7 @@ htfcss: cmcb font-weight: bold;
\<cmcbx-5\><<<
cmcbx 25 127
-'&#x2216;' '' 25 `<version 0`>
+'&#x2116;' '' 25 `<version 0`>
'' '' 26 % cmcbx.htf (unicode) `version %
'' '' 27 % Copyright `CopyYear.2000. Eitan M. Gurari %
'' '' 28 `<version 2`>
@@ -40346,7 +40346,7 @@ cmccsc 30 127
\<cmcbx-1251\><<<
cmcbx 25 127
-'&#x2216;' '' 25 `<version 0`>
+'&#x2116;' '' 25 `<version 0`>
'' '' 26 % cmcbx.htf (unicode) `version %
'' '' 27 % Copyright `CopyYear.2000. Eitan M. Gurari %
'' '' 28 `<version 2`>
diff --git a/support/light-latex-make/LICENSE b/support/light-latex-make/LICENSE
index bcd5768aa0..cff4de24b7 100644
--- a/support/light-latex-make/LICENSE
+++ b/support/light-latex-make/LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)
-Copyright 2018-2021 Takuto ASAKURA (wtsnjp)
+Copyright 2018-2023 Takuto Asakura (wtsnjp)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/support/light-latex-make/README.md b/support/light-latex-make/README.md
index d8cee7d45b..12f4ff1c0c 100644
--- a/support/light-latex-make/README.md
+++ b/support/light-latex-make/README.md
@@ -42,7 +42,7 @@ Hello \textsf{llmk}!
Suppose we save this file as `hello.tex`, then run
```shell
-$ llmk hello.tex
+llmk hello.tex
```
will produce a PDF document (`hello.pdf`) with XeLaTeX, since it is specified in the TOML line of the source.
@@ -63,7 +63,7 @@ source = "hello.tex"
If you run llmk without any argument, llmk will load `llmk.toml` in the working directory, and compile files specified by the `source` key with the settings written in the file.
```shell
-$ llmk
+llmk
```
### Supports for other magic comment formats
@@ -116,7 +116,7 @@ Similar to [latexmk](http://personal.psu.edu/jcc8/software/latexmk/), Actions `-
Specifically,
```shell
-$ llmk --clean FILE...
+llmk --clean FILE...
```
removes files generated by the specified `FILE`s. In case you omit the argument `FILE`, files generated by the `source` files are removed. In both cases, the files to remove by these actions can be customized (see the reference manual for the details).
@@ -153,7 +153,9 @@ In the `args` keys in each program, some format specifiers are available. Those
* `%S`: the file name given to llmk as an argument (source)
* `%T`: the target for each program
-* `%B`: the base name of `%S`
+* `%o`: the output directory, or `.` if none was specified
+* `%b`: the base name of `%S`
+* `%B`: the output directory concatenated with the base name of `%S`
This way is a bit complicated but strong enough allowing you to use any kind of outer programs.
@@ -170,7 +172,9 @@ The following is the list of available TOML keys in llmk. See the reference manu
* `latex` (type: *string*, default: `"lualatex"`)
* `llmk_version` (type: *string*)
* `makeindex` (type: *string*, default: `"makeindex"`)
+* `makeglossaries` (type: *string*, default: `"makeglossaries"`)
* `max_repeat` (type: *integer*, default: `5`)
+* `output_directory` (type: *string*)
* `programs` (type: *table*)
* \<program name\>
* `args` (type: *string* or *array of strings*, default: `["%T"]`)
@@ -182,7 +186,7 @@ The following is the list of available TOML keys in llmk. See the reference manu
* `postprocess` (type: *string*)
* `target` (type: *string*, default: `"%S"`)
* `ps2pdf` (type: *string*, default: `"ps2pdf"`)
-* `sequence` (type: *array of strings*, default: `["latex", "bibtex", "makeindex", "dvipdf"]`)
+* `sequence` (type: *array of strings*, default: `["latex", "bibtex", "makeindex", "makeglossaries", "dvipdf"]`)
* `source` (type: *string* or *array of strings*, only for `llmk.toml`)
### Default `programs` table
@@ -208,7 +212,7 @@ generated_target = true
[programs.latex]
command = "lualatex"
-opts = ["-interaction=nonstopmode", "-file-line-error", "-synctex=1"]
+opts = ["-interaction=nonstopmode", "-file-line-error", "-synctex=1", '-output-directory="%o"']
aux_file = "%B.aux"
aux_empty_size = 9
@@ -218,12 +222,64 @@ target = "%B.idx"
generated_target = true
postprocess = "latex"
+[programs.makeglossaries]
+command = "makeglossaries"
+target = "%B.glo"
+generated_target = true
+postprocess = "latex"
+opts = ['-d "%o"']
+args = ["%b.glo"]
+
[programs.ps2pdf]
command = "ps2pdf"
target = "%B.ps"
generated_target = true
```
+## Building and testing
+
+Some maintenance tasks are defined as [Rake](https://github.com/ruby/rake) tasks. To run these tasks, please install the dependencies first:
+
+```shell
+bundle install
+```
+
+### Generating all documentation
+
+The following will generate both the PDF and the manpage in `doc/` directory.
+
+```shell
+rake doc
+```
+
+### Running tests
+
+The following will run all tests in `spec/` directory.
+
+```shell
+rake test
+```
+
+Alternatively, you can give spec names with the `--list` (`-l`) option for this task. E.g., following will run only `spec/help_spec.rb` and `spec/version_spec.rb`:
+
+```shell
+rake test -- -l help,version
+```
+
+### Showing all available tasks
+
+Following will show all available tasks with a short description.
+
+```shell
+rake -T
+```
+
+In addition to that, for options available tasks, e.g., `rake test`, you can get options information with `-h` option for each task:
+
+```shell
+rake test -- -h
+```
+
## Links to other materials
* [Reference manual](http://mirrors.ctan.org/support/light-latex-make/llmk.pdf): it describes the full specification.
@@ -236,7 +292,7 @@ This project has been supported by the [TeX Development Fund](https://www.tug.or
## License
-Copyright 2018-2021 Takuto ASAKURA ([wtsnjp](https://twitter.com/wtsnjp))
+Copyright 2018-2023 Takuto Asakura ([wtsnjp](https://twitter.com/wtsnjp))
This software is licensed under [the MIT license](./LICENSE).
@@ -246,4 +302,4 @@ This software is licensed under [the MIT license](./LICENSE).
---
-Takuto ASAKURA ([wtsnjp](https://twitter.com/wtsnjp))
+Takuto Asakura ([wtsnjp](https://twitter.com/wtsnjp))
diff --git a/support/light-latex-make/llmk-doc.cls b/support/light-latex-make/llmk-doc.cls
index 632becfcd3..628e05fb2f 100644
--- a/support/light-latex-make/llmk-doc.cls
+++ b/support/light-latex-make/llmk-doc.cls
@@ -39,18 +39,22 @@
\RequirePackage{listings}
\RequirePackage{xparse}
-% logo
-\input{llmk-logo-code}
-\RequirePackage[no-math]{fontspec}
+% font settings
+\RequirePackage{fontspec}
\defaultfontfeatures{Ligatures=TeX}
+
+\RequirePackage{unicode-math}
+\RequirePackage{utfsym}
+
+\setmainfont{STIX Two Text}
+\setsansfont{Helvetica Neue}
+\setmathfont{STIX Two Math}[StylisticSet=02, StylisticSet=08]
+\setmonofont[StylisticSet={1,3}]{Inconsolatazi4}
+
+% logo
\newcommand{\logomainfont}{\fontspec{Helvetica Neue}}
\newcommand{\logosubfont}{\fontspec{Helvetica Neue Thin}}
-
-% font settings
-\let\Zbar\relax
-\RequirePackage[defaultsups]{newtxtext}
-\RequirePackage[varqu,varl]{inconsolata}
-\RequirePackage[bigdelims,vvarbb]{newtxmath}
+\input{llmk-logo-code}
% for headings
%\setkomafont{title}{}
diff --git a/support/light-latex-make/llmk-logo-code.tex b/support/light-latex-make/llmk-logo-code.tex
index 3201ed0fd4..7a69a07717 100644
--- a/support/light-latex-make/llmk-logo-code.tex
+++ b/support/light-latex-make/llmk-logo-code.tex
@@ -1,7 +1,7 @@
%
% This is LaTeX source for the llmk logo.
%
-% Copyright 2018-2020 Takuto ASAKURA (wtsnjp)
+% Copyright 2018-2023 Takuto Asakura (wtsnjp)
% GitHub: https://github.com/wtsnjp
% Twitter: @wtsnjp
%
diff --git a/support/light-latex-make/llmk.1 b/support/light-latex-make/llmk.1
index ef5dded390..1eb09ccfab 100644
--- a/support/light-latex-make/llmk.1
+++ b/support/light-latex-make/llmk.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "LLMK" "1" "August 2021" "llmk 1.1.0" "llmk manual"
+.TH "LLMK" "1" "March 2023" "llmk 1.2.0" "llmk manual"
.
.SH "NAME"
\fBllmk\fR \- Light LaTeX Make
@@ -69,7 +69,7 @@ General error\.
.
.TP
2
-Failure executing the workflow\. The exit status of the external program is reported in an error message\.
+Error in invoked program\. The exit status of the external program is reported in an error message\.
.
.TP
3
@@ -86,7 +86,7 @@ Report bugs to \fIhttps://github\.com/wtsnjp/llmk/issues\fR\.
Source: \fIhttps://github\.com/wtsnjp/llmk\fR
.
.SH "COPYRIGHT"
-Copyright 2018\-2021 Takuto ASAKURA (wtsnjp)\.
+Copyright 2018\-2023 Takuto Asakura (wtsnjp)\.
.
.br
License: The MIT License \fIhttps://opensource\.org/licenses/mit\-license\fR\.
diff --git a/support/light-latex-make/llmk.lua b/support/light-latex-make/llmk.lua
index 79264eaeea..3bdf5effcf 100755
--- a/support/light-latex-make/llmk.lua
+++ b/support/light-latex-make/llmk.lua
@@ -3,7 +3,7 @@
--
-- This is file `llmk.lua'.
--
--- Copyright 2018-2021 Takuto ASAKURA (wtsnjp)
+-- Copyright 2018-2023 Takuto Asakura (wtsnjp)
-- GitHub: https://github.com/wtsnjp
-- Twitter: @wtsnjp
--
@@ -39,9 +39,9 @@ local M = {}
-- program information
M.prog_name = 'llmk'
-M.version = '1.1.0'
-M.copyright = 'Copyright 2018-2021'
-M.author = 'Takuto ASAKURA (wtsnjp)'
+M.version = '1.2.0'
+M.copyright = 'Copyright 2018-2023'
+M.author = 'Takuto Asakura (wtsnjp)'
M.llmk_toml = 'llmk.toml'
-- exit codes
@@ -67,9 +67,11 @@ M.top_level_spec = {
latex = {'string', 'lualatex'},
llmk_version = {'string', nil},
makeindex = {'string', 'makeindex'},
+ makeglossaries = {'string', 'makeglossaries'},
max_repeat = {'integer', 5},
+ output_directory = {'string', nil},
ps2pdf = {'string', 'ps2pdf'},
- sequence = {'[string]', {'latex', 'bibtex', 'makeindex', 'dvipdf'}},
+ sequence = {'[string]', {'latex', 'bibtex', 'makeindex', 'makeglossaries', 'dvipdf'}},
source = {'*[string]', nil},
}
@@ -104,6 +106,7 @@ M.default_programs = {
'-interaction=nonstopmode',
'-file-line-error',
'-synctex=1',
+ '-output-directory="%o"',
},
aux_file = '%B.aux',
aux_empty_size = 9, -- "\\relax \n" is empty
@@ -113,6 +116,13 @@ M.default_programs = {
generated_target = true,
postprocess = 'latex',
},
+ makeglossaries = {
+ target = '%B.glo',
+ generated_target = true,
+ postprocess = 'latex',
+ opts = {'-d "%o"'},
+ args = {'%b.glo'}, -- "%B.glo" will result in an error
+ },
ps2pdf = {
target = '%B.ps',
generated_target = true,
@@ -180,19 +190,29 @@ function M.get_status(raw)
end
-- Replace config param to filename
-function M.replace_specifiers(str, source, target)
+function M.replace_specifiers(str, source, target, output_directory)
local tmp = '/' .. source
- local basename = tmp:match('^.*/(.*)%..*$')
+ local basename_match = tmp:match('^.*/(.*)%..*$')
str = str:gsub('%%S', source)
str = str:gsub('%%T', target)
- if basename then
- str = str:gsub('%%B', basename)
- else
- str = str:gsub('%%B', source)
+ local sub_basename = source
+ if basename_match then
+ sub_basename = basename_match
end
+ local sub_output_directory = '.'
+ local sub_output_directory_basename = sub_basename
+ if output_directory then
+ sub_output_directory = output_directory
+ sub_output_directory_basename = output_directory .. '/' .. sub_basename
+ end
+
+ str = str:gsub('%%b', sub_basename)
+ str = str:gsub('%%o', sub_output_directory)
+ str = str:gsub('%%B', sub_output_directory_basename)
+
return str
end
@@ -380,7 +400,7 @@ local function update_config(config, tab)
local config = merge_table(config, tab)
-- set essential program names from top-level
- local prg_names = {'latex', 'bibtex', 'makeindex', 'dvipdf', 'dvips', 'ps2pdf'}
+ local prg_names = {'latex', 'bibtex', 'makeindex', 'makeglossaries', 'dvipdf', 'dvips', 'ps2pdf'}
for _, name in pairs(prg_names) do
config = fetch_from_top_level(config, name)
end
@@ -998,7 +1018,7 @@ local function setup_programs(fn, config)
cur_target = fn
else
-- here, %T should be replaced by `fn`
- cur_target = llmk.util.replace_specifiers(prog.target, fn, fn)
+ cur_target = llmk.util.replace_specifiers(prog.target, fn, fn, config.output_directory)
end
prog.target = cur_target
@@ -1018,11 +1038,11 @@ local function setup_programs(fn, config)
if type(prog[k]) == 'table' then
for ik, iv in ipairs(prog[k]) do
if type(prog[k][ik]) == 'string' then
- prog[k][ik] = llmk.util.replace_specifiers(iv, fn, cur_target)
+ prog[k][ik] = llmk.util.replace_specifiers(iv, fn, cur_target, config.output_directory)
end
end
elseif type(prog[k]) == 'string' then
- prog[k] = llmk.util.replace_specifiers(prog[k], fn, cur_target)
+ prog[k] = llmk.util.replace_specifiers(prog[k], fn, cur_target, config.output_directory)
end
end
end
@@ -1087,7 +1107,7 @@ local function init_file_database(programs, fn, config)
return fdb
end
-local function construct_cmd(prog, fn, target)
+local function construct_cmd(prog)
-- construct the option
local cmd_opt = ''
@@ -1213,7 +1233,7 @@ local function run_program(name, prog, fn, fdb, postprocess)
-- does target exist?
if not llmk.core.dry_run and not lfs.isfile(prog.target) then
llmk.util.dbg_print('run',
- 'Skiping "%s" because target (%s) does not exist',
+ 'Skipping "%s" because target (%s) does not exist',
prog.command, prog.target)
return false
end
@@ -1225,7 +1245,7 @@ local function run_program(name, prog, fn, fdb, postprocess)
prog.target)
elseif file_mtime(prog.target) < start_time then
llmk.util.dbg_print('run',
- 'Skiping "%s" because target (%s) is not updated',
+ 'Skipping "%s" because target (%s) is not updated',
prog.command, prog.target)
return false
end
@@ -1235,7 +1255,7 @@ local function run_program(name, prog, fn, fdb, postprocess)
end
end
- local cmd = construct_cmd(prog, fn, prog.target)
+ local cmd = construct_cmd(prog)
if llmk.core.dry_run then
print('Dry running: ' .. cmd)
if #cond > 0 then
@@ -1306,6 +1326,11 @@ function M.run_sequence(fn, config)
llmk.util.dbg_print('fdb', 'The initial file database is as follows:')
llmk.util.dbg_print_table('fdb', fdb)
+ -- check if output directory exists
+ if config.output_directory and not lfs.isdir(config.output_directory) then
+ llmk.util.err_print('error', 'Output directory does not exist "%s"', config.output_directory)
+ end
+
for _, name in ipairs(config.sequence) do
llmk.util.dbg_print('run', 'Preparing for program "%s"', name)
process_program(programs, name, fn, fdb, config)
@@ -1336,9 +1361,9 @@ local function remove(fn)
end
end
-local function replace_spec_and_remove_files(fns, source)
+local function replace_spec_and_remove_files(fns, source, output_directory)
for _, fn in ipairs(fns) do
- local replaced_fn = llmk.util.replace_specifiers(fn, source, source)
+ local replaced_fn = llmk.util.replace_specifiers(fn, source, source, output_directory)
if lfs.isfile(replaced_fn) then
remove(replaced_fn)
end
@@ -1348,16 +1373,16 @@ end
-- the actual process for the --clean action
function M.clean(fn, config)
llmk.util.err_print('info', 'Begining cleaning for "%s"', fn)
- replace_spec_and_remove_files(config.clean_files, fn)
- replace_spec_and_remove_files(config.extra_clean_files, fn)
+ replace_spec_and_remove_files(config.clean_files, fn, config.output_directory)
+ replace_spec_and_remove_files(config.extra_clean_files, fn, config.output_directory)
end
-- the actual process for the --clobber action
function M.clobber(fn, config)
llmk.util.err_print('info', 'Begining clobbering for "%s"', fn)
- replace_spec_and_remove_files(config.clean_files, fn)
- replace_spec_and_remove_files(config.extra_clean_files, fn)
- replace_spec_and_remove_files(config.clobber_files, fn)
+ replace_spec_and_remove_files(config.clean_files, fn, config.output_directory)
+ replace_spec_and_remove_files(config.extra_clean_files, fn, config.output_directory)
+ replace_spec_and_remove_files(config.clobber_files, fn, config.output_directory)
end
llmk.cleaner = M
@@ -1460,7 +1485,7 @@ local function read_options()
elseif (curr_arg == '-V') or (curr_arg == '--version') then
return 'version' -- immediately show version
elseif (curr_arg == '-c') or (curr_arg == '--clean') then
- action = 'clean'
+ action = 'clean'
elseif (curr_arg == '-C') or (curr_arg == '--clobber') then
action = 'clobber'
-- debug
diff --git a/support/light-latex-make/llmk.pdf b/support/light-latex-make/llmk.pdf
index 6693d671be..c3b1c07c4e 100644
--- a/support/light-latex-make/llmk.pdf
+++ b/support/light-latex-make/llmk.pdf
Binary files differ
diff --git a/support/light-latex-make/llmk.tex b/support/light-latex-make/llmk.tex
index 61673f016e..2884d211a1 100644
--- a/support/light-latex-make/llmk.tex
+++ b/support/light-latex-make/llmk.tex
@@ -1,8 +1,8 @@
% llmk: the reference manual
-% Copyright 2020 Takuto ASAKURA (wtsnjp)
+% Copyright 2020-2023 Takuto Asakura (wtsnjp)
% +++
-% latex = "xelatex"
+% latex = "texfot xelatex"
% +++
\documentclass{llmk-doc}
@@ -10,7 +10,7 @@
\title{llmk: Light {\LaTeX} Make}
\author{Takuto Asakura (wtsnjp)}
\subtitle{Reference Manual}
-\date{v1.1.0\quad\today}
+\date{v1.2.0\quad\today}
\keywords{llmk, build-tool, toml, lua, luatex}
\begin{document}
@@ -220,9 +220,9 @@ programs that failed, if any, are reported in the error messages.
\begin{tabular}{rp{12em}rp{12em}}
\toprule
Code & Error type & Code & Error Type \\ \midrule
-\code{0} & Success & \code{3} & Parser Error \\
-\code{1} & General Error & \code{4} & Type Error \\
-\code{2} & Invoked program failed & \\
+\code{0} & Success & \code{3} & Parser error \\
+\code{1} & General error & \code{4} & Type error \\
+\code{2} & Error in invoked program & \\
\bottomrule
\end{tabular}
\end{center}
@@ -249,7 +249,7 @@ keys (Section~\ref{sec:top-level-keys}~\&~\ref{sec:keys-in-programs}) are
supported.
\begin{center}
-\newcommand{\ok}{{\color{special}\checkmark}}
+\newcommand{\ok}{{\color{special}\usym{1F5F8}}}
\begin{tabular}{llc}
\toprule
Type & Example & Supported \\ \midrule
@@ -368,8 +368,12 @@ executing actions by \prog{llmk}:
argument or as an element of the \ckey{source} array.
\item |%T|
is replaced by the target for each program.
-\item |%B|
+\item |%o|
+ is replaced by the output directory, or \code{.} if none was specified.
+\item |%b|
is replaced by the basename of |%S|.
+\item |%B|
+ is replaced by the output directory concatenated with the basename of |%S|.
\end{itemize}
Some keys have default values; the default configuration of \prog{llmk} should
@@ -462,6 +466,13 @@ the \ckey{command} key is specified in the \ckey{programs} table, this alias is
ineffective.
\end{confkey}
+\begin{confkey}{makeglossaries}{type: \type{string}}[default: \code{"makeglossaries"}]
+The command to use for the \progname{makeglossaries} program. Internally, this key
+is an alias for the \ckey{command} key in the \progname{makeglossaries} entry. If
+the \ckey{command} key is specified in the \ckey{programs} table, this alias is
+ineffective.
+\end{confkey}
+
\begin{confkey}{max\_repeat}{type: \type{integer}}[default: \code{5}]
You can specify the maximum number of execution repetitions for each command in
your \ckey{sequence}. When processing your \ckey{sequence}, \prog{llmk} repeats
@@ -470,6 +481,10 @@ the key is specified and the corresponding auxiliary file exists. This key is to
prevent the potential infinite loop of repetition.
\end{confkey}
+\begin{confkey}{output\_directory}{type: \type{string}}
+Use this option to specify a directory where \progname{latex} output files should be written to and read from. This directory must already exist, or else \prog{llmk} will fail with an error. If the option is not specified, then output files will be written to the directory where \prog{llmk} is run from.
+\end{confkey}
+
\begin{confkey}{programs}{type: \type{table}}
[default: see Section~\ref{sec:default-programs}]
The table that contains the detailed configuration for each program. See
@@ -644,7 +659,12 @@ command is chosen for the default.
\begin{lstlisting}[style=toml]
[programs.latex]
command = "lualatex"
-opts = ["-interaction=nonstopmode", "-file-line-error", "-synctex=1"]
+opts = [
+ "-interaction=nonstopmode",
+ "-file-line-error",
+ "-synctex=1",
+ '-output-directory="%o"'
+]
aux_file = "%B.aux"
aux_empty_size = 9
\end{lstlisting}
@@ -661,6 +681,20 @@ generated_target = true
postprocess = "latex"
\end{lstlisting}
+\Program{makeglossaries} The entry for the Makeglossaries program and friends. The
+\progname{latex} program is set as \ckey{postprocess} so that to make sure
+rerunning {\LaTeX} command after this execution.
+%
+\begin{lstlisting}[style=toml]
+[programs.makeglossaries]
+command = "makeglossaries"
+target = "%B.glo"
+generated_target = true
+postprocess = "latex"
+opts = ['-d "%o"']
+args = ["%b.glo"]
+\end{lstlisting}
+
\Program{ps2pdf} The entry for the \prog{ps2pdf} program and friends.
%
\begin{lstlisting}[style=toml]
@@ -676,7 +710,7 @@ generated_target = true
The following is the default value for the \ckey{sequence} array:
%
\begin{htcode}
-["latex", "bibtex", "makeindex", "dvipdf"]
+["latex", "bibtex", "makeindex", "makeglossaries", "dvipdf"]
\end{htcode}
With these default settings in the \ckey{programs} table the \ckey{sequence}
@@ -691,9 +725,10 @@ array, the default behavior of \prog{llmk} can be summarized as follows.
\code{\%B.bib}, exists, the {\BibTeX} program is executed. When the execution
occurs, the \progname{latex} program is executed again right after because
the program is set as \ckey{postprocess}.
-\item Identically, if the corresponding input file for Makeindex exists, the
- program is executed. When the execution occurs, the \progname{latex} program
- is executed again right after because the program is set as \ckey{postprocess}.
+\item Identically, if the corresponding input files for Makeindex and
+ Makeglossaries exist, the program is executed. When the execution occurs,
+ the \progname{latex} program is executed again right after because the
+ program is set as \ckey{postprocess}.
\item In case the corresponding DVI file is generated in the previous steps,
though this will not happen with the default value of \ckey{latex}, \ie
\code{"lualatex"}, the \progname{dvipdf} program, by default \code{dvipdfmx},
@@ -705,9 +740,11 @@ easier to use other tools from the above. For instance, if you wan to use
$\text{\progname{dvips}}+\text{\progname{ps2pdf}}$ combination instead of
\progname{dvipdf}, you can just modify the value of \ckey{sequence} a bit:
%
-\begin{lstlisting}[style=toml]
-sequence = ["latex", "bibtex", "makeindex", "dvips", "ps2pdf"]
-\end{lstlisting}
+\begin{htcode}
+sequence = [
+ "latex", "bibtex", "makeindex", "makeglossaries", "dvips", "ps2pdf"
+]
+\end{htcode}
\section{Other supported formats}
\label{sec:magic-comment}