From 70b47686cb689d8c5e4c6eecb58e7cd43240e92c Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 10 May 2012 23:12:52 +0000 Subject: new doc package latexfileinfo-pkgs (10may12) git-svn-id: svn://tug.org/texlive/trunk@26293 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/doc/latex/latexfileinfo-pkgs/README | 49 ++ .../latexfileinfo-pkgs/latexfileinfo_pkgs.htm | 582 +++++++++++++++++++++ 2 files changed, 631 insertions(+) create mode 100644 Master/texmf-dist/doc/latex/latexfileinfo-pkgs/README create mode 100644 Master/texmf-dist/doc/latex/latexfileinfo-pkgs/latexfileinfo_pkgs.htm (limited to 'Master/texmf-dist/doc/latex/latexfileinfo-pkgs') diff --git a/Master/texmf-dist/doc/latex/latexfileinfo-pkgs/README b/Master/texmf-dist/doc/latex/latexfileinfo-pkgs/README new file mode 100644 index 00000000000..98bf40f93f6 --- /dev/null +++ b/Master/texmf-dist/doc/latex/latexfileinfo-pkgs/README @@ -0,0 +1,49 @@ + + README for the `latexfileinfo-pkgs' package + Comparison of packages showing LaTeX file infos + (C) Uwe Lueck 2012/05/07 + + +This "package" in the first instance provides a file + + `latexfileinfo_pkgs.htm' + +to be viewed by a web browser. It is an HTML list and comparison +of CTAN packages displaying LaTeX source file informations +according to the commands \ProvidesClass, \ProvidesFile, +and \ProvidesPackage that LaTeX files should start with. +The document especially describes five packages of my own, +including interrelations and dependencies, and thus extends +their documentations. Among packages from different authers +mentioned or described as well are + + * `latexfileversion' and `ltxfileinfo' (rather) + for single files, as well as + + * `classlist' and `dateiliste' for listing inputted files. + +Support of revision control systems is mentioned briefly. + +The files can be redistributed and/or modified under the terms +of the LaTeX Project Public License; either version 1.3c of the +License, or any later version, see + + http://www.latex-project.org/lppl.txt + +We did our best to help you, but there is NO WARRANTY. + +The `latexfileinfo-pkgs' package is author-maintained in the sense +of this license. + +The latest public version of the package is available at + + http://mirror.ctan.org/info/latexfileinfo-pkgs/ + +A TDS version of the package is available as + + http://mirror.ctan.org/install/info/latexfileinfo-pkgs.tds.zip + +Please report mistakes, missing packages, and other suggestions via + + http://www.contact-ednotes.sty.de.vu + diff --git a/Master/texmf-dist/doc/latex/latexfileinfo-pkgs/latexfileinfo_pkgs.htm b/Master/texmf-dist/doc/latex/latexfileinfo-pkgs/latexfileinfo_pkgs.htm new file mode 100644 index 00000000000..c77a8b8bb47 --- /dev/null +++ b/Master/texmf-dist/doc/latex/latexfileinfo-pkgs/latexfileinfo_pkgs.htm @@ -0,0 +1,582 @@ + + + + Display LaTeX file metadata (“info”) + + + + + + +

latexfileinfo-pkgs — + + + + +
+ Displaying Metadata (“Info”) of LaTeX Source Files

+ + — a comparison of packages available from CTAN + +

+ +[ intro | table | \GetFileInfo etc. | \listfiles etc. | rcs/svn | thanks ]  +[ reload ] + + +

[→| ↑ ]


+

0 Introduction (with links to sections)

+For LaTeX source files, +it is recommended to start them with LaTeX command + +(after \NeedsTeXFormat). +Their trailing optional argument can provide the most recent + +Here we are listing and comparing TeX packages available from +CTAN that make use of this information. +

+The document especially describes five packages of my own, +including interrelations and dependencies, and thus extends +their documentations; see table below for them. +An asterisk* near a package name indicates that the package +is not mine; so what I tell about it may be wrong or bad … +(please let me know via form, +or should I add something?) ... +

+We have the cases of +

    + +
  1. displaying single file info (\GetFileInfo ...) +
  2. +
  3. listing infos of several files (\listfiles etc.) +
  4. +
+and for each +
    +
  1. access by LaTeX (1 · 2) +
  2. +
  3. access by external program (1 · 2). +
+Related subjects are using +
    +
  1. revision control systems and +
  2. +
  3. modification time according to pdfTeX. +
+A tabular overview of the first two case distinctions: +

+ + + + + + + + + + + + + + +
+just using LaTeX  using external program +
+single file +• doc*                +(Frank Mittelbach)
+• zwgetfdate*         +(Zdeněk Wagner)
+• readprov +
+• latexfileversion* + (Harald Harders)
+• ltxfileinfo*                  + (Wybo Dekker)
+• typeoutfileinfo +
+file list +• classlist*            +(Heiko Oberdiek)
+• dateiliste*         + (Paul Ebermann)
+• longnamefilelist
+• nicefilelist
+• myfilist
+
+• [ltxinput*                        +(Jim Green)]
+• [texlog-extract*       +(Wybo Dekker)]
+
+[ don’t really belong here … ]
+
+
+ +

