diff options
author | Karl Berry <karl@freefriends.org> | 2019-10-31 22:22:58 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-10-31 22:22:58 +0000 |
commit | ffdb01dedec1d0ba5dcf8628279f501ccaf79a3f (patch) | |
tree | 6eee35fc451dbbb85bfc5e5a33b431cb0ee900b2 /Master/texmf-dist/tex/latex/subfiles | |
parent | 96333e9ed5c717cce4e83216a2fe3df6987a3007 (diff) |
subfiles (31oct19)
git-svn-id: svn://tug.org/texlive/trunk@52591 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/subfiles')
-rw-r--r-- | Master/texmf-dist/tex/latex/subfiles/subfiles.cls | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/subfiles/subfiles.sty | 34 |
2 files changed, 32 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/latex/subfiles/subfiles.cls b/Master/texmf-dist/tex/latex/subfiles/subfiles.cls index 4837f82d3e3..eed0b1c431f 100644 --- a/Master/texmf-dist/tex/latex/subfiles/subfiles.cls +++ b/Master/texmf-dist/tex/latex/subfiles/subfiles.cls @@ -26,7 +26,7 @@ %% and the derived files subfiles.sty and subfiles.pdf %% \NeedsTeXFormat{LaTeX2e} -\ProvidesClass{subfiles}[2019/10/25 v1.4 Multi-file projects (class)] +\ProvidesClass{subfiles}[2019/10/30 v1.5 Multi-file projects (class)] \DeclareOption*{\typeout{Preamble taken from file `\CurrentOption'}% \let\preamble@file\CurrentOption} \ProcessOptions diff --git a/Master/texmf-dist/tex/latex/subfiles/subfiles.sty b/Master/texmf-dist/tex/latex/subfiles/subfiles.sty index 4a9a89b820a..c2afedb3bad 100644 --- a/Master/texmf-dist/tex/latex/subfiles/subfiles.sty +++ b/Master/texmf-dist/tex/latex/subfiles/subfiles.sty @@ -26,7 +26,7 @@ %% and the derived files subfiles.sty and subfiles.pdf %% \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{subfiles}[2019/10/25 v1.4 Multi-file projects (package)] +\ProvidesPackage{subfiles}[2019/10/30 v1.5 Multi-file projects (package)] \DeclareOption*{\PackageWarning{\CurrentOption ignored}} \ProcessOptions \@ifclassloaded{subfiles}{% @@ -56,7 +56,15 @@ \subfiles@next }% } -\newcommand\subfile[1]{% +\newcommand\subfile{% + \let\subfiles@loadfile\subimport + \subfiles@subfile +} +\newcommand\subfileinclude{% + \let\subfiles@loadfile\subincludefrom + \subfiles@subfile +} +\newcommand\subfiles@subfile[1]{% \begingroup \renewcommand\documentclass[2][subfiles]{\ignorespaces}% \renewenvironment{document}{% @@ -66,9 +74,29 @@ \@ignoretrue }% \subfiles@split{#1}% - \subimport{\subfiles@dir}{\subfiles@base}% + \subfiles@loadfile{\subfiles@dir}{\subfiles@base}% \endgroup } +\def\subfiles@addimportpath#1{% + \def\subfiles@filelist{}% + \def\subfiles@sep{}% + \@for\subfiles@filename:=#1\do{% + \edef\subfiles@filelist{\subfiles@filelist\subfiles@sep\import@path\subfiles@filename}% + \def\subfiles@sep{,}% + } +} +\let\subfiles@bibliography\bibliography +\renewcommand\bibliography[1]{% + \subfiles@addimportpath{#1}% + \expandafter\subfiles@bibliography\expandafter{\subfiles@filelist}% +} +\@ifpackageloaded{bibunits}{% + \let\subfiles@putbib\@putbib + \def\@putbib[#1]{% + \subfiles@addimportpath{#1}% + \expandafter\subfiles@putbib\expandafter[\subfiles@filelist]% + }% +}{} \endinput %% %% End of file `subfiles.sty'. |