• 在conf.py中 修改, 加入 ctex包

latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper', # The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt', # Additional stuff for the LaTeX preamble.
#'preamble': '', # Latex figure (float) alignment
#'figure_align': 'htbp', 'preamble' : r'''
\usepackage[UTF8,fontset=windows]{ctex} % Chinese
\hypersetup{bookmarks,pdfstartview=FitH}
''',
}

mac下字体配置, latex_engine = 'xelatex'

'preamble' : r'''
% \usepackage[UTF8,fontset=windows]{ctex} % Chinese
% \hypersetup{bookmarks,pdfstartview=FitH} \usepackage{xeCJK}
\usepackage{indentfirst}
\setlength{\parindent}{2em} \setCJKmainfont[BoldFont=STZhongsong, ItalicFont=STKaiti]{STSong}
\setCJKsansfont[BoldFont=STHeiti]{STXihei}
\setCJKmonofont[Scale=0.9]{STFangsong}
\setCJKfamilyfont{sf}{STXihei}
\XeTeXlinebreaklocale "zh"
\XeTeXlinebreakskip = 0pt plus 1pt
'''
  • svg转png格式, MacOS
qlmanage -t -s 2000 -o . *.svg

for f in `ls *.svg`; do    mv $f $f.bak;   done
for f in `ls *.svg.bak`; do g=${f%%.svg.bak}; mv $g.svg.png $g.png; done
  • macos中 qlmanage 函数
alias qlf='qlmanage -p "$@"  > /dev/null 2>&1'
05-28 10:25