shiblon / latex-makefile

A Makefile for LaTeX - drop it in, type make, and magic happens.
Other
185 stars 30 forks source link

Possibility of "quick" build #2

Open janpipek opened 9 years ago

janpipek commented 9 years ago

Hello,

I very like the abilities of the Makefile. However, there are times when I don't want to produce the best possible output, but want the results fast (usually when iterating the looks of a particular paragraph, page, ...). I think it would be nice to have an option to run latex just once (not five times), "at your own risk". I'd call that target "quick" or something. Do you also think it is worth implementing and do you think it could be easily done?

Thanks, Jan

shiblon commented 9 years ago

Well, this could certainly be done, but typically the thing that takes the most time with latex is not the multiple passes, but the inclusion of things like images. You can set draft mode in your document class options to make things faster.

The makefile tries to run latex minimally already. Quite often it will only run latex once, unless latex indicates that it needs to run again.

Finally, if you do really want a quick mode, I would just say "run latex". It's just one command, after all. :-)

On Wed Sep 03 2014 at 2:54:41 AM Jan Pipek notifications@github.com wrote:

Hello,

I very like the abilities of the Makefile. However, there are times when I don't want to produce the best possible output, but want the results fast (usually when iterating the looks of a particular paragraph, page, ...). I think it would be nice to have an option to run latex just once (not five times), "at your own risk". I'd call that target "quick" or something. Do you also think it is worth implementing and do you think it could be easily done?

Thanks, Jan

— Reply to this email directly or view it on GitHub https://github.com/shiblon/latex-makefile/issues/2.

janpipek commented 9 years ago

Well, I don't monitor the processes running behind but "make" on whatever little change typically results in this:

make
= thesis.tex --> thesis.d thesis.pdf.1st.make (0-1) =
** WARNING ** PDF destination "appendix.A" not defined.
** WARNING ** PDF destination "appendix.B" not defined.
= thesis.tex --> thesis.pdf (1-2) =
** WARNING ** PDF destination "appendix.A" not defined.
** WARNING ** PDF destination "appendix.B" not defined.
= thesis.tex --> thesis.pdf (1-3) =
** WARNING ** PDF destination "appendix.A" not defined.
** WARNING ** PDF destination "appendix.B" not defined.
= thesis.tex --> thesis.pdf (1-4) =
** WARNING ** PDF destination "appendix.A" not defined.
** WARNING ** PDF destination "appendix.B" not defined.
= thesis.tex --> thesis.pdf (1-5) =
** WARNING ** PDF destination "appendix.A" not defined.
** WARNING ** PDF destination "appendix.B" not defined.
...
Success!  Wrote 14 pages to thesis.pdf

Based on that I assume that it runs five times. But nevermind, it was just a thought, not a "critical missing feature". Running xelatex <filename> naturally works :-)

shiblon commented 9 years ago

Oh, interesting. Those warnings are undoubtedly important, and are probably the cause of the extra build steps. What does your thesis.log file say about them?

On Thu Sep 04 2014 at 4:23:10 AM Jan Pipek notifications@github.com wrote:

Well, I don't monitor the processes running behind but "make" on whatever little change typically results in this:

make = thesis.tex --> thesis.d thesis.pdf.1st.make (0-1) = * WARNING * PDF destination "appendix.A" not defined. * WARNING * PDF destination "appendix.B" not defined. = thesis.tex --> thesis.pdf (1-2) = * WARNING * PDF destination "appendix.A" not defined. * WARNING * PDF destination "appendix.B" not defined. = thesis.tex --> thesis.pdf (1-3) = * WARNING * PDF destination "appendix.A" not defined. * WARNING * PDF destination "appendix.B" not defined. = thesis.tex --> thesis.pdf (1-4) = * WARNING * PDF destination "appendix.A" not defined. * WARNING * PDF destination "appendix.B" not defined. = thesis.tex --> thesis.pdf (1-5) = * WARNING * PDF destination "appendix.A" not defined. * WARNING * PDF destination "appendix.B" not defined. ... Success! Wrote 14 pages to thesis.pdf

Based on that I assume that it runs five times. But nevermind, it was just a thought, not a "critical missing feature". Running xelatex naturally works :-)

— Reply to this email directly or view it on GitHub https://github.com/shiblon/latex-makefile/issues/2#issuecomment-54429738 .

anjiro commented 9 years ago

I get multiple build steps without those messages:

