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

Support amsrefs #48

Merged
merged 1 commit into from
Jun 1, 2017
Merged

Conversation

rekka
Copy link
Contributor

@rekka rekka commented Jun 1, 2017

This commit changes the condition that decides whether bibtex is run to
finding \bibdata in the aux file (was \citation and \bibcite).
Since bibtex exits with an error if it does not find \bibdata anyway,
this avoids running bibtex unecessarily when for instance amsrefs is
used to process the bibliography.

I also replaced find(...).count() > 0 by find(...).next().is_some(): no need to go through the whole file, stop at the first match.

This commit changes the condition that decides whether bibtex is run to
finding `\bibdata` in the aux file (was `\citation` and `\bibcite`).
Since bibtex exits with an error if it does not find `\bibdata` anyway,
this avoids running bibtex unecessarily when for instance amsrefs is
used to process the bibliography.
@pkgw pkgw merged commit 4dc1600 into tectonic-typesetting:master Jun 1, 2017
@pkgw
Copy link
Collaborator

pkgw commented Jun 1, 2017

I will confess that I don't fully understand the meaning of the control sequences that you're talking about here, but you sound like you know what you're doing :-) Thanks for the patch!

@rekka
Copy link
Contributor Author

rekka commented Jun 1, 2017

Thanks for merging!

I have to admit that this info is based on some experimentation and on how latex defines the \bibliography command in latex.ltx:

\def\bibliography#1{%
  \if@filesw
    \immediate\write\@auxout{\string\bibdata{#1}}%
  \fi
  \@input@{\jobname.bbl}}

@rekka rekka deleted the feat-support-amsrefs branch June 15, 2017 01:19
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

Successfully merging this pull request may close these issues.

2 participants