
[배경: 공간과 인내심이 부족하여 시스템 드라이브를 지우고 Catalina를 제로에서 다시 설치했습니다. 지금은 제가 사용하는 모든 응용 프로그램을 하나씩 다시 설치하고 있습니다.] MacTex를 다음에서 설치했습니다.http://www.tug.org/mactex/mactex-download.html대체로 작동하지만 라이선스와 관련 파일이 있는 추가 무료 글꼴인 Sabon을 설치해야 합니다. 몇 년 전 나 자신에게 쓴 메모에는 (한 번에 준비한 sabon2.tgz 파일이 있고 Sabon 관련 파일이 포함된 디렉터리 구조가 포함되어 있음) 에 개인 texmf 디렉터리를 만들어야 한다고 나와 있습니다 ~/Library/texmf/
. 거기에,
tar zxvf sabon2.tgz
texhash
updmap --enable Map=psb.map
Linux에서 작동했던 방법을 적용한 이 방법은 2017년경 Mac에서 성공적으로 작동했습니다. 그동안 변경한 사항이 있으면 기록하는 것을 잊어버렸습니다. 그러나 오늘 내 지시사항을 시도해 보았지만 효과가 없었습니다. Texhash는 여러 디렉토리에 쓸 수 없다고 말했습니다.
$ texhash
texhash: /usr/local/texlive/2020/texmf-config: directory not writable. Skipping...
texhash: /usr/local/texlive/2020/texmf-dist: directory not writable. Skipping...
texhash: /usr/local/texlive/2020/texmf-var: directory not writable. Skipping...
texhash: /usr/local/texlive/texmf-local: directory not writable. Skipping...
texhash: Done.
나는 texhash를 sudo로 실행하여 문제를 해결했지만 그것이 내가 해야 할 일인지는 잘 모르겠습니다. 자주 묻는 질문 QM05https://tug.org/mactex/faq/faq.html#qm05~/Library/texmf에 파일을 추가할 때 texhash를 실행할 필요가 없다고 되어 있으므로 2020년에는 이 단계가 불필요해질 것으로 추정합니다. 자, 그럼 다음으로 넘어갑니다. 다음 실패:
$ updmap --enable Map=psb.map
updmap [ERROR]: Either -sys or -user mode is required.
updmap [ERROR]: In nearly all cases you should use updmap -sys.
updmap [ERROR]: For special cases see https://tug.org/texlive/scripts-sys-user.html
오류 메시지 다음에 -sys를 추가합니다...
$ updmap -sys --enable Map=psb.map
updmap will read the following updmap.cfg files (in precedence order):
/usr/local/texlive/2020/texmf-dist/web2c/updmap.cfg
updmap may write changes to the following updmap.cfg file:
/usr/local/texlive/2020/texmf-config/web2c/updmap.cfg
updmap: can't write to /usr/local/texlive/2020/texmf-config/web2c/updmap.cfg: Permission denied at /Library/TeX/texbin/updmap line 1589.
...하지만 다시 권한 오류가 발생했습니다. 여기에도 sudo를 추가하고 다시 시도합니다.
$ sudo updmap -sys --enable Map=psb.map
updmap [WARNING]: resetting $HOME value (was /Users/XXX) to root's actual home (/var/root).
updmap will read the following updmap.cfg files (in precedence order):
/usr/local/texlive/2020/texmf-dist/web2c/updmap.cfg
updmap may write changes to the following updmap.cfg file:
/usr/local/texlive/2020/texmf-config/web2c/updmap.cfg
Creating new config file /usr/local/texlive/2020/texmf-config/web2c/updmap.cfg
dvips output dir: "/usr/local/texlive/2020/texmf-var/fonts/map/dvips/updmap"
pdftex output dir: "/usr/local/texlive/2020/texmf-var/fonts/map/pdftex/updmap"
dvipdfmx output dir: "/usr/local/texlive/2020/texmf-var/fonts/map/dvipdfmx/updmap"
updmap [ERROR]: The following map file(s) couldn't be found:
updmap [ERROR]: psb.map (in /usr/local/texlive/2020/texmf-config/web2c/updmap.cfg)
updmap [ERROR]: Did you run mktexlsr?
You can disable non-existent map entries using the option
--syncwithtrees.
updmap이 psb.map을 찾을 수 없는 이유는 psb.map이 내 사용자의 ~/Library/texmf에 있기 때문이라고 생각합니다. 하지만 updmap을 루트로 실행하면 해당 위치를 검색하지 않습니다. 반면에 직접 실행하면 파일을 업데이트할 수 없습니다.
이 질문 덕분에,로컬 글꼴 설치 문제, 공백 없이 updmap-sys를 작성할 수 있고 sudo 없이도 작동한다는 것을 알았습니다.
$ updmap-sys --enable Map=psb.map
updmap will read the following updmap.cfg files (in precedence order):
/usr/local/texlive/2020/texmf-config/web2c/updmap.cfg
/usr/local/texlive/2020/texmf-dist/web2c/updmap.cfg
updmap may write changes to the following updmap.cfg file:
/usr/local/texlive/2020/texmf-config/web2c/updmap.cfg
/usr/local/texlive/2020/texmf-config/web2c/updmap.cfg unchanged. Map files not recreated.
updmap: Updating ls-R files.
이제 해당 파일에는 "Map psb.map"이라는 한 줄이 포함되었습니다.
$ cat /usr/local/texlive/2020/texmf-config/web2c/updmap.cfg
Map psb.map
그러나 Sabon을 사용한 잘 알려진 tex 파일을 컴파일할 때 다음과 같은 결과를 얻었습니다.
$ pdflatex test.tex
...
kpathsea: Running mktexpk --mfmode / --bdpi 600 --mag 1+264/600 --dpi 864 psbb8r
mktexpk: don't know how to create bitmap font for psbb8r.
mktexpk: perhaps psbb8r is missing from the map file.
kpathsea: Appending font creation commands to missfont.log.
(see the transcript file for additional information)
!pdfTeX error: pdflatex (file psbb8r): Font psbb8r at 864 not found
==> Fatal error occurred, no output PDF file produced!
애초에 비트맵 글꼴을 생성하려는 이유는 무엇입니까? 어쨌든 나는 벡터 글꼴을 원합니다. 이제 더 이상 20세기가 아닙니다.
내가 무엇을 놓치고 있으며 대신 무엇을 해야 합니까?
답변1
의견에서 몇 가지 논의를 거친 후 가장 좋은 해결책은 TEXMFLOCAL
(여기, /usr/local/texlive/texmf-local
) 대신 디렉터리( TEXMFHOME
여기, ~/Library/texmf
)에 파일의 압축을 푸는 것이었습니다.
MacTeX FAQ에서는 후자에 로컬 파일을 넣을 것을 권장하지만 8비트 글꼴 맵은 예외입니다. updmap
사용자 모드에서는 실행하고 싶지 않습니다 . 이는 시스템 글꼴 맵을 보완하는 대신 무시하고 시스템 트리를 업데이트할수록 점점 더 오래된 것이 되는 함정입니다. 단, updmap-sys
검색하지 않습니다 TEXMFHOME
.