[ET Trac] #2638: documentation.tex assume to be a specific location relative to Cactus root directory
Roland Haas
trac-noreply at einsteintoolkit.org
Fri Sep 16 02:43:33 CDT 2022
#2638: documentation.tex assume to be a specific location relative to Cactus root directory
Reporter: Roland Haas
Status: new
Milestone:
Version:
Type: bug
Priority: minor
Component:
Currently the LaTeX documentation files must include a relative path to `cactus.sty` like so:
```
\usepackage{../../../../doc/latex/cactus}
```
which, assuming the “typical” directory layout, accidentally works both when calling `pdflatex` directly \(and manually\) on the LaTeX input file in the source code location and via the various `-ThornDoc` and `-ThornGuide` make targets.
This is however fragile and fails if e.g. the thorn lives in a git repository of its own so that the directory layout is:
```text
Cactus
|
+- repos
|
+- ThornRepo
|
+- doc
|
+- documenation.tex
```
rather than the expected
```
Cactus
|
+- repos
|
+- ArrRepo
|
+- Thorn
|
+- doc
|
+- documenation.tex
```
or \(the initially envisioned one assumes\):
```
Cactus
|
+- arrangements
|
+- ArrangeMent
|
+- Thorn
|
+- doc
|
+- documenation.tex
```
One way to handle this is to use conditionals to try both locations:
```tex
\IfFileExists{../../../doc/latex/cactus.sty}
% then
{\usepackage{../../../doc/latex/cactus}}
% else
{\usepackage{../../../../doc/latex/cactus}}
```
which is somewhat cumbersome and only works for those two locations so must be adjusted for each thorn. Another, likely the officially suggested way, is to the `TEXINPUTS` such that `cactus.sty` is directly found. E.g. something like:
```
export TEXTIPUTS=$TOP/doc/latex/:
```
in the Makefile and then use `\usepackage{cactus}` in `documentation.tex`. This however means one can no longer run `pdflatex` directly on the LaTeX sources. There is, since TeX does not actually itself do the searching, no way to set `TEXINPUTS` or a similar thing in TeX files it seems.
`\IfFileExists` may rely on LuaTeX features \(not sure\) and one may even have to resort to pure TeX for say tex4ht to work \([https://tex.stackexchange.com/questions/98203/can-i-test-if-a-file-exists](https://tex.stackexchange.com/questions/98203/can-i-test-if-a-file-exists)\).
--
Ticket URL: https://bitbucket.org/einsteintoolkit/tickets/issues/2638/documentationtex-assume-to-be-a-specific
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.einsteintoolkit.org/pipermail/trac/attachments/20220916/68ddb66e/attachment.html
More information about the Trac
mailing list