[→| ↑ ]


+

1 Access Single File Info

+ + +[ a:  +doc | readprov | zwgetfdate ]  +[ b:  +latexfileversion | ltxfileinfo | typeoutfileinfo ]  +[ c: filemod ] + + +

a. Access in LaTeX Run

+ +—originally for automatic inclusion of current +revision date and version of a package +in typesetting the latter’s documentation +(“This document describes version … as of …”), but then … +
+
doc*
+
    + +
  • Belongs to LaTeX base distribution. +
  • +
  • Provides \GetFileInfo{⟨file⟩}; after using this, +you have \filedate, \fileversion, \fileinfo of ⟨file⟩. +
  • +
  • file⟩ must have been loaded in the LaTeX run. +
  • +
  • \GetFileInfo is fragile. +
  • +
+
zwgetfdate*
+
    + +
  • Provides \DateOfFile{⟨file⟩} +and \DateOfPackage{⟨file⟩}. +
  • +
  • file⟩ must have been loaded. +
  • +
+
readprov
+
    + +
  • +Provides +\UseDateOf{⟨file⟩} and \UseVersionOf{⟨file⟩}. +
  • +
  • +Steals doc’s \GetFileInfo so doc is not +needed, in case ... +
  • +
  • Provides +
      + +
    • \ReadFileInfos{⟨files⟩} +
    • +
    • \ReadPackageInfos{⟨files⟩} +
    • +
    • \ReadClassInfo{⟨file⟩} +
    • +
    +as alternatives to \GetFileInfo. +
      + +
    • They do not really loadfile⟩/⟨files⟩ ... +
    • +
    • ... so can be used with incompatible packages and +classes (multiple latter by \ReadFileInfos{⟨base⟩.cls}). +
    • +
    • This allows adding arbitrary LaTeX source files +to the list of files that LaTeX manages for +\listfiles — this is used for +myfilist. +
    • +
    +
  • +
+ +
+

b. Screen Display Using External Program

+—when you wonder whether the most recent version of a package +or a chapter file is present … +
+
latexfileversion*
+
    + +
  • Bash (Unix shell) script. +
  • +
  • Nice screen display. +
  • +
  • Invokes latex run using a copy of +doc’s \GetFileInfo. +
  • +
+
ltxfileinfo*
+
    + +
  • Ruby script. +
  • +
  • Displays nice +table +of infos (including location in file system) on screen. +
  • +
+
typeoutfileinfo
+
    + +
  • 5-lines Bash (Unix shell) script. +
  • +
  • Expects latex won’t append too many screen lines after +1-line \typeout
    +(tolerable screen display as compared with +latexfileversion). +
  • +
  • Invokes latex run using readprov. +
  • +
+ +
+

c. Related, while different …

+
+
filemod*
+
    + +
  • Uses pdfTeX’s +\pdffilemoddate{⟨file⟩} primitive. +
  • +
  • Compares modification dates of files. +
  • +
  • Files include images. +
  • +
  • Also works with pdflatex in DVI mode. +
  • +
+ +
+ +

[→| ↑ ]


+

2 File Info List

+This is about listing all files input in a LaTeX run, or ... +

a. Create in LaTeX Run

+ +[ LaTeX | classlist | dateiliste | longnamefilelist | myfilist | nicefilelist ] + + +
+
latex*
+
    + +
  • LaTeX provides \listfiles for the document preamble. +
  • +
  • \listfiles issues a list of all files input in the latex run +near end of .log file, together with their infos according +to \Provide... commands. +
  • +
  • The list is a two-column “table” (plain text), base filenames +flush right, info (maybe date, maybe version, maybe anything) flush left. +
  • +
  • Any file whose base filename has more than 8 characters +or whose filename extension does not have 3 characters corrupts alignment. +
  • +
+
classlist*
+
    + +
  • Remembers (separately) files input by  (a) \documentclass  +and what was input by  (b) \LoadClass. +
  • +
  • On \PrintClassList, the list of loaded class files appears on screen. +
  • +
  • Configurable by \PrintClassListEntry and \PrintClassListTitle. +
  • +
+
dateiliste*
+
    + +
  • Lists anything that the original \listfiles would list. +
  • +
  • Typesets the list as a LaTeX table, using package longtable. +
  • +
  • Separate columns for +
      + +
    • filename +
    • +
    • page where input (optionally) +
    • +
    • date +
    • +
    • version +
    • +
    • description (“caption”) +
    • +
    +
  • +
  • Supports RCS, +CVS, +and SVN (cf. section below). +
  • +
  • Highly configurable. +
  • +
  • E.g., you can replace info for a file by what you want to see in the list +(cf. myfilist). +
  • +
  • I haven’t seen what happens with plain text (.log) output. +
  • +
+
longnamefilelist
+
    + +
  • Overcomes LaTeX’s “8-character limit” +by a new optional argument for \listfiles, +indicating number of characters to be reserved for +base filenames, e.g. accounting for “longnamefilelist.sty”: +
    +\listfiles[16] + +
    + — view +example outcome +
  • +
  • —showing combination with myfilist +
  • +
  • —while also working as single addition to +LaTeX base, +no need of myfilist or monofill. +
  • +
  • Still, filename extensions with number of characters +differing from 3 break alignment. Martin Münch mentions +t1cmtt.fd (standard LaTeX font definition) and +supp-pdf.mkii (ConTeXt). +
  • +
+
nicefilelist
+
    + +
  • Uses separate columns for date and time +(like dateiliste). +
  • +
  • (Picky) recognition of “date” and “version” — if not present, +left empty or gets “missing” display: +
    +nicefilelist.sty  2012/03/29  v0.2   more file list alignment (UL)
    +nicefilelist.tex  2012/03/23   --    documenting nicefilelist.sty +
    +
    +(Martin Münch’s idea). +
  • +
  • Problem of varying filename extension lengths overcome +by actually keeping a separate flush-left column for them. +
  • +
  • Column widths configurable by templates — replace +pre-configuration (monofill commands): +
    + +\MFfieldtemplate{f-base}   {nicefilelist}  %% base name
    +\MFfieldtemplate{f-ext}    {tex}           %% name extension
    +\MFfieldtemplate{f-version}{v0.11a}        %% version +
    +
    +
  • +
  • First code line above shows difference to longnamefilelist, +equivalent there would be \listfiles[12]. +nicefilelist does not provide an optional argument +for \listfiles. +
  • +
  • Column distances and “missing” display configurable too. +
  • +
  • Can be combined with myfilist — view +output sample. +
  • +
  • Needs just monofill, additionally to +LaTeX base. +
  • +
+
myfilist
+
    + +
  • Allows removing all entries that LaTeX has collected +for \listfiles at a certain point. +
  • +
  • Then, by commands from readprov, +you can add arbitrary files to the list +(as they are not really loaded), +in the order you want to have them in the list. +
  • +
  • Thus actually, you can set up a list of files you want to have +independently of a typesetting run ... +
  • +
  • ... and actually, the intended application is generating the +list without any typesetting, +by running latex on a “script” file +just loading readprov and myfilist +and using only commands from them. +(No \documentclass, no {document} environment.) +
  • +
  • View +input example +for longnamefilelist. +
  • +
  • Besides .log output, the list can be written into a separate +plain text file — view +output example +for longnamefilelist. +
  • +
  • Main applications in my mind and actual work: +
      + +
    1. List of .sty and .tex files for my +CTAN packages and bundles +(instead of the .dtx/docstrip system, I use nicetext). +
    2. +
    3. List of package files specific to some project +that often change — manual replacement for a +“concurrent versions” system with single author. +E.g.: +
        + +
      • nicetext packages underlying documentation +of a certain different package. +
      • +
      • style files underlying a book project +at which authors and programmers work on changing computers. +
      • +
      +
    4. +
    5. List of chapter \include files for a book project, +edited at changing computers (by a number of authors). +
    6. +
    7. Often, one forgets to update version information +in the \Provides... command — the myfilist +helps you to check this +(e.g., right before a release; +filemod might automate this check, +perhaps together with readprov, +without myfilist). +
    8. +
    +
  • +
  • My actual workflow with Bash (Unix shell): +
      + +
    • upsfl with +
      +alias upsfl='latex srcfiles' + +
      +updates the list of source files, +and actually displays the updated list on screen. +
    • +
    • shsfl with +
      +alias shsfl='more SrcFILEs.txt' + +
      +displays the source file list without updating, +and waits when the list is too long for your (netbook) screen. +
    • +
    +
  • +
  • Combinable with dateiliste? +
  • +
+ +
+

b. Create by External Program

+Hm, not so related, no infos (it seems), lists only; +so, just “most related I could find” for this section ... +
+
ltxinput*
+
    + +
  • MS-DOS utility +(compiled from C). +
  • +
  • Lists files that would be input (recursively). +
  • +
+
texlog-extract*
+
    + +
  • Ruby script. +
  • +
  • Lists files that issued errors and warnings (colored). +
  • +
+ +
+ +

[→| ↑ ]


+

3 RCS/SVN

+For revision control systems +RCS and +SVN, there are + +—sorry, I can’t tell more about them right now … + +

[→| ↑ ]


+

Acknowledgements

+Thanks to Martin Münch, Moss +(I wrote this for his question), +and Rainer Schöpf! +RCS stuff mainly has been stolen from +Jürgen Fenn’s Topic Index of the +TeX Catalogue. +

+


+* not mine + +

Last revised 2012-05-07 © Uwe Lück + + + + +
+ (using blog.sty and monofill.sty) + + + + +
+ License: LPPL 1.3c or later, author-maintained.

+

[→ top of page ]

+ + + + + +
+ + + -- cgit v1.2.3