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

Enhancement for LaTeX.pool.ltxml #876

Closed
giovanni111 opened this issue Oct 12, 2017 · 2 comments
Closed

Enhancement for LaTeX.pool.ltxml #876

giovanni111 opened this issue Oct 12, 2017 · 2 comments
Labels
Milestone

Comments

@giovanni111
Copy link

When processing

\documentclass{article}
\includeonly{ a }
\begin{document}
\include{a}
\end{document}

the file a.tex is not included. I propose the following change:

diff --git a/lib/LaTeXML/Package/LaTeX.pool.ltxml b/lib/LaTeXML/Package/LaTeX.pool.ltxml
index 7cffe68..035f70d 100644
--- a/lib/LaTeXML/Package/LaTeX.pool.ltxml
+++ b/lib/LaTeXML/Package/LaTeX.pool.ltxml
@@ -3006,6 +3006,8 @@ DefPrimitive('\include{}', sub {
 DefPrimitive('\includeonly{}', sub {
     my ($stomach, $paths) = @_;
     $paths = ToString($paths);
+    $paths =~ s/^\s+//;
+    $paths =~ s/\s+$//;
     my $table = LookupValue('including@only');
     AssignValue('including@only', $table = {}, 'global') unless $table;
     map { $$table{$_} = 1 } split(/,\s*/, $paths);
@dginev dginev added the bug label Oct 12, 2017
@dginev
Copy link
Collaborator

dginev commented Oct 12, 2017

Sounds quite reasonable to me! I'm sure it'll be a quick merge when @brucemiller gets a minute. Also feel free to make pull requests if you prefer @giovanni111 , it may be easier than having to paste the diff in by hand.

Thanks for another nice find!

@brucemiller
Copy link
Owner

Pretty reasonable, but have to also guard against spaces around the commas. Should work better now. Thanks for the report & suggested patch!

@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
Labels
Projects
None yet
Development

No branches or pull requests

3 participants