summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Sotoudeh <masotoudeh@ucdavis.edu>2021-01-11 08:06:35 -0800
committerGitHub <noreply@github.com>2021-01-11 08:06:35 -0800
commitee3b251076279df9e93a3b05a515c91ba31646bd (patch)
tree9f12caaaf352e4d44f610472e66e76e446432cad
parenta7897766064a9a97630feef241d83fc29962f4cb (diff)
Update get_arxivable to use the new run_latex interface (#10)HEADmaster
This resolves some issues caused by a change in the arguments to `run_latex.py` that I didn't update the `get_arxivable` rules to work with.
-rw-r--r--latex.bzl8
-rw-r--r--run_latex.py2
2 files changed, 6 insertions, 4 deletions
diff --git a/latex.bzl b/latex.bzl
index 868d7bb..dfae0c1 100644
--- a/latex.bzl
+++ b/latex.bzl
@@ -59,14 +59,14 @@ def _arxivable_impl(ctx):
ctx.files._run_script[0].path,
texlive_path,
ctx.files._latexrun[0].path,
+ ctx.attr.compiler,
ctx.files.main[0].path.replace(".tex", ""),
ctx.files.main[0].path,
"--",
- ] + [src.path for src in ctx.files.srcs] + [
- "--",
ctx.files._arxiv_script[0].path,
ctx.outputs.out.path,
- ],
+ "--",
+ ] + [src.path for src in ctx.files.srcs],
inputs = depset(
direct = (ctx.files.main + ctx.files.srcs + ctx.files._latexrun +
ctx.files._run_script + ctx.files._arxiv_script +
@@ -79,6 +79,7 @@ _arxivable = rule(
attrs = {
"main": attr.label(allow_files = True),
"srcs": attr.label_list(allow_files = True),
+ "compiler": attr.string(default = "pdflatex"),
"_latexrun": attr.label(
allow_files = True,
default = "@bazel_latex_latexrun//:latexrun",
@@ -132,6 +133,7 @@ def latex_document(name, main, srcs = [], compiler = "pdflatex"):
name = name + "_arxivable",
srcs = srcs,
main = main,
+ compiler = compiler,
)
# Copy the .tar.gz into the main working directory.
diff --git a/run_latex.py b/run_latex.py
index 32b44cf..69485ef 100644
--- a/run_latex.py
+++ b/run_latex.py
@@ -5,7 +5,7 @@
Two invocations are supported:
1) run_latex.py [texlive] [latexrun] [jobname] [mainfile].tex [outfile].pdf [sources...]
-2) run_latex.py [texlive] [latexrun] [jobname] [mainfile].tex -- [sources...] -- [command...]
+2) run_latex.py [texlive] [latexrun] [jobname] [mainfile].tex -- [command...] -- [sources...]
The first will build [outfile].pdf from [mainfile].tex and the [sources...].
This is used to build the PDF file for the [name]_getpdf rules.
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback