Skip to content

Enhancement for LaTeX.pool.ltxml #876

Description

@giovanni111

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);

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions