Coder Social home page Coder Social logo

Comments (17)

ICE-GB avatar ICE-GB commented on May 19, 2024 1

\documentclass[fontset=ubuntu]{article} %字体设置为Ubuntu
\usepackage{ctex} %引入CTeX宏包

可以设置fontset为Ubuntu,这样他就改用Ubuntu的配置文件了,就不会去找FandolSong-Regular这个字体了

from buptbachelorthesis.

sheng-qiang avatar sheng-qiang commented on May 19, 2024

这个CSDN博客中的方法不知道你有没有尝试过:https://blog.csdn.net/up_com/article/details/51099928

终极解决方案是,改用Windows写……

from buptbachelorthesis.

melyseengit avatar melyseengit commented on May 19, 2024

感谢回复!
我有一个不理解的地方是在主目录下搜索提示缺失的字体没有一个地方使用了,这个错误为什么会出现呢?

另外,请问外链是怎么添加的?

from buptbachelorthesis.

sheng-qiang avatar sheng-qiang commented on May 19, 2024

ctex宏包中有默认字体设置,即便你没有使用它。

如果希望有可以点击的外链,请搜索url宏包的使用。

from buptbachelorthesis.

melyseengit avatar melyseengit commented on May 19, 2024

感谢回复!
我下载了字体,安装好之后仍然报错,目前正在排查,如果找到错误原因我会更新。

renew:

solved
[text here](url here)

任何相关的疑问、链接、解决都是受欢迎的,请发布comment。
如果后续解决,我会更新这里。

from buptbachelorthesis.

sheng-qiang avatar sheng-qiang commented on May 19, 2024

其实我并不知道你的URL为什么会那样,我给出的CSDN链接,就是直接粘贴过来的,没有什么问题……

from buptbachelorthesis.

melyseengit avatar melyseengit commented on May 19, 2024

感谢回复!

已解决(成功编译)

  • linux用户:

    • 确保系统安装字体
    • 修改BUPTthesisbachelor.sty文件line22为:
      \usepackage[fontset=windows]{ctex} % invole CJKfntef
    • 理由:因为ctex现在会自动检测系统,如果是linux系统会自动调用Fandol字体。
  • mac用户:
    把相应字体从~/Library/Fonts移动到/Library/Fonts。
    ref:sjtug/SJTUThesis#168

  • 未能解决的问题:写小文件测试是可以找到Fandol字体并成功编译的,但是编译main.tex会报error,找不到字体。

    • hint:报错前输出关键词kpathsea : running mktexmf OT \n ! I can't find file `OT'
    • 图示:
      screenshot from 2018-05-18 17-02-51

任何相关的疑问、链接、解决都是受欢迎的,请发布comment。
如果后续解决,我会更新这里。

from buptbachelorthesis.

lsq avatar lsq commented on May 19, 2024

我也出现同样的问题,CSDN博客中的方法没用
screenshot_20180528-092052
texlive里面有Fandol字体,xelatex编译的时候找不到, fc-list 也能找到字体,就是编译找不到

from buptbachelorthesis.

sheng-qiang avatar sheng-qiang commented on May 19, 2024

@lsq
可以尝试@JoyBeginner的方案
(如果不行就换Win吧……)

from buptbachelorthesis.

lsq avatar lsq commented on May 19, 2024

@sqyx008 已尝试,在linux下好像问题没有解决 @JoyBeginner ,你的方案一还报错吗?

from buptbachelorthesis.

lsq avatar lsq commented on May 19, 2024

@JoyBeginner 试了几天了,不是字体的原因,也不是ctex-fontset-fandol.def 配置文件的原因,也不是 fontspec 按文件名选字体的原因,不理解为什么只有在编译main.tex时有问题

from buptbachelorthesis.

sheng-qiang avatar sheng-qiang commented on May 19, 2024

@lsq 只有main.tex有问题的意思是,如果你自己再造一个使用相同packages的中文.tex文件,是没有问题的么?

from buptbachelorthesis.

lsq avatar lsq commented on May 19, 2024

@sqyx008 在linux下把xetex的debug选项打开,看不出原因啊!
也重新试了相同usepackage一个新中文tex,完全没问题,应该就是sty文件的原因
screenshot_20180529-212203

from buptbachelorthesis.

melyseengit avatar melyseengit commented on May 19, 2024

@lsq

  1. 确保系统安装sty文件里用的字体(字体拷贝过来以后fc-cashe更新一下缓存,fc-list看一下字体)
  2. fontspec设置为Windows

我之前也是单独测试Fandol字体没问题,但是不设置windows编译main.tex报错,目前没有找到原因。

如果仍然不能解决问题,尽快换Windows,很抱歉看到得晚了,不知道对你是否还有帮助。

找到解决方法后我会更新这里。

from buptbachelorthesis.

paulwong16 avatar paulwong16 commented on May 19, 2024

@JoyBeginner 的方法在Ubuntu16.04下是有效的,thx。

另:ubuntu下tex live默认配置编译后生成的pdf里,章节名称缺少数字序号。暂未找到具体原因。解决方案是打开terminal在编译一遍:xelatex main.tex

from buptbachelorthesis.

realyanyang avatar realyanyang commented on May 19, 2024

误打误撞解决了问题:把BUPTthesisbachelor.sty中的50行\renewcommand{\normalsize}{\xiaosihao\songti\normalfont}改为\renewcommand{\normalsize}{\xiaosihao\normalfont}即可成功编译(但是依然有FandolSong-Regular字体的警告),并且格式看起来貌似没有问题。

本机环境:Ubuntu 18.04
tex version:

>>>tex --version
TeX 3.14159265 (TeX Live 2017/Debian)
kpathsea version 6.2.3
Copyright 2017 D.E. Knuth.
There is NO warranty.  Redistribution of this software is
covered by the terms of both the TeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the TeX source.
Primary author of TeX: D.E. Knuth.

编译方式:xelatex-->bibtex-->xelatex*2

尝试\renewcommand自定义的命令时带着\songti是可以的,但\renewcommand{\normalsize}时带着\songti就会有问题,希望有大佬可以解答:pray:

from buptbachelorthesis.

REAL7MADRID avatar REAL7MADRID commented on May 19, 2024

在mac上遇到相同的问题,已尝试解决如下:将main.tex的第五行改为\documentclass[fontset=windows,a4paper,AutoFakeBold,oneside,12pt]{book}

即使用Windows下的字库,可成功编译。

from buptbachelorthesis.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.