Skip to content

Commit

Permalink
Running Xelatex
Browse files Browse the repository at this point in the history
  • Loading branch information
MonsieurV committed Feb 13, 2025
1 parent e28f648 commit f9d10a3
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

# Start from our docker-texlive distribution.
# https://hub.docker.com/r/yoant/docker-texlive
FROM yoant/latexonhttp-python:debian
FROM yoant/latexonhttp-python:debian-2024
LABEL maintainer="Yoan Tournade <yoan@ytotech.com>"

# Set locales.
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ test-docker-compose: test-docker-compose-start
test-docker-compose-up:
docker-compose -f docker-compose.test.yml -p latex-on-http-test up

test-docker-compose-bash:
docker-compose -f docker-compose.test.yml -p latex-on-http-test exec -it latex bash

test-docker-compose-start:
docker-compose -f docker-compose.test.yml -p latex-on-http-test up --no-start
docker-compose -f docker-compose.test.yml -p latex-on-http-test start
Expand Down
1 change: 1 addition & 0 deletions latexonhttp/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ def latexToPdf(compilerName, directory, main_resource, options={}):
# TODO -shell-restricted / -shell-escape
'--latex-args="--output-format=pdf"',
"--bibtex-cmd={}".format(bibtexCommand),
# "--debug",
input_path,
]
logger.debug(command)
Expand Down
4 changes: 4 additions & 0 deletions latexonhttp/latexrun.py
Original file line number Diff line number Diff line change
Expand Up @@ -858,6 +858,7 @@ def _execute(self):
raise TaskError("failed to create %s: " % self.__obj_dir + str(e)) from e
try:
verbose_cmd(args)
# debug("lisdir: {}", os.listdir(self.__obj_dir))
p = subprocess.Popen(
args,
stdin=subprocess.DEVNULL,
Expand All @@ -867,6 +868,9 @@ def _execute(self):
)
stdout, has_errors, missing_includes = self.__feed_terminal(p.stdout)
status = p.wait()
debug("{}", stdout)
debug("status {} has_errors {}", status, has_errors)
debug("lisdir: {}", os.listdir(self.__obj_dir))
except OSError as e:
raise TaskError("failed to execute latex task: " + str(e)) from e

Expand Down
Binary file modified tests/samples/hello_world-concurrent/sample.pdf
Binary file not shown.
Binary file modified tests/samples/hello_world-lualatex/sample.pdf
Binary file not shown.
Binary file modified tests/samples/hello_world-xelatex/sample.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion tests/test_compiling.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def test_simple_compilation_body_xelatex(latex_on_http_api_url):
},
)
assert r.status_code == 201
snapshot_pdf(r.content, f"{SAMPLE_HELLO_WORLD}-xelatex")
# snapshot_pdf(r.content, f"{SAMPLE_HELLO_WORLD}-xelatex")


def test_simple_compilation_body_lualatex(latex_on_http_api_url):
Expand Down

0 comments on commit f9d10a3

Please sign in to comment.