Tristan Miller
2017-09-08 13:46:10 UTC
Dear all,
In a separate thread I was advised to run TeX-auto-generate to generate
style hooks for the custom classes I'm using. I discovered that this
command seems to get confused by comments in the optional argument to
\RequirePackage. For example, take the following class file:
\NeedsTeXFormat{LaTeX2e}
\LoadClassWithOptions{article}
\ProvidesClass{foo}[2017/09/07 v0.1 test class]
\RequirePackage[
backend=biber, % here is a comment
]{biblatex}
Running TeX-auto-generate on this class file results in the following
style file, which fails to account for the use of biblatex:
(TeX-add-style-hook
"foo"
(lambda ()
(TeX-run-style-hooks
"latex2e"
"article"
"art10"))
:latex)
However, removing "% here is a comment" and re-running
TeX-auto-generate results in the following, which looks more correct:
(TeX-add-style-hook
"foo"
(lambda ()
(TeX-add-to-alist 'LaTeX-provided-package-options
'(("biblatex" "backend=biber" "")))
(TeX-run-style-hooks
"latex2e"
"article"
"art10"
"biblatex"))
:latex)
Am I correct in assuming that this is a bug? I know that a lot of
people use comments like this to explain the purpose of (sometimes very
obscure) package options.
Regards,
Tristan
In a separate thread I was advised to run TeX-auto-generate to generate
style hooks for the custom classes I'm using. I discovered that this
command seems to get confused by comments in the optional argument to
\RequirePackage. For example, take the following class file:
\NeedsTeXFormat{LaTeX2e}
\LoadClassWithOptions{article}
\ProvidesClass{foo}[2017/09/07 v0.1 test class]
\RequirePackage[
backend=biber, % here is a comment
]{biblatex}
Running TeX-auto-generate on this class file results in the following
style file, which fails to account for the use of biblatex:
(TeX-add-style-hook
"foo"
(lambda ()
(TeX-run-style-hooks
"latex2e"
"article"
"art10"))
:latex)
However, removing "% here is a comment" and re-running
TeX-auto-generate results in the following, which looks more correct:
(TeX-add-style-hook
"foo"
(lambda ()
(TeX-add-to-alist 'LaTeX-provided-package-options
'(("biblatex" "backend=biber" "")))
(TeX-run-style-hooks
"latex2e"
"article"
"art10"
"biblatex"))
:latex)
Am I correct in assuming that this is a bug? I know that a lot of
people use comments like this to explain the purpose of (sometimes very
obscure) package options.
Regards,
Tristan
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Tristan Miller
Free Software developer, ferret herder, logologist
https://logological.org/
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Tristan Miller
Free Software developer, ferret herder, logologist
https://logological.org/
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-