texlive[51480] Master: subdocs (26jun19)

commits+karl at tug.org commits+karl at tug.org
Wed Jun 26 22:54:50 CEST 2019


Revision: 51480
          http://tug.org/svn/texlive?view=revision&revision=51480
Author:   karl
Date:     2019-06-26 22:54:50 +0200 (Wed, 26 Jun 2019)
Log Message:
-----------
subdocs (26jun19)

Modified Paths:
--------------
    trunk/Master/tlpkg/bin/tlpkg-ctan-check
    trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/subdocs/
    trunk/Master/texmf-dist/doc/latex/subdocs/README.md
    trunk/Master/texmf-dist/tex/latex/subdocs/
    trunk/Master/texmf-dist/tex/latex/subdocs/subdocs.sty
    trunk/Master/tlpkg/tlpsrc/subdocs.tlpsrc

Added: trunk/Master/texmf-dist/doc/latex/subdocs/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/subdocs/README.md	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/subdocs/README.md	2019-06-26 20:54:50 UTC (rev 51480)
@@ -0,0 +1,44 @@
+
+An alternative to \include's for large works consisting of
+several subdocuments. Still alpha.
+
+This is a tentative package aiming to provide a different approach
+for multidocument works (mainly, books with a document per chapter).
+Unlike the \include mechanism, every subdocument is a complete LaTeX
+document and can be typeset separately.  What the package does is
+sharing the aux files.  It's still an alpha version, and no attempt
+has been done yet to make it to work with, say, hyperref.
+
+This approach has the following advantages:
+1) Packages can be loaded just when a part requires them.
+2) Generated pdf/dvi/ps files are kept.
+
+You need a driver tex file containing a \subdocuments command
+listing the files. With an optional argument you can set
+its behaviour:
+
+\subdocuments[clear=double]{file1, file2, file3}
+
+The option clear=double adds an empty page at the end to give a even
+number of pages.  clear=single doesn't and it's the default.  Spaces
+and new lines before and after commas are ignored, as well as empty
+items.  It relies on the keyval package, so names containing = must
+be given within braces.
+
+This file can be used as a shared preample, with common settings
+for all the documents.
+
+Documents must have the folowing line:
+
+\usepackage[master]{subdocs}
+
+where master is the name of the file described above.
+
+Since every subdocument reads all the aux files, \tableofcontents
+may be used where desired. 
+
+License:     MIT
+________
+Javier Bezos --- http://www.texnia.com
+
+


Property changes on: trunk/Master/texmf-dist/doc/latex/subdocs/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/subdocs/subdocs.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/subdocs/subdocs.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/subdocs/subdocs.sty	2019-06-26 20:54:50 UTC (rev 51480)
@@ -0,0 +1,159 @@
+%
+% Copyright (C) 2009-2019 Javier Bezos http://www.texnia.com
+%
+% This file may be distributed and/or modified under the conditions of
+% the MIT License. A version can be found at the end of this file.
+%
+%
+% Usage
+% ~~~~~
+%
+% This is a tentative package aiming to provide a different approach
+% for multidocument works (mainly, books with a document per chapter).
+% Unlike the \include mechanism, every subdocument is a complete LaTeX
+% document and can be typeset separately.  What the package does is
+% sharing the aux files.  It's still an alpha version, and no attempt
+% has been done yet to make it to work with, say, hyperref.
+%
+% This approach has the following advantages:
+% 1) Packages can be loaded just when a part requires them.
+% 2) Generated pdf/dvi/ps files are kept.
+%
+% You need a driver tex file containing a \subdocuments command
+% listing the files. With an optional argument you can set
+% its behaviour:
+% 
+% \subdocuments[clear=double]{file1, file2, file3}
+%
+% The option clear=double adds an empty page at the end to give a even
+% number of pages.  clear=single doesn't and it's the default.  Spaces
+% and new lines before and after commas are ignored, as well as empty
+% items.  It relies on the keyval package, so names containing = must
+% be given within braces.
+%
+% This file can be used as a shared preample, with common settings
+% for all the documents.
+%
+% Documents must have the folowing line:
+%
+% \usepackage[master]{subdocs}
+%
+% where master is the name of the file described above.
+%
+% Since every subdocument reads all the aux files, \tableofcontents
+% may be used where desired. 
+%
+% Code
+% ~~~~
+
+\ProvidesPackage{subdocs}[2009/06/12 v0.1 Subdocuments]
+
+\RequirePackage{keyval}
+
+% Los dos siguientes son lo encargados de hacer lo que
+% normalmente hace \include.
+
+\AtBeginDocument{%
+  \if at filesw
+    \immediate\write\@auxout{\noexpand\sdoc at readaux}%
+  \fi}
+
+% At end of document we write the counters using writeckpt
+% but with \@partaux redirected to \@auxout. Like \include
+% there is a \clearpage
+
+\AtEndDocument{%
+  \sdoc at clear
+  \let\@partaux\@auxout
+  \@writeckpt{\jobname}}
+
+\def\@wckptelt#1{%
+  \immediate\write\@partaux{%
+    \string\sdoc at setcounter{#1}{\the\@nameuse{c@#1}}}}
+
+\def\sdoc at setcounter#1{%
+  \@ifundefined{c@#1}%
+    {\@gobble}%
+    {\setcounter{#1}}}
+
+% Optional arguments
+
+\def\sdoc at opt@clearsingle{\let\sdoc at clear\clearpage}
+\def\sdoc at opt@cleardouble{\let\sdoc at clear\cleardoublepage}
+\sdoc at opt@clearsingle
+
+\define at key{sdoc at options}{clear}{\@nameuse{sdoc at opt@clear#1}}
+
+% 
+
+\let\sdoc at loadaux\@empty
+
+\newcommand\subdocuments[2][]{%
+  \let\sdoc at save@kverrx\KV at errx
+  \def\KV at errx##1{% \@tempa contains the file name
+    {\let\sdoc at elt\relax % local
+     \edef\sdoc at a{\expandafter\strip at prefix\meaning\@tempa}%
+     \protected at xdef\sdoc at loadaux{\sdoc at loadaux\sdoc at elt{\sdoc at a}}}}%
+  \setkeys{sdoc at files}{#2}%
+  \let\KV at errx\sdoc at save@kverrx
+  \setkeys{sdoc at options}{#1}}
+
+% A "recursive" call. When a \jobname.aux file is
+% read the first thing is (or should be) \sdoc at readaux.
+% It reads all the aux files, and exits from the current
+% aux without further reading because it is already read.
+% This requires a file could \input itself, but, does
+% that work in all distributions?
+
+\def\sdoc at elt#1{%
+  \InputIfFileExists{#1.aux}{}%
+    {\PackageWarningNoLine{subdocs}{No file #1.aux -- Data may be wrong}}%
+  \sdoc at setcp{#1}}%
+
+\def\sdoc at readaux{%
+  \global\let\sdoc at readaux\relax
+  \sdoc at loadaux
+  \global\let\sdoc at readaux\sdoc at readaux@x
+  \endinput}
+
+\let\sdoc at readaux@x\sdoc at readaux
+
+\def\sdoc at setcp#1{%
+  \def\sdoc at a{#1}\edef\sdoc at b{\jobname}%
+  \ifx\sdoc at a\sdoc at b
+    \PackageInfo{subdocs}{Ignoring counters from #1 on, }%
+    \global\let\sdoc at setcp\@gobble
+  \else
+    \csname cp@#1\endcsname
+  \fi}
+
+% The master file name must be saved because it may contain
+% \usepackage's, not allowed before \ProcessOptions.
+
+\DeclareOption*{\edef\sdoc at a{\CurrentOption}}
+\ProcessOptions
+\InputIfFileExists{\sdoc at a}{}{}%
+
+\endinput
+
+MIT License
+-----------
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file


Property changes on: trunk/Master/texmf-dist/tex/latex/subdocs/subdocs.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check	2019-06-26 20:54:16 UTC (rev 51479)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check	2019-06-26 20:54:50 UTC (rev 51480)
@@ -638,7 +638,8 @@
     stellenbosch stex
     stickstoo stix stix2-otf stix2-type1 stmaryrd storebox storecmd
     stringstrings structmech struktex
-    sttools stubs studenthandouts sty2dtx suanpan subdepth subeqn subeqnarray
+    sttools stubs studenthandouts sty2dtx suanpan
+    subdocs subdepth subeqn subeqnarray
     subfig subfigmat subfigure subfiles subfloat substances
     substitutefont substr subsupscripts subtext
     sudoku sudokubundle suftesi sugconf

Modified: trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc	2019-06-26 20:54:16 UTC (rev 51479)
+++ trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc	2019-06-26 20:54:50 UTC (rev 51480)
@@ -1058,6 +1058,7 @@
 depend stubs
 depend studenthandouts
 depend subdepth
+depend subdocs
 depend subeqn
 depend subeqnarray
 depend subfigmat

Added: trunk/Master/tlpkg/tlpsrc/subdocs.tlpsrc
===================================================================


More information about the tex-live-commits mailing list