[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#402994: use new libpaper hook to track system paper size



Ralf Stubner <ralf.stubner@web.de> wrote:

>> First of all, "texconfig paper $PAPER" only allows letter and a4.  So
>> either we need to change the hook script to check for that - or we patch
>> texconfig to recognize more paper sizes.
>
> The current limitation is pdftex, which can have it's default papersize
> changed only by changing pdftexconfig.tex and redumping all formats. The
> different pdftexconfig.tex files needed for a4 and letter are hardcoded
> into texconfig.

What's the problem?  This is the relevant part from texconfig:

          case $3 in
            letter)
              w="8.5 true in"; h="11 true in"
              setupTmpDir
              fmgrConfigReplace pdftexconfig.tex pdfpagewidth '\pdfpagewidth='"$w"
              wChanged=$fmgrConfigReplaceChanged
              fmgrConfigReplace pdftexconfig.tex pdfpageheight '\pdfpageheight='"$h"
              if $wChanged || $fmgrConfigReplaceChanged; then
                fmtutil --all
              fi
              ;;
            a4)
              w="210 true mm"; h="297 true mm"
              fmgrConfigReplace pdftexconfig.tex pdfpagewidth '\pdfpagewidth='"$w"
              wChanged=$fmgrConfigReplaceChanged
              fmgrConfigReplace pdftexconfig.tex pdfpageheight '\pdfpageheight='"$h"
              if $wChanged || $fmgrConfigReplaceChanged; then
                fmtutil --all
              fi
              ;;
            "") echo "$help" >&2; rc=1;;
            *)
             echo "$progname: unknown PAPER \`$3' given as argument for \`$progname pdftex paper'" >&2
             echo "$progname: try \`$progname pdftex paper' for help" >&2
             rc=1 ;;
          esac ;;

Why can't we just add settings for other papersizes here (or let it read
them from a separate file)?

>> Second, the files that are affected are currently not configuration
>> files, which is a bug.  But what should we do?  If we make them
>> conffiles, users will get "configuration file changed by you or a
>> script" if the file is changed upon upgrade.  Although the statement is
>> true, it won't help people very much who never looked at that file, in
>> particular since the right choice would be to accept the new version
>> from the package - it will be changed again right away by the libpaper
>> hook. 
>
> How about having the original files in TEXMFDIST and change texconfig
> such, that it writes the new files to TEXMF(SYS)VAR? That way the user
> will not have to deal with the files. But if needed, these files can be
> overruled by a file in TEXMF(SYS)CONFIG. One problem that I see right
> now is what texconfig(-sys) should do when such a file exists in
> TEXMF(SYS)CONFIG. Tricky ...

Hm.  Doesn't look very elegant to me.  

> dvipdfm allready links against libpaper. 

Err, right.  We probably should disable "texconfig dvidpdfm paper",
then. 

> For dvips I currently see no
> possibility to have one configuration file specify another one, that
> should also be read.

Will it read multiple config files, e.g. in TEXMFSYSVAR and
TEXMFSYSCONFIG/TEXMFDIST? 

Regards, Frank
-- 
Dr. Frank Küster
Single Molecule Spectroscopy, Protein Folding @ Inst. f. Biochemie, Univ. Zürich
Debian Developer (teTeX/TeXLive)



Reply to: