Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch from rerun.sh to latexmk #569

Closed
michaelmhoffman opened this issue May 19, 2021 · 7 comments
Closed

Switch from rerun.sh to latexmk #569

michaelmhoffman opened this issue May 19, 2021 · 7 comments
Assignees

Comments

@michaelmhoffman
Copy link
Contributor

The latexmk command that comes with TeX Live seems to fulfill the same purpose as rerun.sh and is robust to a lot more edge cases, and probably quite a bit more future-proof.

@michaelmhoffman
Copy link
Contributor Author

For example, rerun.sh does not seem to rerun TeX enough times for the acronym package to work.

michaelmhoffman added a commit to michaelmhoffman/hts-specs that referenced this issue May 19, 2021
Departures from previous practice in this repository:

- `latexmk` (included in TeX Live) instead of `rerun.sh` because the LaTeX `acronym` package does not work with `rerun.sh` (samtools#569). The `acronym` package automatically handles the expansion of acronyms--for example, ensuring their expansion only on first use and producing a list at the end. I would rather not remove it because we would lose this functionality. Using `latexmk` also involves removing `new/*.fls` and `new/*.fdb_latexmk` as part of the `mostlyclean` target.

- I developed the document with `lualatex` (included in TeX Live) as I usually do instead of `pdflatex`, because it fixes some warts especially in font selection and is where I understand TeX engine development has been focused for years. If necessary, I could change the font setup to use `pdflatex` instead.
@jmarshall
Copy link
Member

Various maintainers have been reluctant to use latexmk in the past, because they did not have it installed. It may well be time to revisit this… 🤷

Starting from an empty new/ directory, both rerun.sh and latexmk run latex the same number of times (namely 3) and produce the same acronym-related warnings on the final run:

LaTeX Warning: Hyper reference `acro:ASCII' on page 6 undefined on input line 374.
LaTeX Warning: Hyper reference `acro:ASCII' on page 6 undefined on input line 374.
LaTeX Warning: Hyper reference `acro:regex' on page 6 undefined on input line 377.
LaTeX Warning: Hyper reference `acro:regex' on page 6 undefined on input line 377.

Is this what you're seeing, or do you experience a scenario in which rerun.sh and latexmk produce different results?

I suspect those warnings are some unfortunate interplay between hyperrefs and acronym commands…

@michaelmhoffman
Copy link
Contributor Author

After reverting commit c773dcf to restore the changepage package (in an incorrect attempt to get this working on the CircleCI system that doesn't have changepage), rerun.sh is now working for me. I don't know why it wasn't working before—it's probably either because I was using it correctly or something else.

Will figure out how to remove those warnings for #570.

I'd still suggest using latexmk for the reasons above but it might not be a blocker for #570.

@jkbonfield
Copy link
Contributor

FYI latexmk seems to work for me, assuming I used it correctly. Is there a specific document which you need comparing?

@michaelmhoffman
Copy link
Contributor Author

If you do this, you will also need to remove new/*.fls and new/*.fdb_latexmk as part of the mostlyclean target, as done in #570.

@jmarshall jmarshall self-assigned this May 27, 2021
@jmarshall
Copy link
Member

jmarshall commented May 27, 2021

[Summarising the discussion in the File Formats meeting:]

Assuming there are no maintainers or contributors who still do not have access to latexmk, there is really no good reason not to be using it, as it's the standard well-known tool for this job.

So a good way forward would be to make the s/rerun.sh/latexmk/ change in Makefile, ignore and clean those additional files as recommended, but leave the rerun.sh script in place in the repo in case anyone needs to continue to use it.

@jkbonfield
Copy link
Contributor

Can I suggest having the rerun.sh command line as a comment in the Makefile too, so we can trivially comment out latexmk and uncomment rerun.sh should we ever be in a situation of needing it. As time goes by we'll get more confident as to whether anyone still requires it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants