posts - 30,  comments - 3,  trackbacks - 0
  2016年5月27日
https://www.jianshu.com/p/ebf2e5b34aad
posted @ 2018-11-18 16:56 Seraphi 阅读(148) | 评论 (0)编辑 收藏
今天换了Macbook pro来写毕业论文,发现有一大堆中文相关的问题导致编译错误。经过一晚上的研究,终于解决。主要有以下要点:

1. 由于MacTex对CTex的支持并不如TexLive那么好,在用pkuthss 1.7.3模板写论文的时候,首先需要对pkuthss.cls文件进行修改:
需要将原来的\LoadClass[hyperref, cs4size, fntef, fancyhdr]{ctexbook}[2011/03/11]一行改为如下形式:
\LoadClass[fontset = windowsold,cs4size,UTF8,fancyhdr,hyperref,fntef,openany]{ctexbook}[2011/03/11]

2.在进行上述改动后,发现还是不行。提示simhei.ttf, simsong.ttc, simfang.ttf找不到。这个时候,需要将上述三种字体超链接到tex的目录下。

具体方法如下:
(1)在tex对应的下列目录建立Chinese文件夹:/usr/local/texlive/2016/texmf-dist/fonts/truetype/
(2)将SimHei SimSong Fangsong三种字体超链接到上述目录。这三种字体可以在/Library/Fonts/Microsoft中找到,注意的是放到tex下时,文件名需要小写,黑体和仿宋后缀名为.ttf,宋体为.ttc
(3)sudo texhash

3.再编译的时候发现已经可以了!Yeah~~~
posted @ 2017-02-28 22:13 Seraphi 阅读(505) | 评论 (0)编辑 收藏

I have successfully run your code after doing the following two steps:

  1. Download GLPK from

    http://sourceforge.net/projects/winglpk/files/latest/download (as mentioned by oyvind)

  2. Unzip it into (for example) : C:\glpk_is_here\
  3. Add GLPK binaries to your system path before running python C:\>set PATH=%PATH%;C:\glpk_is_here\glpk-4.55\w64

  4. Using the same cmd window from (3), use python/ipython to run your code:
    C:\>ipython your_code.py

  5. See the results Out[4]: 2.0

Good luck.

posted @ 2016-05-27 14:25 Seraphi 阅读(652) | 评论 (0)编辑 收藏