summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xBuild/source/texk/texlive/linked_scripts/light-latex-make/llmk.lua45
-rw-r--r--Master/texmf-dist/doc/man/man1/llmk.14
-rw-r--r--Master/texmf-dist/doc/man/man1/llmk.man1.pdfbin22160 -> 23766 bytes
-rw-r--r--Master/texmf-dist/doc/support/light-latex-make/LICENSE2
-rw-r--r--Master/texmf-dist/doc/support/light-latex-make/README.md51
-rw-r--r--Master/texmf-dist/doc/support/light-latex-make/llmk.pdfbin93443 -> 99340 bytes
-rw-r--r--Master/texmf-dist/doc/support/light-latex-make/llmk.tex33
-rwxr-xr-xMaster/texmf-dist/scripts/light-latex-make/llmk.lua45
8 files changed, 117 insertions, 63 deletions
diff --git a/Build/source/texk/texlive/linked_scripts/light-latex-make/llmk.lua b/Build/source/texk/texlive/linked_scripts/light-latex-make/llmk.lua
index 949418e751b..623f45099ef 100755
--- a/Build/source/texk/texlive/linked_scripts/light-latex-make/llmk.lua
+++ b/Build/source/texk/texlive/linked_scripts/light-latex-make/llmk.lua
@@ -3,7 +3,7 @@
--
-- This is file `llmk.lua'.
--
--- Copyright 2018-2020 Takuto ASAKURA (wtsnjp)
+-- Copyright 2018-2021 Takuto ASAKURA (wtsnjp)
-- GitHub: https://github.com/wtsnjp
-- Twitter: @wtsnjp
--
@@ -39,8 +39,8 @@ local M = {}
-- program information
M.prog_name = 'llmk'
-M.version = '0.2.0'
-M.copyright = 'Copyright 2018-2020'
+M.version = '1.0.0'
+M.copyright = 'Copyright 2018-2021'
M.author = 'Takuto ASAKURA (wtsnjp)'
M.llmk_toml = 'llmk.toml'
@@ -57,11 +57,13 @@ M.top_level_spec = {
bibtex = {'string', 'bibtex'},
clean_files = {'[string]', {
'%B.aux', '%B.bbl', '%B.bcf', '%B-blx.bib', '%B.blg', '%B.fls',
- '%B.idx', '%B.ilg', '%B.log', '%B.out', '%B.run.xml', '%B.toc'
+ '%B.idx', '%B.ilg', '%B.ind', '%B.log', '%B.nav', '%B.out',
+ '%B.run.xml', '%B.snm', '%B.toc', '%B.vrb',
}},
clobber_files = {'[string]', {'%B.dvi', '%B.pdf', '%B.ps', '%B.synctex.gz'}},
dvipdf = {'string', 'dvipdfmx'},
dvips = {'string', 'dvips'},
+ extra_clean_files = {'[string]', {}},
latex = {'string', 'lualatex'},
llmk_version = {'string', nil},
makeindex = {'string', 'makeindex'},
@@ -169,9 +171,13 @@ function M.dbg_print_table(dbg_type, table)
helper(table, 2)
end
--- return the filename if exits, even if the ".tex" extension is omitted
--- otherwise return nil
-local lfs = require("lfs")
+function M.get_status(raw)
+ if os.type == 'windows' then
+ return raw
+ else
+ return raw / 256
+ end
+end
-- Replace config param to filename
function M.replace_specifiers(str, source, target)
@@ -303,6 +309,13 @@ local function version_check(given_version)
major, minor, given_major, given_minor)
end
+ -- warn if the given mojor version is older than this program
+ if given_major < major then
+ llmk.util.err_print('warning',
+ 'The specified llmk_version (v%d.%d) is older than this program (v%d.%d)',
+ given_major, given_minor, major, minor)
+ end
+
-- Note: no breaking change has been made (yet)
end
@@ -848,7 +861,13 @@ function M.get_toml(fn)
end
else
if toml_field then
- toml = toml .. string.match(l, '^%s*%%%s*(.-)%s*$') .. '\n'
+ local match = string.match(l, '^%s*%%%s*(.-)%s*$')
+ if match == nil then
+ llmk.util.err_print('error', 'Encounter invalid line in TOML field')
+ os.exit(llmk.const.exit_error)
+ else
+ toml = toml .. match .. '\n'
+ end
end
end
@@ -1232,10 +1251,12 @@ local function run_program(name, prog, fn, fdb, postprocess)
end
-- call and check the status
- local status = os.execute(cmd)
- if status > 0 then
+ -- Note: os.execute() returns values 256 multiples of actual status
+ -- except on Windows
+ local cmd_status = llmk.util.get_status(os.execute(cmd))
+ if cmd_status > 0 then
llmk.util.err_print('error',
- 'Fail running %s (exit code: %d)', cmd, status)
+ 'Fail running %s (exit code: %d)', cmd, cmd_status)
os.exit(llmk.const.exit_failure)
end
@@ -1327,12 +1348,14 @@ end
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)
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)
end
diff --git a/Master/texmf-dist/doc/man/man1/llmk.1 b/Master/texmf-dist/doc/man/man1/llmk.1
index 1f284f5de98..3f1b06ff458 100644
--- a/Master/texmf-dist/doc/man/man1/llmk.1
+++ b/Master/texmf-dist/doc/man/man1/llmk.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "LLMK" "1" "October 2020" "llmk 0.2.0" "llmk manual"
+.TH "LLMK" "1" "August 2021" "llmk 1.0.0" "llmk manual"
.
.SH "NAME"
\fBllmk\fR \- Light LaTeX Make
@@ -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\-2020 Takuto ASAKURA (wtsnjp)\.
+Copyright 2018\-2021 Takuto ASAKURA (wtsnjp)\.
.
.br
License: The MIT License \fIhttps://opensource\.org/licenses/mit\-license\fR\.
diff --git a/Master/texmf-dist/doc/man/man1/llmk.man1.pdf b/Master/texmf-dist/doc/man/man1/llmk.man1.pdf
index 8e79d3a1b8d..5533c8c5f77 100644
--- a/Master/texmf-dist/doc/man/man1/llmk.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/llmk.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/support/light-latex-make/LICENSE b/Master/texmf-dist/doc/support/light-latex-make/LICENSE
index d8cb193881b..bcd5768aa01 100644
--- a/Master/texmf-dist/doc/support/light-latex-make/LICENSE
+++ b/Master/texmf-dist/doc/support/light-latex-make/LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)
-Copyright 2018-2020 Takuto ASAKURA (wtsnjp)
+Copyright 2018-2021 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/Master/texmf-dist/doc/support/light-latex-make/README.md b/Master/texmf-dist/doc/support/light-latex-make/README.md
index b7d7d0f0ca4..1ff40ffc219 100644
--- a/Master/texmf-dist/doc/support/light-latex-make/README.md
+++ b/Master/texmf-dist/doc/support/light-latex-make/README.md
@@ -1,7 +1,7 @@
![llmk: The Light LaTeX Make](./llmk-logo.png)
-[![Build Status](https://travis-ci.org/wtsnjp/llmk.svg?branch=master)](https://travis-ci.org/wtsnjp/llmk)
-[![Build status](https://ci.appveyor.com/api/projects/status/1papc7m85kl9iph1?svg=true)](https://ci.appveyor.com/project/wtsnjp/llmk)
+[![CI](https://github.com/wtsnjp/llmk/actions/workflows/ci.yml/badge.svg)](https://github.com/wtsnjp/llmk/actions/workflows/ci.yml)
+[![CTAN](https://img.shields.io/ctan/v/light-latex-make?color=FC02FF&label=CTAN)](https://www.ctan.org/pkg/light-latex-make)
This is yet another build tool for LaTeX documents. The features of **llmk** are:
@@ -14,7 +14,7 @@ See the bundled reference manual ([llmk.pdf](http://mirrors.ctan.org/support/lig
## Installation
-This software is included in [TeX Live](https://www.tug.org/texlive/) as Package `light-latex-make`. If you are using the latest TeX Live, you normally don't need to install it by yourself (please use the `tlmgr` command to install it, if the package is missing).
+This software is included in [TeX Live](https://www.tug.org/texlive/) and [MiKTeX](https://miktex.org/) as Package `light-latex-make`. If you are using one of the latest distributions, you normally don't need to install it by yourself (for TeX Live, please use the `tlmgr` command to install it, if the package is missing).
In case the package is not installed in your TeX system or you want to use the latest (development) version of the program, you have to install it manually. You can acquire any material related to this software from [our GitHub repository](https://github.com/wtsnjp/llmk). The installation procedure is very simple anyway because the `llmk.lua` is the standalone executable. Running `texlua <path>/llmk.lua` should work in any case. In UNIX-like systems, the easiest way to install the program is copy or symlink the file `llmk.lua` as `llmk` in any place in the `PATH`.
@@ -49,23 +49,6 @@ will produce a PDF document (`hello.pdf`) with XeLaTeX, since it is specified in
You can find other example LaTeX document files in the [examples](https://github.com/wtsnjp/llmk/tree/master/examples) directory.
-### Action Clean/Clobber
-
-Similar to [latexmk](http://personal.psu.edu/jcc8/software/latexmk/), Actions `--clean` (`-c`) and `--clobber` (`-C`) are available.
-
-* The `--clean` action removes temporary files such as `*.aux` and `*.log`.
-* The `--clobber` action removes all generated files including final PDFs.
-
-Specifically,
-
-```
-$ llmk --clean FILE...
-```
-
-removes files generated by the specified `FILE`s. Files removed by these actions can be customized.
-
-## Advanced Usage
-
### Using llmk.toml
Alternatively, you can write your build settings in an independent file named `llmk.toml` (this file name is fixed).
@@ -123,6 +106,23 @@ is equivalent to:
Note that this magic comment is effective **only on the first line** of a LaTeX source file. Note also that if a TOML field exist in the file, the TOML field has higher priority and all the other magic comments will be ignored.
+### Action Clean/Clobber
+
+Similar to [latexmk](http://personal.psu.edu/jcc8/software/latexmk/), Actions `--clean` (`-c`) and `--clobber` (`-C`) are available.
+
+* The `--clean` action removes temporary files such as `*.aux` and `*.log`.
+* The `--clobber` action removes all generated files including final PDFs.
+
+Specifically,
+
+```
+$ 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 case, the files to remove by these actions can be customized (see the reference manual for the details).
+
+## Advanced Usage
+
### Custom compile sequence
You can setup custom sequence for processing LaTeX documents; use `sequence` key to specify the order of programs to process the documents and specify the detailed settings for each program.
@@ -162,21 +162,22 @@ This way is a bit complicated but strong enough allowing you to use any kind of
The following is the list of available TOML keys in llmk. See the reference manual for the details.
* `bibtex` (type: *string*, default: `"bibtex"`)
-* `clean_files` (type: *string* or *array of strings*, default: `["%B.aux", "%B.log", "%B.toc", "%B.out", "%B.bbl", "%B.bcf", "%B.blg", "%B-blx.bib", "%B.idx", "%B.ilg", "%B.fls", "%B.run.xml"]`)
+* `clean_files` (type: *string* or *array of strings*, default: `["%B.aux", "%B.bbl", "%B.bcf", "%B-blx.bib", "%B.blg", "%B.fls", "%B.idx", "%B.ilg", "%B.ind", "%B.log", "%B.nav", "%B.out", "%B.run.xml", "%B.snm", "%B.toc", "%B.vrb"]`)
* `clobber_files` (type: *string* or *array of strings*, default: `["%B.pdf", "%B.dvi", "%B.ps", "%B.synctex.gz"]`)
* `dvipdf` (type: *string*, default: `"dvipdfmx"`)
* `dvips` (type: *string*, default: `"dvips"`)
+* `extra_clean_files` (type: *string* or *array of strings*, default: `[]`)
* `latex` (type: *string*, default: `"lualatex"`)
* `llmk_version` (type: *string*)
* `makeindex` (type: *string*, default: `"makeindex"`)
-* `max_repeat` (type: *integer*, default: 5)
+* `max_repeat` (type: *integer*, default: `5`)
* `programs` (type: *table*)
* \<program name\>
* `args` (type: *string* or *array of strings*, default: `["%T"]`)
* `aux_file` (type: *string*)
* `aux_empty_size` (type: *integer*)
* `command` (type: *string*, **required**)
- * `generated_target` (type: *boolean*, default: false)
+ * `generated_target` (type: *boolean*, default: `false`)
* `opts` (type: *string* or *array of strings*)
* `postprocess` (type: *string*)
* `target` (type: *string*, default: `"%S"`)
@@ -227,7 +228,7 @@ generated_target = true
* [Reference manual](http://mirrors.ctan.org/support/light-latex-make/llmk.pdf): it describes the full specification.
* [Talk in TUG 2020](https://www.youtube.com/watch?v=kzqlNHKmzBo): the author talked about the design concept with a demonstration.
-* [TUGboat article](https://tug.org/members/TUGboat/tb41-2/tb128asakura-llmk.pdf): the post-proceedings of the above talk. (currently TUG member access only)
+* [TUGboat article](https://www.tug.org/TUGboat/tb41-2/tb128asakura-llmk.pdf): the post-proceedings of the above talk.
## Acknowledgements
@@ -235,7 +236,7 @@ This project has been supported by the [TeX Development Fund](https://www.tug.or
## License
-Copyright 2018-2020 Takuto ASAKURA ([wtsnjp](https://twitter.com/wtsnjp))
+Copyright 2018-2021 Takuto ASAKURA ([wtsnjp](https://twitter.com/wtsnjp))
This software is licensed under [the MIT license](./LICENSE).
diff --git a/Master/texmf-dist/doc/support/light-latex-make/llmk.pdf b/Master/texmf-dist/doc/support/light-latex-make/llmk.pdf
index d74d3d42117..596127da866 100644
--- a/Master/texmf-dist/doc/support/light-latex-make/llmk.pdf
+++ b/Master/texmf-dist/doc/support/light-latex-make/llmk.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/support/light-latex-make/llmk.tex b/Master/texmf-dist/doc/support/light-latex-make/llmk.tex
index 7f145a371e0..f6437172155 100644
--- a/Master/texmf-dist/doc/support/light-latex-make/llmk.tex
+++ b/Master/texmf-dist/doc/support/light-latex-make/llmk.tex
@@ -10,7 +10,7 @@
\title{llmk: Light {\LaTeX} Make}
\author{Takuto Asakura (wtsnjp)}
\subtitle{Reference Manual}
-\date{v0.2.0\quad\today}
+\date{v1.0.0\quad\today}
\keywords{llmk, build-tool, toml, lua, luatex}
\begin{document}
@@ -38,11 +38,10 @@ in any {\TeX} environment with the program.
\subsection{Installation}
-This software is included in {\TeX} Live as Package \code{light-latex-make}. If
-you have the latest {\TeX} Live, you normally don't need to install it by
-yourself. If you want to install the development version, please refer to our
-{\README}.
-% TODO: mention MiKTeX when ready
+This software is included in {\TeX} Live and MiK{\TeX} as Package
+\code{light-latex-make}. If you have one of the latest distributions, you
+normally don't need to install it by yourself. If you want to install the
+development version, please refer to our {\README}.
\subsection{Learning \prog{llmk}}
@@ -84,11 +83,10 @@ repository:
If you do not want to use GitHub for some reasons, it is also fine to directly
send an email to the author (\email{tkt.asakura@gmail.com}).
-The \prog{llmk} program is currently version \code{0.x} and still growing in
-any aspect. At this moment, requests for new features are also welcome; the
-author cannot promise to implement the requested features, but will happy to
-take them into account. Before making a request, it is strongly recommended to
-read the article about the design concept~\cite{asakura2020}.
+Requests for new features are also welcome; the author cannot promise to
+implement the requested features, but will happy to take them into account.
+Before making a request, it is strongly recommended to read the article about
+the design concept~\cite{asakura2020}.
\section{Command-line interface}
@@ -158,7 +156,8 @@ option in the latter position wins over the former one.
\begin{clopt}{\sopt{c}, \lopt{clean}}
Removes temporary files such as \code{aux} and \code{log} files. The files
-removed with this action can be customized with the key \ckey{clean\_files}.
+removed with this action can be customized with keys \ckey{clean\_files} and
+\ckey{extra\_clean\_files}.
\end{clopt}
\begin{clopt}{\sopt{C}, \lopt{clobber}}
@@ -396,7 +395,8 @@ specifiers are available for this key. The default value is:
\begin{htcode}
[
"%B.aux", "%B.bbl", "%B.bcf", "%B-blx.bib", "%B.blg", "%B.fls",
- "%B.idx", "%B.ilg", "%B.log", "%B.out", "%B.run.xml", "%B.toc"
+ "%B.idx", "%B.ilg", "%B.ind", "%B.log", "%B.nav", "%B.out",
+ "%B.run.xml", "%B.snm", "%B.toc", "%B.vrb"
]
\end{htcode}
\end{confkey}
@@ -425,6 +425,13 @@ alias for the \ckey{command} key in the \progname{dvips} entry. If the
ineffective.
\end{confkey}
+\begin{confkey}{extra\_clean\_files}{type: \type{array of strings}}
+ [default: \code{[]}]
+Extra files to be removed with the cleaning action (\lopt{clean}). By using
+this key, you can easily add files to be removed on top of the default
+\ckey{clean\_files}.
+\end{confkey}
+
\begin{confkey}{latex}{type: \type{string}}[default: \code{"lualatex"}]
The command to use for the \progname{latex} program. Internally, this key is an
alias for the \ckey{command} key in the \progname{latex} entry. If the
diff --git a/Master/texmf-dist/scripts/light-latex-make/llmk.lua b/Master/texmf-dist/scripts/light-latex-make/llmk.lua
index 949418e751b..623f45099ef 100755
--- a/Master/texmf-dist/scripts/light-latex-make/llmk.lua
+++ b/Master/texmf-dist/scripts/light-latex-make/llmk.lua
@@ -3,7 +3,7 @@
--
-- This is file `llmk.lua'.
--
--- Copyright 2018-2020 Takuto ASAKURA (wtsnjp)
+-- Copyright 2018-2021 Takuto ASAKURA (wtsnjp)
-- GitHub: https://github.com/wtsnjp
-- Twitter: @wtsnjp
--
@@ -39,8 +39,8 @@ local M = {}
-- program information
M.prog_name = 'llmk'
-M.version = '0.2.0'
-M.copyright = 'Copyright 2018-2020'
+M.version = '1.0.0'
+M.copyright = 'Copyright 2018-2021'
M.author = 'Takuto ASAKURA (wtsnjp)'
M.llmk_toml = 'llmk.toml'
@@ -57,11 +57,13 @@ M.top_level_spec = {
bibtex = {'string', 'bibtex'},
clean_files = {'[string]', {
'%B.aux', '%B.bbl', '%B.bcf', '%B-blx.bib', '%B.blg', '%B.fls',
- '%B.idx', '%B.ilg', '%B.log', '%B.out', '%B.run.xml', '%B.toc'
+ '%B.idx', '%B.ilg', '%B.ind', '%B.log', '%B.nav', '%B.out',
+ '%B.run.xml', '%B.snm', '%B.toc', '%B.vrb',
}},
clobber_files = {'[string]', {'%B.dvi', '%B.pdf', '%B.ps', '%B.synctex.gz'}},
dvipdf = {'string', 'dvipdfmx'},
dvips = {'string', 'dvips'},
+ extra_clean_files = {'[string]', {}},
latex = {'string', 'lualatex'},
llmk_version = {'string', nil},
makeindex = {'string', 'makeindex'},
@@ -169,9 +171,13 @@ function M.dbg_print_table(dbg_type, table)
helper(table, 2)
end
--- return the filename if exits, even if the ".tex" extension is omitted
--- otherwise return nil
-local lfs = require("lfs")
+function M.get_status(raw)
+ if os.type == 'windows' then
+ return raw
+ else
+ return raw / 256
+ end
+end
-- Replace config param to filename
function M.replace_specifiers(str, source, target)
@@ -303,6 +309,13 @@ local function version_check(given_version)
major, minor, given_major, given_minor)
end
+ -- warn if the given mojor version is older than this program
+ if given_major < major then
+ llmk.util.err_print('warning',
+ 'The specified llmk_version (v%d.%d) is older than this program (v%d.%d)',
+ given_major, given_minor, major, minor)
+ end
+
-- Note: no breaking change has been made (yet)
end
@@ -848,7 +861,13 @@ function M.get_toml(fn)
end
else
if toml_field then
- toml = toml .. string.match(l, '^%s*%%%s*(.-)%s*$') .. '\n'
+ local match = string.match(l, '^%s*%%%s*(.-)%s*$')
+ if match == nil then
+ llmk.util.err_print('error', 'Encounter invalid line in TOML field')
+ os.exit(llmk.const.exit_error)
+ else
+ toml = toml .. match .. '\n'
+ end
end
end
@@ -1232,10 +1251,12 @@ local function run_program(name, prog, fn, fdb, postprocess)
end
-- call and check the status
- local status = os.execute(cmd)
- if status > 0 then
+ -- Note: os.execute() returns values 256 multiples of actual status
+ -- except on Windows
+ local cmd_status = llmk.util.get_status(os.execute(cmd))
+ if cmd_status > 0 then
llmk.util.err_print('error',
- 'Fail running %s (exit code: %d)', cmd, status)
+ 'Fail running %s (exit code: %d)', cmd, cmd_status)
os.exit(llmk.const.exit_failure)
end
@@ -1327,12 +1348,14 @@ end
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)
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)
end