bit2r / bitPublish

Quarto extension for a template to publish a PDF book with LaTeX styling.
GNU General Public License v2.0
7 stars 2 forks source link

Package fontspec Error: The font "STIXTwoText-Regular" cannot be found. #22

Closed statkclee closed 1 year ago

statkclee commented 1 year ago

참고로 윈도우 환경에서... 테스트 하였습니다.

  1. texlive 2023 제거하고 tinytex 설치
  2. tinytex은 quarto install tinytex 으로 설치 --> *.sty 패키지 잘 설치됨 (R 유저를 위한 R 환경에서 설치하면 어떨지 모름 --> 패키지도 잘 설치가 안된 것으로 기억됨)
  3. STIXTwoText 글꼴 설치에 preview 도 그렇고... render 도 오류가 생깁니다.
$ quarto render --to bitPublish-pdf
pandoc
  to: latex
  output-file: index.tex
  standalone: true
  toc: true
  number-sections: true
  top-level-division: chapter
  pdf-engine: xelatex
  variables:
    graphics: true
    tables: true
  default-image-extension: pdf
  cite-method: biblatex

metadata
  crossref:
    chapters: true
    fig-title: 그림
    tbl-title: 표
  documentclass: book
  papersize: letter
  block-headings: true
  geometry:
    - paper=a4paper
    - layoutwidth=190mm
    - layoutheight=260mm
    - layouthoffset=10mm
    - layoutvoffset=18.5mm
    - showcrop
    - top=20mm
    - headsep=10mm
    - bottom=30mm
    - footskip=15mm
    - left=25mm
    - right=25mm
    - centering
  fig-cap-location: bottom
  tbl-cap-location: bottom
  toc-title: 목차
  linkcolor: highlight
  urlcolor: highlight
  lang: ko-KR
  link-citations: false
  title: bitPublish를 이용하여 한글 책 조판하기

running xelatex - 1
  This is XeTeX, Version 3.141592653-2.6-0.999995 (TeX Live 2023) (preloaded format=xelatex)
   restricted \write18 enabled.
  entering extended mode

updating tlmgr

updating existing packages
finding package for STIXTwoText-Regular(-(Bold|Italic|Regular).*)?[.](tfm|afm|mf|otf|ttf)
> 1 package to install
> installing stix2-otf (1 of 1)
  This is XeTeX, Version 3.141592653-2.6-0.999995 (TeX Live 2023) (preloaded format=xelatex)
   restricted \write18 enabled.
  entering extended mode

finding package for STIXTwoText-Regular(-(Bold|Italic|Regular).*)?[.](tfm|afm|mf|otf|ttf)

compilation failed- package installation error
Package fontspec Error: The font "STIXTwoText-Regular" cannot be found.

For immediate help type H <return>.
 ...

l.115 ]

see D:\tcs\pdf\index.log for more information.
(base)
choonghyunryu commented 1 year ago

@statkclee,

개발 버전과 운영 버전에서의 폰트 경로가 다른데, 개발 버전이 배포되어 폰트를 찾지 못했습니다. 수정했으니 다시 작업해 보시고 이상 여부를 알려주세요.

감사합니다.

statkclee commented 1 year ago

이번에는 KoPubWorld바탕체_Pro(-(Bold|Italic|Regular).*)?. 문제입니다... ㅠㅠ

$ quarto render --to bitPublish-pdf
[1/6] index.qmd
[2/6] chap_exams.qmd

processing file: chap_exams.qmd

output file: chap_exams.knit.md

[3/6] chap_intro_bitpublish.qmd

processing file: chap_intro_bitpublish.qmd
  |...                                                |   6% (unnamed-chunk-3)    |....................                               |  39% (unnamed-chunk-20)   |...............................                    |  61% (fig-hist2)          |................................................   |  94% (unnamed-chunk-50)                                                                                 
output file: chap_intro_bitpublish.knit.md

There were 44 warnings (use warnings() to see them)
[4/6] chap_troubleshooting.qmd

Starting python3 kernel...Done

Executing 'chap_troubleshooting.ipynb'

[5/6] chap_version.qmd
  |

processing file: chap_version.qmd

output file: chap_version.knit.md

[6/6] references.qmd

pandoc
  to: latex
  output-file: index.tex
  standalone: true
  toc: true
  number-sections: true
  top-level-division: chapter
  pdf-engine: xelatex
  variables:
    graphics: true
    tables: true
  default-image-extension: pdf
  cite-method: biblatex

metadata
  crossref:
    chapters: true
    fig-title: 그림
    tbl-title: 표
  documentclass: book
  papersize: letter
  block-headings: true
  geometry:
    - paper=a4paper
    - layoutwidth=190mm
    - layoutheight=260mm
    - layouthoffset=10mm
    - layoutvoffset=18.5mm
    - showcrop
    - top=20mm
    - headsep=10mm
    - bottom=30mm
    - footskip=15mm
    - left=25mm
    - right=25mm
    - centering
  fig-cap-location: bottom
  tbl-cap-location: bottom
  toc-title: 목차
  linkcolor: highlight
  urlcolor: highlight
  lang: ko-KR
  bibliography:
    - references.bib
  link-citations: false
  title: bitPublish를 이용하여 한글 책 조판하기

running xelatex - 1
  This is XeTeX, Version 3.141592653-2.6-0.999995 (TeX Live 2023) (preloaded format=xelatex)
   restricted \write18 enabled.
  entering extended mode

updating tlmgr

updating existing packages
finding package for KoPubWorld바탕체_Pro(-(Bold|Italic|Regular).*)?[.](tfm|afm|mf|otf|ttf)

compilation failed- no matching packages
Package fontspec Error: The font "KoPubWorld바탕체_Pro" cannot be found.

For immediate help type H <return>.
 ...

l.330 \newcommand
                 *\quotesize{40} % if quote size changes, need a way to make...

see D:\tcs\pdf\index.log for more information.
(base)
choonghyunryu commented 1 year ago

@statkclee,

감사합니다. 이 부분의 패치를 올려주셨네요.

제 환경에서는 폰트북에 이미 등록된 폰트라, 폰트 디렉토리가 아닌 폰트북에서 폰트를 찾아서 에러가 없었습니다.

이 문제는 해결된 것 같으니, 며칠 후 이슈를 닫겠습니다.