[Debian-tex-commits] SVN pkg-tetex-web commit + diffs: r2433 - pkg-tetex-web/trunk

Frank Küster frank at alioth.debian.org
Mon Feb 5 18:13:54 CET 2007


Author: frank
Date: 2007-02-05 18:13:53 +0100 (Mon, 05 Feb 2007)
New Revision: 2433

Modified:
   pkg-tetex-web/trunk/TeX-configuration-on-Debian.pdf
   pkg-tetex-web/trunk/TeX-configuration-on-Debian.tex
Log:
some content in the file...


Modified: pkg-tetex-web/trunk/TeX-configuration-on-Debian.pdf
===================================================================
(Binary files differ)

Modified: pkg-tetex-web/trunk/TeX-configuration-on-Debian.tex
===================================================================
--- pkg-tetex-web/trunk/TeX-configuration-on-Debian.tex	2007-02-05 17:12:19 UTC (rev 2432)
+++ pkg-tetex-web/trunk/TeX-configuration-on-Debian.tex	2007-02-05 17:13:53 UTC (rev 2433)
@@ -1,23 +1,26 @@
-\documentclass[smallheadings]{scrartcl}
+\documentclass[smallheadings,draft,10pt]{scrartcl}
 \usepackage[latin1]{inputenc}
 \usepackage[T1]{fontenc}
 \usepackage[english]{babel}
 \usepackage{lmodern}
