[OS X TeX] Why does TeXShop want to re-build pdflatex format (and fail)
herbs at wideopenwest.com
Fri Dec 8 16:46:23 CET 2017
> On Dec 8, 2017, at 9:38 AM, jfbu <jfbu at free.fr> wrote:
> Le 08/12/2017 à 13:47, Herbert Schulz a écrit :
>>> On Dec 8, 2017, at 3:42 AM, jfbu <jfbu at free.fr> wrote:
>>> Hi again,
>>> Le 08/12/2017 à 10:18, jfbu a écrit :
>>>> I downloaded TeXShop 3.92, and I had this issue:
>>>> TeXShop reports it tried to build a the pdflatex format
>>>> and failed: it fails to find pdflatex.ini
>>>> Although I don't know the root cause, I know the
>>>> triggering circumstances: it is because I have my
>>>> TeXLive configured with an extra
>>>> repertory alongside the
>>>> and the texbin (from my /Library/TeX/Distributions/TeXLive-2017.texdist)
>>>> was pointing to the darwingmacports.
>>>> When I reset this symlink to target the default
>>>> x86_64-darwinlegacy all is fine with TeXShop.
>>>> It seems there is something hardcoded in TeXShop 3.92
>>>> which makes it believe that format needs to be rebuild
>>>> when the texbin points to
>>>> Error console:
>>>> This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017/MacPorts 2017_1) (preloaded format=pdflatex)
>>>> restricted \write18 enabled.
>>>> kpathsea: Running mktexfmt pdflatex.fmt
>>>> mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order):
>>>> mktexfmt: /usr/local/texlive/2017/texmf-dist/web2c/fmtutil.cnf
>>>> mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes:
>>>> mktexfmt: /Users/JOHNDOE/Library/texlive/2017/texmf-config/web2c/fmtutil.cnf
>>>> mktexfmt [INFO]: writing formats under /Users/JOHNDOE/Library/texlive/2017/texmf-var/web2c
>>>> mktexfmt [INFO]: --- remaking pdflatex with pdftex
>>>> mktexfmt: running `pdftex -ini -jobname=pdflatex -progname=pdflatex -translate-file=cp227.tcx *pdflatex.ini' ...
>>>> warning: Could not open char translation file `cp227.tcx'.
>>>> This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017/MacPorts 2017_1) (INITEX)
>>>> restricted \write18 enabled.
>>>> entering extended mode
>>>> ! I can't find file `pdflatex.ini'.
>>>> <*> *pdflatex.ini
>>>> (Press Enter to retry, or Control-D to exit)
>>>> Please type another input file name:
>>>> ! Emergency stop.
>>>> <*> *pdflatex.ini
>>>> No pages of output.
>>>> Transcript written on pdflatex.log.
>>>> mktexfmt [ERROR]: running `pdftex -ini -jobname=pdflatex -progname=pdflatex -translate-file=cp227.tcx *pdflatex.ini >&2 </dev/null' return status 1
>>>> mktexfmt [ERROR]: return error due to options --strict
>>>> mktexfmt [INFO]: Disabled formats: 2
>>>> mktexfmt [INFO]: Not selected formats: 20
>>>> mktexfmt [INFO]: Failed to build: 1 (pdftex/pdflatex)
>>>> mktexfmt [INFO]: Total formats: 23
>>>> mktexfmt [INFO]: exiting with status 1
>>>> I can't find the format file `pdflatex.fmt'!
>>>> Additional info:
>>>> I see in the preferences
>>>> kpsetool -w -n latex tex
>>>> and if I try manually
>>>> $ kpsetool -w -n latex tex pdflatex.ini
>>>> it appears ok.
>>>> Notice also that the above seems to try to create the
>>>> format in my $HOME, if it had succeeded it could have
>>>> caused problem when I later update TeXLive and the formats
>>>> are recreated system-wise.
>>> Forgot to say I am on Mavericks.
>>> If I try
>>> $ mktexfmt pdflatex.fmt
>>> it succeeds to create the format in my $HOME/Library/texlive/2017/texmf-var/web2c/pdftex/
>>> start of log
>>> This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017/MacPorts 2017_1) (INITEX) 8 DEC 2017 10:35
>>> showing there is no specific issue with the MacPorts pdftex binary
>>> being used.
>>> $ fmtutil-sys --byfmt pdflatex
>>> succeeds under these circumstances. And I did
>>> $ fmtutil-sys --refresh
>>> with success too
>> Just a guess... fmtutil was changed in TeX Live 2017 so it either needs to be called as fmtutil-sys or fmtutil-user or with the first argument -sys or -user. The mktexfmt program is a link to fmtutil and fmtutil might be interpreting it as -user when called with that name. You might try `mktexfmt -sys` but even that might not work.
> Thanks Herb,
> but I type directly either
> pdftex -ini -jobname=pdflatex -progname=pdflatex -translate-file=cp227.tcx *pdflatex.ini
> mktexfmt pdflatex.fmt
> it does succeed (the latter puts the pdflatex.fmt
> in my $TEXMFHOME location, the former dumps it in the work repertory)
> on the other hand TeXShop sub-process reports a warning
> warning: Could not open char translation file `cp227.tcx'.
> and then the execution of pdftex reports this error
> ! I can't find file `pdflatex.ini'.
> This is all very puzzling.
> It does find the pdftex binary, but seems not to find
> support files.
> As is something was wrong with kpsewhich or kpsea library.
> Why would it succeed from a command line interface but
> not from TeXShop ?
> My .bash_profile does have some set-up for TEXMFDIST etc..
> but that's only for efficiency because Emacs/AUCTeX made
> in the past many calls to kpsewhich --var-value (less now)
> which are very very slow (less now thanks to A. Maxwell,
> but still slow).
> However this only defines env var, and it would work
> also without.
Are you using the local TeX Distribution from Dick Koch or did you build your own .texdist data structure? What is your PATH since that seems to work?
(herbs at wideopenwest dot com)
----------- Please Consult the Following Before Posting -----------
TeX FAQ: http://www.tex.ac.uk/faq
List Reminders and Etiquette: https://www.esm.psu.edu/~gray/tex/
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
TeX on Mac OS X Website: http://mactex-wiki.tug.org/
List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex
More information about the macostex-archives