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

Weird @filelist behaviour when loading cls file #857

Closed
tkw1536 opened this issue Aug 2, 2017 · 0 comments
Milestone

Comments

@tkw1536
Copy link
Contributor

@tkw1536 tkw1536 commented Aug 2, 2017

The @filelist macro seems to be empty when reading in a class file. Consider the following situation:

filelist.tex contains:

\documentclass{filelistclass}
\begin{document}
  The file list inside of the cls file was `\filelistclass'. 
\end{document}

filelistclass.cls contains:

\let\filelistclass\@filelist
\LoadClass{article}

filelistclass.cls.ltxml contains:

InputDefinitions('filelistclass', type => 'cls', noltxml => 1, withoptions => 1);
#======================================================================
1;

When running this with pdflatex filelist.tex we get
The file list inside of the cls file was ‘filelistclass.cls’.
indicating that \@filelist is filelistclass.cls.

When running this with latexml filelist.tex we instead get

<p>The file list inside of the cls file was ‘’.</p>

indicating that \@filelist is empty.

I am working on a fix for this, will make a pull request in a bit.

brucemiller added a commit that referenced this issue Aug 3, 2017
Set @FileList macro before reading file (fixes #857)
physikerwelt added a commit to physikerwelt/LaTeXML that referenced this issue Aug 24, 2017
When loading a file through `InputDefinitions`, the @FileList macro was
only set after the file has finished loading. This results in the macro
being empty during the processing of a file.

This commit fixes the issue by setting the @FileList macro before
loading of the file. Furthermore, it adds a testcase to prevent this bug
from reappearing in the future.
@dginev dginev added this to the LaTeXML-0.8.3 milestone Jan 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.