= master.tex --> master.d master.pdf.1st.make (0-1) =
= personal_fabrication.bib master.aux --> master.bbl =
= master.tex --> master.pdf (1-2) =
= master.tex --> master.pdf (1-3) =
= master.tex --> master.pdf (1-4) =
= master.tex --> master.pdf (1-5) =
Overfull \hbox (20.44473pt too wide) in paragraph at lines 41--50
[]\EU1/BookAntiqua(0)/m/n/10.95 Despite the promise of digital fabrication tool
s for everyday people [[]], most current commercially-
 []

Overfull \hbox (22.95535pt too wide) in paragraph at lines 200--212
\EU1/BookAntiqua(0)/m/n/10.95 that users do not have an opportunity to preview
the results. Similarly, Mueller et al.’s Constructable[[]]
 []

Overfull \hbox (29.61908pt too wide) in paragraph at lines 55--66
[][]
 []

Overfull \hbox (29.61908pt too wide) in paragraph at lines 69--82
[][]
 []

Overfull \hbox (29.61908pt too wide) in paragraph at lines 85--98
[][]
 []

Success!  Wrote 16 pages to master.pdf

All of the log files (e.g. master.1-*.log) are identical.

shiblon commented 9 years ago

OK, I'm curious to know whether your log files say "rerun" anywhere. If not, then there is probably something else going on. If they do, then you might have one of those nondeterministic documents, where every pass changes a page number or something. While not terribly common, they do happen.

Does this happen on every document you build?

On Thu Sep 04 2014 at 11:25:02 PM Chris Monson shiblon@gmail.com wrote:

Oh, interesting. Those warnings are undoubtedly important, and are probably the cause of the extra build steps. What does your thesis.log file say about them?

On Thu Sep 04 2014 at 4:23:10 AM Jan Pipek notifications@github.com wrote:

Well, I don't monitor the processes running behind but "make" on whatever little change typically results in this:

make = thesis.tex --> thesis.d thesis.pdf.1st.make (0-1) = * WARNING * PDF destination "appendix.A" not defined. * WARNING * PDF destination "appendix.B" not defined. = thesis.tex --> thesis.pdf (1-2) = * WARNING * PDF destination "appendix.A" not defined. * WARNING * PDF destination "appendix.B" not defined. = thesis.tex --> thesis.pdf (1-3) = * WARNING * PDF destination "appendix.A" not defined. * WARNING * PDF destination "appendix.B" not defined. = thesis.tex --> thesis.pdf (1-4) = * WARNING * PDF destination "appendix.A" not defined. * WARNING * PDF destination "appendix.B" not defined. = thesis.tex --> thesis.pdf (1-5) = * WARNING * PDF destination "appendix.A" not defined. * WARNING * PDF destination "appendix.B" not defined. ... Success! Wrote 14 pages to thesis.pdf

Based on that I assume that it runs five times. But nevermind, it was just a thought, not a "critical missing feature". Running xelatex naturally works :-)

— Reply to this email directly or view it on GitHub https://github.com/shiblon/latex-makefile/issues/2#issuecomment-54429738 .

anjiro commented 9 years ago

This is the only bit that has "rerun" in it:

(/usr/local/texlive/2014/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty
Package: rerunfilecheck 2011/04/15 v1.7 Rerun checks for auxiliary files (HO)
Package rerunfilecheck Info: Feature \pdfmdfivesum is not available
(rerunfilecheck)             (e.g. pdfTeX or LuaTeX with package `pdftexcmds').

(rerunfilecheck)             Therefore file contents cannot be checked efficien
tly
(rerunfilecheck)             and the loading of the package is aborted.
)

I just created a basically empty document and tried it; I get fewer builds, but still the same number every time, including if I have not touched the files at all:

$ make foo
= foo.tex --> foo.d foo.pdf.1st.make (0-1) =
= foo.tex --> foo.pdf (0-2) =
Success!  Wrote 2 pages to foo.pdf
anjiro commented 9 years ago

Just as an update, it would appear that the hyperref package causes this behavior. Try the following document:

\documentclass{article}
\usepackage{hyperref}
\begin{document}
    This is a document.
\end{document}

Commenting out the \usepackage{hyperref} line makes many fewer compilation steps.

shiblon commented 9 years ago

Ah, yes, that makes a lot of sense. When it creates bookmarks, it makes multiple passes. There may yet be an opportunity here, but this is at least consistent with my experience, and is not terribly surprising. :-)

On Mon Oct 13 2014 at 3:35:02 PM Daniel Ashbrook notifications@github.com wrote:

Just as an update, it would appear that the hyperref package causes this behavior. Try the following document:

\documentclass{article} \usepackage{hyperref} \begin{document} This is a document. \end{document}

Commenting out the \usepackage{hyperref} line makes many fewer compilation steps.

— Reply to this email directly or view it on GitHub https://github.com/shiblon/latex-makefile/issues/2#issuecomment-58942982 .