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

comments:latexmk #7

Open
utterances-bot opened this issue Sep 11, 2020 · 9 comments
Open

comments:latexmk #7

utterances-bot opened this issue Sep 11, 2020 · 9 comments
Labels
comments Comments from utteranc.es

Comments

@utterances-bot
Copy link

Using Latexmk — homepage

https://mg.readthedocs.io/latexmk.html

Copy link

2sn commented Sep 11, 2020

When I run this I get lots of error messages about missing files, on third re-run it is finally quiet but does not produce pdf file. Seems to be not working as I would have expected, as a working drop-in for pdflatex. (pdflatex compiles the file just fine with no error message)

Copy link

2sn commented Sep 11, 2020

I see, I need to specify -pdf option, then it seems to work. But somehow I need to run it twice before it decides that it is all done. Maybe there is a missing iteration for use with beamer?

@mgeier mgeier added the comments Comments from utteranc.es label Sep 15, 2020
Copy link
Owner

mgeier commented Sep 15, 2020

Yeah, you'll have to use -pdf at the command line or use $pdf_mode = 1; in your configuration file.

I don't know about the beamer problem, the whole idea of latexmk is to figure out how many times to run LaTeX ...

If you manage to make a minimal reproducible example, you can probably report this problem to the author (http://www.personal.psu.edu/~jcc8/)?

Copy link

hey can we change the deafult options for latexmk i want to use lualatex for pdf generation but latexmk throws error showing it uses pdflatex

@mgeier
Copy link
Owner

mgeier commented Sep 29, 2021

You can try using this in your configuration file:

$pdf_mode = 1;
$pdflatex = 'lualatex';

UPDATE:

Actually, there is a dedicated mode for lualatex, no need to redefine the pdflatex command. Just use -pdflua on the command line or set this in the config file:

$pdf_mode = 4;

Copy link

Is there some way to error only on warnings in the final run of latex in latexmk? I have set up latexmk in Jenkins to make sure no one breaks the build of a document. I tried using -Werror, but it breaks on the first run of latex, when there are naturally a lot of undefined references, etc. I'd really like latexmk to error only if there are warnings in the final run. Thanks!

@mgeier
Copy link
Owner

mgeier commented Aug 31, 2022

I tried using -Werror, but it breaks on the first run of latex

Are you using the latest version? According to man latexmk, errors should only be caused in the last run:

   -Werror
          This causes latexmk to return a non-zero status code if  any  of
          the  files  processed  gives a warning about problems with cita‐
          tions or references (i.e., undefined citations or references  or
          about  multiply  defined references).  This is after latexmk has
          completed all the runs it needs to try  and  resolve  references
          and  citations.  Thus -Werror causes latexmk to treat such warn‐
          ings as errors, but only when they occur on the last run of *la‐
          tex  and  only after processing is complete.  Also can be set by
          the configuration variable $warnings_as_errors.

As a work-around, you could try to run latemk once without -Werror and immediately run it again with -g -Werror, which should repeat the last run (but I didn't test if it handles warnings as expected).

@mgeier mgeier changed the title https://mg.readthedocs.io/latexmk.html docname:latexmk Sep 4, 2022
@mgeier mgeier changed the title docname:latexmk comments:latexmk Sep 4, 2022
@mgeier mgeier changed the title comments:latexmk comments:latexmk: Oct 3, 2022
@mgeier mgeier changed the title comments:latexmk: comments:latexmk:comments Oct 3, 2022
@mgeier mgeier changed the title comments:latexmk:comments comments:latexmk Oct 9, 2022
Copy link

Please update link:
https://personal.psu.edu/~jcc8/software/latexmk/
to
https://www.cantab.net/users/johncollins/latexmk/index.html
as the old server is going retired.

@mgeier
Copy link
Owner

mgeier commented Aug 27, 2023

Thanks @js-open-projects, I have updated the links in #18.

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

No branches or pull requests

6 participants