I ran it at the command line w/o any “tricks” and I got a fine PDF:
[matthias@texas ~/Books/srsd ] cat > foo.scrbl
#lang scribble/base
@title{On the Cookie-Eating Habits of Mice}
If you give a mouse a cookie, he's going to ask for a
glass of milk.
[matthias@texas ~/Books/srsd ] scribble --dest Tmp/ --pdf foo.scrbl
[Output to Tmp/foo.pdf]
[matthias@texas ~/Books/srsd ] open Tmp/foo.pdf
[matthias@texas ~/Books/srsd ] racket --version
Welcome to Racket v8.5.0.8 [cs].
I also ran it via —latex and it ran fine:
[matthias@texas ~/Books/srsd ] scribble --dest Tmp/ --latex foo.scrbl
[Output to Tmp/foo.tex]
[matthias@texas ~/Books/srsd ] cd Tmp/
[matthias@texas ~/Books/srsd/Tmp ] pdflatex foo.tex
This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=pdflatex)
restricted \write18 enabled.
entering extended mode
(./foo.tex
LaTeX2e <2020-02-02> patch level 5
L3 programming layer <2020-03-06>
…
LaTeX Font Warning: Some font shapes were not available, defaults substituted.
LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.
){/usr/local/texlive/2020/texmf-dist/fonts/enc/dvips/base/8r.enc}</usr/local/t
exlive/2020/texmf-dist/fonts/type1/urw/times/utmr8a.pfb>
Output written on foo.pdf (1 page, 13636 bytes).
Transcript written on foo.log.
[matthias@texas ~/Books/srsd/Tmp ]
My guess is that plain 8,5 would work, too. If not, I’d work with the snapshot.
indeed. I thought I had upgraded TeX on all my machines:
[matthias@antarctica ~/Tmp ] pdflatex foo
This is pdfTeX, Version 3.141592653-2.6-1.40.24 (TeX Live 2022) (preloaded format=pdflatex)
restricted \write18 enabled.
entering extended mode
(./foo.tex
LaTeX2e <2021-11-15> patch level 1
L3 programming layer <2022-02-24>
(/usr/local/texlive/2022/texmf-dist/tex/latex/base/article.cls
Document Class: article 2021/10/04 v1.4n Standard LaTeX document class
(/usr/local/texlive/2022/texmf-dist/tex/latex/base/size10.clo))
(/usr/local/texlive/2022/texmf-dist/tex/latex/base/inputenc.sty)
pe)
(/usr/local/texlive/2022/texmf-dist/tex/latex/base/ifthen.sty)
(/usr/local/texlive/2022/texmf-dist/tex/latex/etoolbox/etoolbox.sty)
(/usr/local/texlive/2022/texmf-dist/tex/generic/iftex/ifxetex.sty)
(/usr/local/texlive/2022/texmf-dist/tex/generic/iftex/ifluatex.sty)
(/usr/local/texlive/2022/texmf-dist/tex/latex/xkeyval/xkeyval.sty
(/usr/local/texlive/2022/texmf-dist/tex/generic/xkeyval/xkeyval.tex
(/usr/local/texlive/2022/texmf-dist/tex/generic/xkeyval/xkvutils.tex)))
(/usr/local/texlive/2022/texmf-dist/tex/latex/oberdiek/centernot.sty)
(/usr/local/texlive/2022/texmf-dist/tex/generic/kastrup/binhex.tex)
….
….
! LaTeX Error: Command \widebar already defined.
Or name \end... illegal, see p.192 of the manual.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.3155 ...^{{\wide@bar{#1}{0}}}{\wide@bar{#1}{1}}}
?
I recommend running —latex first, then the following script, then pdflatex:
#lang at-exp racket
(provide
;; comment out the latex package commands in TABLE because they interfere with each other
main)
;; ---------------------------------------------------------------------------------------------------
(define TABLE
`[ "packageWasysym"
"packageTxfonts" ])
(define (main . opt-file)
(define FILE (and (cons? opt-file) (first opt-file)))
(displayln " ********************************* FIXING ********************************* ")
(define lines (if FILE (file->lines FILE #:mode 'text) (port->lines)))
(define next
(for/list ([line lines])
(for/fold ([line line]) ([row TABLE])
(regexp-replace (~a "^\\\\" row) line (~a "%% \\\\" row )))))
(if FILE
(with-output-to-file FILE #:exists 'replace (λ () (for-each displayln next)))
(with-output-to-string (λ () (for-each displayln next)))))
(Posted w/o tests. See racket/scribble issues for full scripy.)
Then I run pdflatex mouse.tex and after a bunch of warnings I get
! LaTeX Error: Command \widebar already defined.
Or name \end... illegal, see p.192 of the manual.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.3155 ...^{{\wide@bar{#1}{0}}}{\wide@bar{#1}{1}}}```
Thanks. I didn’t notice the PR. I used it on the Dan’s latex file and it solves his problem.
(There are other problems in different contexts that I work around with the script that I posted.)
Hello @danprager:
If there is still a chance for you to do a little test, you can try the following code that was shared by@robby (in the link that you mentioned). In my case it solved the problem (that was very similar to yours). It may work fine in your case, also.
The PR above has been merged. Folks who have run into this issue can try out the latest snapshot builds, and the upcoming 8.6 will include the fix for this issue.