-\typearea{12}
+\typearea{13}
+\usepackage{hyperref}
+\usepackage{listings}
+\usepackage{color}
 
 \newcommand*{\pkg}[1]{\textsf{#1}}
 \newcommand*{\file}[1]{\texttt{#1}}
 \newcommand*{\var}[1]{\texttt{#1}}
 \newcommand*{\prog}[1]{\texttt{#1}}
+\newcommand*{\term}[1]{\textbf{#1}}
 
 \begin{document}
 
 \title{What's a configuration file, and\\ where should it go?}
 \author{Frank Küster}
 \date{February 2007}
-% \maketitle{}
 
-\twocolumn[{\csname @twocolumnfalse\endcsname
+% \twocolumn[{\csname @twocolumnfalse\endcsname
   \maketitle
   \begin{abstract}\noindent{}%
   There are two questions with respect to configuration files which
@@ -30,20 +33,399 @@
   a reference in the future when these issues come up again (and they
   will\dots{}).
   \end{abstract}
-}]
+% }]
 
+\tableofcontents{}
+
 \section{Which files should be treated as a configuration file?}
 \label{sec:which-files-should}
 
 \subsection{General rules in Debian}
 \label{sec:general-rules-debian}
 
+The Debian policy defines configuration files in
+\href{http://www.debian.org/doc/debian-policy/ch-files.html#s10.7.1}{10.7.1}:
+\begin{quotation}
+  configuration file
+
+  \noindent{}%
+  A file that affects the operation of a program, or provides site- or
+  host-specific information, or otherwise customizes the behavior of a
+  program. Typically, configuration files are intended to be modified
+  by the system administrator (if needed or desired) to conform to
+  local policy or to provide more useful site-specific behavior.
+\end{quotation}
+This definition is not as clear-cut as it may seem.  Two aspects that
+are worth remembering is that it talks about customizing
+\emph{programs}, and about host- or \textit{site-}specific behavior. 
+
 \subsection{Document-specific vs. site-specific settings}
 \label{sec:docum-spec-vs}
 
+The purpose of a TeX system is to typeset documents.  Although a
+machine may be set up to generate many version of a particular type of
+document (e.g. timetables, product lists etc. from a database), in
+general it is not specified which type of documents are typeset in
+terms of content, layout and output format.
+
+Therefore we regard all aspects of customization that affect the
+document layout, autogenerated content and output format as
+\term{document-specific}.  Files which allow to change these things
+are not to be treated as configuration files.  If a particular site
+only creates documents of a certain type at some point in time, this
+is a special case which doesn't invalidate the rule.
+
+On the other hand, customization that affects the behavior of programs
+(search paths, available fonts, preferred font formats, etc.) is
+regarded as belonging to a configuratio file.
+
+% \subsubsection{Papersize configuration}
+% \label{sec:papers-conf}
+
+% Setting up the default papersize is a particularly difficult issue,
+% because it affects docu\-ment-spe\-cific customization (``at which line
+% width should the text be wrapped'') as well as site-wide program
+% behavior (``which papersize selection commands should be sent to the
+% printer'').  If the document specifies a document-specific setting in
+% the source \emph{and} makes sure this gets written into the output
+% file (e.\,g. using \pkg{hyperref.sty} or \pkg{geometry.sty} with
+% \LaTeX{}), then printing is no problem.  
+
+% However, if the document source does not do this, then some default
+% must be chosen, and this is going to be a site-wide configuration.
+
+
+
 \subsection{A survey of candidate files in TeX Live}
 \label{sec:surv-cand-files}
 
+In order to get an overview about the number of files affected, I
+conducted an overview over the files that are possible candidates for
+configuration files
+
+\subsubsection{Configuration files in current packages}
+\label{sec:conff-files-curr}
+
+
+\paragraph{tex-common}
+\label{sec:tex-common}
+
+\begin{sloppypar}
+  \pkg{tex-common} currently installs the configuration files
+  \file{/etc/texmf/fmt.d/00tex.cnf},
+  \file{/etc/texmf/language.d/00tex.cnf},
+  \file{/etc/texmf/web2c/mktex.cnf}, the empty directory
+  \file{/etc/texmf/updmap.d}, and handles \file{/etc/texmf/texmf.cnf}
+  and \file{/etc/texmf/texmf.d/*} (with \prog{ucf}).  No debate here,
+  I guess; \file{mktex.cnf} affects the behavior of the font
+  generation programs, namely the location of the font cache, and
+  without doubt contains a site-wide, document-independent setting.
+\end{sloppypar}
+
+\paragraph{te\TeX}
+\label{sec:tetex}
+
+\pkg{tetex-base} installs files in \file{updmap.d}, \file{language.d}
+and \file{/etc/texdoctk/texdoctk.dat} -- this directory is accessible
+as \var{\$TEXMFDIST/texdoctk}, and contains also the
+\prog{ucf}-managed \file{texdocrc}.  \file{texdoctk.dat} is not in
+fact a configuration file, it depends on the contents of the
+\file{doc} hierarchies in the \var{TEXMF} trees, and should either be
+installed in \var{TEXMFDIST} or even be generated.
+
+\pkg{tetex-bin} brings in an ucf-managed file in \file{fmt.d} plus
+\file{xdvi.cfg}, the latter handled with a symlink.
+
+\pkg{tetex-extra} only adds a file to \file{updmap.d}\footnote{The
+  files with extension \file{md5sum} in \file{/usr/share/tetex-extra}
+  are a leftover and not actually used for \prog{ucf} handling.}
+
+\paragraph{texlive}
+\label{sec:texlive}
+
+The \pkg{texlive} packages install files into \file{updmap.d},
+\file{fmt.d}, and \file{language.d}.  Additionally,
+\pkg{texlive-base-bin} installs files into \file{/etc/texmf/texlive}.
+These are accessed from \var{TEXMFDIST} via symlinks and comprise
+\file{dvipdfm.cfg}, \file{texdocrc.defaults}, \file{xdvi.cfg}, and the
+following files in \file{/etc/texmf/texlive/dvips}: \texttt{}
+\begin{verbatim}
+config.bakoma   config.ibmvga       config.ot2             alt-rule.pro  epson.cfg  
+config.canonex  config.ljfour       config.ps              canonex.cfg   ibmvga.cfg 
+config.cms      config.luc          config.qms             cx.cfg        ljfour.cfg 
+config.cx       config.mbn          config.toshiba         deskjet.cfg   qms.cfg    
+config.deskjet  config.mga          config.unms            dfaxhigh.cfg  toshiba.cfg
+config.dvired   config.mirrorprint  config.xyp             dvired.cfg  
+config.epson
+\end{verbatim}
+%
+I'm not sure about the purpose or use of the \file{*.cfg} files.
+
+\subsubsection{Candidate configuration files}
+\label{sec:cand-conf-files}
+
+\paragraph{Discarded candidates}
+\label{sec:discarded-candidates}
+
+There are loads of \TeX{} input files that have an extension
+\file{.cfg}.  Most of them are not intended to be changed at all, not
+even for document-specific customization.  As an example, take
+\file{listings.cfg}: The documentation says:
+\begin{quote}
+  Never modify a file from the listings package, in particular not the
+  configuration file. Each new installation or new version overwrites
+  it. The software license allows modification, but I can't recommend
+  it. It's better to create one or more of the files
+
+  \begin{tabular}{lll}
+    \file{lstmisc0.sty} & for & local add-ons (see developer's guide),\\
+    \file{lstlang0.sty} & for & local language definitions (see 4.17), and\\
+    \file{lstlocal.cfg} & as  & local configuration file
+  \end{tabular}
+  
+  and put it/them to the other listings files. These three files are not
+  touched by a new installation except you remove them. If
+  \file{lstlocal.cfg} exists, it is loaded after
+  \file{listings.cfg}. You might want to change one of the following
+  parameters.
+\end{quote}
+
+Those files that \emph{are} intended for configuration do in most
+cases affect document-specific settings, and do therefore not qualify
+as configuration files in the Debian sense.
+
+\paragraph{Possibly valid candidates}
+\label{sec:valid-candidates}
+
+\subparagraph{TeX input files used at documentation creation time}
+\label{sec:tex-input-files}
+
+There are some files in the te\TeX{} and \TeX{} Live distributions
+that have been changed by the distribution developer(s) compared to
+the versions on CTAN.  The most well-known example is
+\file{hyperref.cfg}.  It could be argued that if it makes sense to 
+make a distribution-wide decision to change this file, a site-specific
+change by the local admin is just as reasonable.
+
+\file{hyperref.cfg} is special because it contains code to detect the
+engine and output format that is used, in other words: It is related
+to behavior of the programs on the system.  There is no one-fits-all
+default, and it may choose a setting that doesn't fit the local user's
+or admin's wishes.  Therefore I think it qualifies as a Debian
+configuration file.  The same is true for \file{geometry.cfg}, and
+maybe others.
+
+\subparagraph{TeX input files used for format creation}
+\label{sec:tex-input-files-1}
+
+While it is legally possible to modify \LaTeX{} components like
+\file{texsys.cfg}, or customize \file{fonttext.ltx} as
+\file{fonttext.cfg}, I still do not think that we should make them
+configuration files.
+
+First of all, modifying \file{texsys.cfg} doesn't make sense on a
+Debian system, the path searching works well.  Second, changing the
+font setup (or hyphenation with \file{hyphen.cfg} instead of the files
+in \file{language.d}, shiver) leads to an unsupported ``\LaTeX{}''
+format and should be very much discouraged; and for anyone who is able
+to do it, it's easy to create a new renamed format instead.
+
+On the other hand, files that are read by a particular engine, like
+\file{pdftexconfig.tex}, are a different thing.
+\file{pdftexconfig.tex} contains the settings for the PDF paper size
+(and the default compression) and to me seems to be a configuration
+file for pdfTeX.
+
+
+
+\subsection{A proposal: Listening to upstream}
+\label{sec:proposal}
+
+\colorbox{yellow}{%
+\parbox{\linewidth}{%
+I propose to treat the following two types of files as configuration
+files:
+\begin{enumerate}
+\item Files that are modified by upstream's configuration scripts
+\item \TeX{} input files that are marked by upstream as being intended
+  for configuration \emph{and} that try to tweak the document creation
+  depending on the detected engine or output format
+\end{enumerate}
+}}
+
+\subsubsection{Upstream configuration files}
+\label{sec:upstr-conf-files}
+
+With the files that are handled by \prog{texconfig-sys} and other
+scripts, we hardly have any choice, because these tools will create
+copies in TEXMFSYSCONFIG, anyway, if there isn't already one -- except
+if we would decide to no longer support TEXMFSYSCONFIG.
+
+Because of our setup with \file{\{fmt,updmap,language\}.d}, files
+handled by \prog{fmtutil-sys} and \prog{updmap-sys} are already
+covered, and we only need to care about \prog{texconfig-sys}.  It is
+able to handle the following files:
+\begin{verbatim}
+TEXMF/tex/generic/config/pdftexconfig.tex
+TEXMF/web2c/mktex.cnf
+TEXMF/dvipdfm/config/config
+TEXMF/dvips/config/config.ps
+TEXMF/xdvi/XDvi
+TEXMF/web2c/texmf.cnf
+TEXMF/dvips//config.<printer>
+TEXMF/metafont/misc/modes.mf
+\end{verbatim}
+
+\subsubsection{Output format/engine-dependent files}
+\label{sec:engin-form-depend}
+
+Files that interact with the engine/output format at typesetting time
+have a problem: There is no one-fits-all default for all of them, and
+they may choose the wrong one.  This \emph{can} be circumvented by
+including driver settings in the document, but this reduces
+``portability'' in the sense that it is hard to write documents that
+can be processed to different formats and with different engines
+without changing the source.
+
+However, instead of making all those files configuration files, we
+can also consider an alternative approach:  All of them could read a
+central configuration file in which the site admin can specify the
+defaults they prefer, in particular for DVI\footnote{Does Xe\TeX{}
+  introduce additional options here?}.  We should ask Heiko on his
+opinion about this.
+
+\prog{grep}ping through \file{TeXLive/Master/texmf-dist/tex} yields a
+lot of files which contain the string \texttt{pdfoutput}.  Among
+these, I assume that only files in \file{generic} and \file{latex} are
+interesting (the others are \file{*.ini} files or ConTeXt files).
+Furthermore, in most cases the current usage of \verb|\pdfoutput| is
+probably a bug, anyway, in particular in not-so-well maintained
+specialized \LaTeX{} classes. 
+
+These files use \verb|\pdfoutput| in an attempt to detect the
+driver/output format and could use our central configuration file:
+
+\begin{verbatim}
+latex/pict2e/pict2e.cfg
+latex/crop/crop.sty
+latex/geometry/geometry.sty
+\end{verbatim}
+
+
+This is a list of files that contain the string \texttt{pdfoutput},
+but which I guess are probably just buggy users, and not conffile
+candidates even if correct, anyway.
+
+\begin{verbatim}
+latex/IEEEtran/IEEEtran.cls
+latex/hepparticles/hepparticles.sty
+latex/teubner/teubner.sty
+latex/scientificpaper/science.sty
+latex/mla-paper/mla.sty
+latex/fmp/fmp.sty
+latex/hc/hcart.cls
+latex/hc/hcreport.cls
+latex/hc/hcslides.cls
+latex/iso/isov2.cls
+latex/pgf/utilities/pgfwriteexternal.sty
+
+\end{verbatim}
+
+These files seem to (in some cases I have checked it) use
+\verb|\pdfoutput| as intended by the pdfTeX developers, so there's no
+need to treat them as a configuration file \footnote{A surprising
+  number, however, does it wrong and uses
+  \textbackslash{}@ifundefined. This has the consequence that it's
+  impossible to detect whether pdfTeX is used with this primitive
+  later on.}.
+
+\begin{verbatim}
+generic/context/mptopdf.tex
+generic/mfpic/mfpic.tex
+generic/oberdiek/ifpdf.sty
+generic/oberdiek/pdfcrypt.sty
+latex/cyrillic/ot2wncyr.fd
+latex/cyrillic/ot2wncyss.fd
+latex/cyrillic/ot2wlcyss.fd
+latex/cyrillic/ot2wlcyr.fd
+latex/juramisc/jurabook.cls
+latex/leaflet/leaflet.cls
+latex/microtype/microtype.sty
+latex/hyperref/hpdftex.def
+latex/hyperref/hyperref.sty
+latex/pdfcprot/pdfcprot.sty
+latex/cmap/cmap.sty
+\end{verbatim}
+
+These files try to detect the output format and have a hardcoded
+switch to \texttt{dvips} - they are not configuration files, but could
+be enhanced to load one instead.  Some of the checks are not ideal.
+
+\begin{verbatim}
+generic/pgf/utilities/pgfutil-plain.def
+generic/pgf/utilities/pgfutil-context.def
+generic/thumbpdf/thumbpdf.sty
+generic/thumbpdf/thumbpdf.tex
+latex/pict2e/p2e-pdftex.def
+\end{verbatim}
+
+Hardcoded options for \verb|\RequirePackage|, or restricts things to
+PDF/DVI output that shouldn't be:
+
+\begin{verbatim}
+latex/ifmslide/ifmslide.sty
+latex/base/ltnews.cls
+latex/breakurl/breakurl.sty
+\end{verbatim}
+
+Could use a driver/output format detection, but in fact requires
+driver options and only uses \verb|\pdfoutput| for checking:
+
+\begin{verbatim}
+latex/changebar/changebar.sty
+
+\end{verbatim}
+
+False positives (\texttt{pdfoutput} only in comment etc.):
+\begin{verbatim}
+latex/ppower4/texpause.sty
+
+\end{verbatim}
+
+unchecked
+\begin{verbatim}
+latex/listings/lstdoc.sty
+latex/oberdiek/pdflscape.sty
+latex/oberdiek/bmpsize-test.tex
+latex/beamer/emulation/beamerprosper.sty
+latex/beamer/multimedia/multimedia.sty
+latex/beamer/beamer.cls
+latex/sciposter/sciposter.cls
+latex/pbsheet/pbsheet.cls
+latex/pdfpages/pdfpages.sty
+latex/pdfpages/pppdftex.def
+latex/memoir/memoir.cls
+latex/ucs/ucshyper.sty
+latex/iso10303/stepman.tex
+latex/koma-script/scrkbase.sty
+latex/petri-nets/pndraw.sty
+latex/contour/contour.cfg
+latex/sugconf/sugconf.cls
+latex/texpower/fixseminar.sty
+latex/texpower/texpower.sty
+latex/pdftex-def/pdftex.def
+latex/preview/preview.sty
+latex/preview/prtightpage.def
+latex/latexconfig/latex.ini
+latex/pracjourn/pracjourn.cls
+latex/hepthesis/hepthesis.cls
+latex/stellenbosch/usthesis.cls
+latex/vpe/vpe.sty
+latex/marginnote/marginnote.sty
+latex/pst-pdf/pst-pdf.sty
+\end{verbatim}
+
+
 \section{Should we use the \var{TEXMFSYSCONFIG} tree?}
 \label{sec:should-we-use}
 
@@ -59,9 +441,10 @@
 \end{enumerate}
 
 The first questions seems to be settled and undisputed, the answer is
-``yes''.  The second one is currently under debate.  However, the
-reasons given in earlier discussions for supporting
-\var{TEXMFSYSCONFIG} also affect the decision about using it.
+``yes''.  The second one is currently under debate (see
+\url{http://bugs.debian.org/403026}).  However, the reasons given in
+earlier discussions for supporting \var{TEXMFSYSCONFIG} also affect
+the decision about using it.
 
 \subsection{Reasons for supporting \var{TEXMFSYSCONFIG}}
 \label{sec:reasons-supporting-}




More information about the Debian-tex-commits mailing list