wisdomfusion / latex-templates

My ready-to-edit LaTeX templates, for books, articles, and notes, using XeLaTeX, specified both for Chinese and English documents.
MIT License
100 stars 40 forks source link

Problems with fonts and sty file #1

Closed buerlee closed 6 years ago

buerlee commented 6 years ago

Hello,

First, thanks for this awesome latex template. But I got some problems when running it. Could you help add fonts this templates need? And also the \RequirePackage{fontawesome5}.

Thank you.

wisdomfusion commented 6 years ago

fontawesome5 is included in TeXLive or MacTeX, if you install one of them, you could compile the TeX file successfully, or you could get it from CTAN packages.

I also supply Minion Pro, Myriad Pro, Courier Std, and FZ font series in the subfolder of progbookcn, for testing and study only.

Thanks for your interests in this repo and for your issue.

buerlee commented 6 years ago

Thanks for your quick reply. My tex is TeXLive 2017, and I also installed the fonts you uploaded, but it still got stuck. I google this issue, but didn't find the solution. Please help check it if you have time.

thank you.

$ xelatex book.tex This is XeTeX, Version 3.14159265-2.6-0.99998 (TeX Live 2017/W32TeX) (preloaded format=xelatex) restricted \write18 enabled. entering extended mode (./book.tex LaTeX2e <2017-04-15> Babel <3.14> and hyphenation patterns for 84 language(s) loaded. (./progbookcn.cls Document Class: progbookcn Jun, 2018 Yet Another LaTeX Template for Programming or Technical Books (c:/texlive/2017/texmf-dist/tex/latex/ctex/ctexbook.cls (c:/texlive/2017/texmf-dist/tex/latex/l3kernel/expl3.sty (c:/texlive/2017/texmf-dist/tex/latex/l3kernel/expl3-code.tex) (c:/texlive/2017/texmf-dist/tex/latex/l3kernel/l3xdvipdfmx.def)) Document Class: ctexbook 2017/08/07 v2.4.10 Chinese adapter for class book (CTE X) (c:/texlive/2017/texmf-dist/tex/latex/l3packages/xparse/xparse.sty) (c:/texlive/2017/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty) (c:/texlive/2017/texmf-dist/tex/latex/ctex/ctexhook.sty) (c:/texlive/2017/texmf-dist/tex/latex/ctex/ctexpatch.sty) (c:/texlive/2017/texmf-dist/tex/latex/base/fix-cm.sty (c:/texlive/2017/texmf-dist/tex/latex/base/ts1enc.def)) (c:/texlive/2017/texmf-dist/tex/latex/ms/everysel.sty) (c:/texlive/2017/texmf-dist/tex/latex/ctex/config/ctexopts.cfg) (c:/texlive/2017/texmf-dist/tex/latex/base/book.cls Document Class: book 2014/09/29 v1.4h Standard LaTeX document class (c:/texlive/2017/texmf-dist/tex/latex/base/bk10.clo

wisdomfusion commented 6 years ago

@buerlee To quickly debug this problem, you can comment out the fonts settings in cls as follows, to check whether the fonts you installed work fine:

`\setCJKmainfont[BoldFont={方正小标宋_GBK}, ItalicFont={方正楷体_GBK}, BoldItalicFont={方正仿宋_GBK}]{方正书宋_GBK} \setCJKsansfont{方正黑体_GBK} \setCJKmonofont{方正中等线_GBK}

\newfontfamily\fzss{方正书宋_GBK} \newfontfamily\fzxbs{方正小标宋_GBK} \newfontfamily\fzhei{方正黑体_GBK} \newfontfamily\fzkai{方正楷体_GBK} \newfontfamily\fzfs{方正仿宋_GBK} \newfontfamily\fzzdx{方正中等线_GBK}`

I'll install both 2017 and 2018 to test the cls file further, and sorry to put you into the trubles. :)

buerlee commented 6 years ago

Wow, thanks a lot for your quick response. Maybe it's the texlive version's problem, and I will install texlive 2018 and run it.

buerlee commented 6 years ago

Hello Zhifei,

I just try your code on TexLive 2018, it works well. Thanks a lot for your help again.

wisdomfusion commented 6 years ago

@buerlee I had install TeXLive 2016, and tried to compile these files, got errors expectedly.

So, I spend some time to adjust the cls, to make it compatible with TeXLive 2016, and downgrade fontawesome from fontawesome5 to fontawesome (cause I attempted to install fontawesome5 on TeXLive 2016 and got failure result after sereval methds tried :( ).

And now, it certainly could be compiled on TeXLive 2016 and 2017, and also MacTeX.

Hope it helps.

wisdomfusion commented 6 years ago

@buerlee That's great you upgrade your TeXLive system to the latest version, I got a bit despirted after the attempt to install and update CTAN packages.

buerlee commented 6 years ago

Thanks a lot for your time and your patience. I really appreciate it. Yes, today I installed texlive 2018 version, and it did work well. I know it takes time to fix some problems when running latex, but when you see the elegant layout of your paper or report, you know it's an artwork or a masterpiece. Maybe someone doesn't care about the layout, but we care about the content, but also the layout. We want it to be a perfect work.

thank you again.

wisdomfusion commented 6 years ago

@buerlee Yes, we do, and I'll continually polish these templates to make them better. :)

buerlee commented 6 years ago

Hello again, I want to learn how to write my own cls file, do you have some good suggestions or tutorials to recommend to me?

Thank you.