作者andrew43 (Myrmarachne)
看板LaTeX
标题Re: [问题] 请问如何让章、节等标题自动套用中文字型
时间Sat Oct 18 21:29:43 2008
※ 引述《lovehoward (LOVE&PEACE)》之铭言:
: 我用的是 linux 下的 latex + CJK。
: 我知道在 cwtex 中有 \ctxfdef 可用,但是不晓得在 latex 中要怎麽写。
你的问题是如何自动地在 title 与 chapter/section/... 之处使用
特定的中文字型吗(在 latex + CJK 之下)?
我的做法是:使用 titlesec package,并配合 CJK package 的 \CJKfamily。
例子:
\usepackage{CJKutf8}
\usepackage{titlesec}
\titleformat{\section}%
[]%
{\huge\sffamily\bfseries\CJKfamily{cwheib}}%
{\thesection}%
{1em}%
{}%
[]%
就会在标题中使用 \sffamily\bfseries 与 cwheib 字型。
请再阅读 titlesec 的手册。
(我上面的例子并没有测试过,所以可能有小误,但方法差不多就这样。请
看看 titlesec package 的 manual 後多试试。)
至於 title 就直接在 \title{xxx} 中使用 \CJKfamily{} 即可。
--
http://apansharing.blogspot.com/
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.128.117.83
※ 编辑: andrew43 来自: 140.128.117.83 (10/18 21:30)
1F:推 lovehoward:谢谢! 10/20 12:07
※ 编辑: andrew43 来自: 140.128.117.83 (10/30 23:34)