chirun-ncl / chirun

A Python package providing the command line interface for building flexible and accessible content with Chirun.
https://chirun.org.uk/
Other
30 stars 4 forks source link

Web version ignores .sty file located above current directory #253

Open prowlett opened 2 months ago

prowlett commented 2 months ago

I make a sty file containing some commands, for example like this:

\newcommand{\mycommand}{chirun folks}

I put this in a folder with a tex file like this:

\documentclass{article}
\usepackage{mystyle}
\begin{document}
Hello \mycommand.
\end{document}

The output (web left, PDF right) looks like this, as expected.

"Hello chirun folks." both sides

I move the sty file to the directory above (say because I want to use the same sty with multiple files in different subdirectories) and change the LaTeX to this:

\documentclass{article}
\usepackage{../mystyle}
\begin{document}
Hello \mycommand.
\end{document}

Then no error is given but the output is like this.

Right side says "Hello chirun folks." but left side says "Hello ."

That is, pdflatex is happy but in the web version the sty has been quietly ignored.

Out of interest (not my use case) I moved the sty file to a subdirectory at sty/mystyle.sty and this worked fine. So the problem seems to be with moving up the directory structure.

\documentclass{article}
\usepackage{sty/mystyle}
\begin{document}
Hello \mycommand.
\end{document}

"Hello chirun folks." both sides