wtsnjp / llmk Goto Github PK
View Code? Open in Web Editor NEWLight LaTeX Make
Home Page: https://ctan.org/pkg/llmk
License: MIT License
Light LaTeX Make
Home Page: https://ctan.org/pkg/llmk
License: MIT License
Dear Maintainer!
How to use bib2gls with the llmk program, with options, just like for the arara program (sequence), eg.:
% arara: lualatex: { shell: yes, synctex: yes }
% arara: bib2gls: { group: on , recordcount: on , breakspace: on }
% arara: lualatex: { shell: yes, synctex: yes }
% arara: bib2gls: { group: on , recordcount: on , breakspace: on }
% arara: lualatex: { shell: yes, synctex: yes }
% arara: biber
% arara: lualatex: { shell: yes, synctex: yes }
% arara: lualatex: { shell: yes, synctex: yes }
Is this possible? If so, it might be worth adding to the manual - as an example.
Regards
M.
Hello.
It could be very useful to have the possibility to work with the glob syntax for the value of sequence
.
What do you think about this?
examples
ディレクトリの dvips.tex
について,
$ texlua llmk.lua dvips.tex
を実行してみると,platex
→ dvips
→ ps2pdf
の後にさらに dvipdfmx
の起動がなされているようで,最終的に仕上がった PDF は dvipdfmx 製ということになっている模様です。
Hello,
I’m pretty excited about llmk
, which looks really promising. Thanks for setting that up!
I think the language in the documentation is more confusing that it needs to be when it comes to program names. When reading…
\begin{confkey}{bibtex}{type: \type{string}}[default: \code{"bibtex"}]
The command to use for the \progname{bibtex} program. Internally, this key is
an alias for the \ckey{command} key in the \progname{bibtex} entry. If the
\ckey{command} key is specified in the \ckey{programs} table, this alias is
ineffective.
\end{confkey}
…it’s really not clear at first that this key can be used to select biber
as the reference management engine. Looking further down…
\Program{bibtex} The entry for the {\BibTeX} 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.bibtex]
command = "bibtex"
target = "%B.bib"
args = ["%B"]
postprocess = "latex"
\end{lstlisting}
…there's this mysterious expression "and friends", but its meaning is not particularly transparent.
In fact, the only passage where the fact that biber
can be used there is apparent is talking about something else entirely (TeXShop directives):
The \meta{command} part will be passed to the \ckey{bibtex} key of \prog{llmk}.
For both of the two directives, only the topmost ones are effective; the others
will be ignored. For example, the following two configuration are equivalent:\\
%
\begin{minipage}[t]{.5\textwidth}
\begin{lstlisting}[style=latex]
% !TEX TS-program = xelatex
% !BIB TS-program = biber
\documentclass{article}
\end{lstlisting}
\end{minipage}
\begin{minipage}[t]{.49\textwidth}
\begin{lstlisting}[style=latex]
% +++
% latex = "xelatex"
% bibtex = "biber"
% +++
\documentclass{article}
\end{lstlisting}
\end{minipage}
I think there are two ways to approach this, one light and one which sort of break things.
Things would be much better if the bibtex
key came with examples. The above passages could be augmented in the following manner:
\begin{confkey}{bibtex}{type: \type{string}}[default: \code{"bibtex"}]
The command to use for the \progname{bibtex}-like program, such as
\code{"bibtex"} or \code{"biber"}. Internally, this key is
an alias for the \ckey{command} key in the \progname{bibtex} entry. If the
\ckey{command} key is specified in the \ckey{programs} table, this alias is
ineffective.
\end{confkey}
\Program{bibtex} The entry for the {\BibTeX} program and friends like
\code{"biber"}. 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.bibtex]
command = "bibtex"
target = "%B.bib"
args = ["%B"]
postprocess = "latex"
\end{lstlisting}
I have not read the documentation in depth, but I suspect the latex
key would benefit from the same treatment, although it is easier to understand what it does due to using lualatex
as the default value.
What I think the above points at is that bibtex
doesn't describe what the key does very well, since its real meaning is something like "the program you use to produce a .bbl
file". I’m not really sure what this says, or if there’s an obviously best response to this problem.
If starting from scratch was an option, I’d probably try to argue that a name like bibengine
is more descriptive and does not bind the key to a specific technology – and that similarly we could use latexengine
and indexengine
in place of latex
and makeindex
. Maybe a system of alias keys could be used to achieve the same thing, but I’m not really sure how much it would be worth the trouble or if the format allows for that sort of thing.
Anyhow, this is really me throwing out my raw feelings and should not be taken too strongly. This is a really nice project.
When .bib has different basename from .tex, bibtex does not run.
TeX distribution : TeX Live 2020/Arch Linux
llmk : master (916c6bd) (llmk.lua
is symlinked as llmk
.)
Here is a small example.
test.tex
% +++
% sequence = ["latex", "bibtex", "dvipdf"]
% latex = "uplatex"
% bibtex = "bibtex"
% dvipdf = "dvipdfmx"
% +++
\documentclass[dvipdfmx,uplatex,a4j]{jsarticle}
\begin{document}
citation\cite{knuth1997art}
\bibliographystyle{abbrv}
\bibliography{testref}
\end{document}
testref.bib
is located in the same directory.
$ llmk -sv test.tex
llmk info: Beginning a sequence for "test.tex"
llmk info: Running command: uplatex -interaction=nonstopmode -file-line-error -synctex=1 "test.tex"
llmk info: Running command: uplatex -interaction=nonstopmode -file-line-error -synctex=1 "test.tex"
llmk info: Running command: dvipdfmx "test.dvi"
bibtex
doesn't run.
bibtex
processes .aux and produces .bbl, so the default value of programs.bibtex.target
should be %B.aux
.
(Currently the default value is set as %B.bib
in this line : https://github.com/wtsnjp/llmk/blob/916c6bd/llmk.lua#L90 )
For your information, if programs.bibtex.target
is set manually like this, then it works.
test2.tex
% +++
% sequence = ["latex", "bibtex", "dvipdf"]
% latex = "uplatex"
% dvipdf = "dvipdfmx"
%
% [programs.bibtex]
% command = "bibtex"
% target = "%B.aux"
% +++
% -- (snip : same as test.tex) --
testref.bib
is located in the same directory.
$ llmk -sv test2.tex
llmk info: Beginning a sequence for "test2.tex"
llmk info: Running command: uplatex -interaction=nonstopmode -file-line-error -synctex=1 "test2.tex"
llmk info: Running command: uplatex -interaction=nonstopmode -file-line-error -synctex=1 "test2.tex"
llmk info: Running command: bibtex "test2"
llmk info: Running command: uplatex -interaction=nonstopmode -file-line-error -synctex=1 "test2.tex"
llmk info: Running command: uplatex -interaction=nonstopmode -file-line-error -synctex=1 "test2.tex"
llmk info: Running command: dvipdfmx "test2.dvi"
bibtex
runs correctly.
I usually use only bibtex
and upbibtex
so I'm not sure about other environments...
but I think other bibtex
-like programs also expect .aux files.
First of all, congratulations for this project: it's very simple and "user oriented". But it may not be very efficient.
For example, in case of sequence = [”latex”, ”bibtex”]
, the automatic mechanism of the execution repeated (via .aux
file check) is useful only after the bibtex
postprocess (and not after the first latex
execution).
All this means more executions than necessary.
What do you think?
Matteo
最新のmaster (94bb391
)でllmkを走らせると,
/usr/local/bin/llmk:490: bad argument #1 to 'pairs' (table expected, got string)
というエラーを吐いて動いてくれませんでした.
どのコミットから失敗するのか二分探索したところ,
4bd1b9a
までは成功し, 6e2c5ac
から失敗しているようです.
Luaが分からず,git diff
してみてもいまいち分からなかったのですが,
報告させてもらいます.
実行したLaTeXファイルのllmk用コードは以下の通りです.
(もう古い書き方なのかもしれませんが)
%+++
% sequence = ["latex", "latex", "latex", "dvipdf"]
%
% [programs.latex]
% command = "platex"
% opts = "-halt-on-error"
% args = "%T"
%
% [programs.dvipdf]
% command = "dvipdfmx"
% args = "%B.dvi"
%
%+++
最初のissueでルールが分からず,横着して日本語で書いてしまいましたが,
英語の方が良かったでしょうか?そちらの方が良ければ後で時間があるときに英訳します.
According to https://tex.stackexchange.com/a/78352/9075, !TeX program
is also understood by TeXShop. I have it in use in many documents, e.g., in my template for scientific theses (https://github.com/latextemplates/scientific-thesis-template/blob/main/main-english.tex).
Would it be possible to add support for !TeX program
in addition to !TeX TS-program
?
% !TeX spellcheck = de-DE
% !TeX encoding = utf8
% !TeX program = pdflatex
% !BIB program = bibtex
% -*- coding:utf-8 mod:LaTeX -*-
latexmk has options -c
and -C
to remove temporary files like ".aux" generated with latex
and other tools' command. Now, llmk can set custom command to remove these. But I think llmk should to be able to use it initially because it is used fequently.
If llmk.toml does not have a newline at end of file, llmk command will not work (and no output).
Could you make some message that llmk.toml requires a newline at end of file, or repair the behavior?
I know there are some tools which handle files strict on the POSIX definition, but most users don't know this manners.
I have tested this case in Windows, using command-prompt and Git Bash (from "Git for Windows").
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.