[問題] 中文章節標題

看板LaTeX (論文排版)作者 (喵喵叫的蜜蜂貓)時間15年前 (2010/10/12 12:47), 編輯推噓0(001)
留言1則, 1人參與, 最新討論串1/3 (看更多)
雖然理論上應該用 titlesec 配合 titleformat 可是不管我怎麼弄...就是會編錯 錯誤信息是 Nested titles,怎麼Google都找不到相關資料 最後只好用更底層的操作去處理 使用系統: Win7x64, MiKTeX 2.9, XeCJK 目標: 如下的呈現 一、範例章 1 範例節 二、 三、 1 2 =========普通的方法 \setcounter{secnumdepth}{2} \renewcommand{\thesection}{\CJKnumber{\arabic{section}}、} \renewcommand{\thesubsection}{\arabic{subsection}} 不過這樣原始的\quad還是會在,只好找更底層的方法 =========底層的方法 \setcounter{secnumdepth}{2} \makeatletter \def\@seccntformat#1{\@ifundefined{#1@cntformat}% {\csname the#1\endcsname\quad} % default {\csname #1@cntformat\endcsname} % individual control } \def\section@cntformat{\CJKnumber{\thesection}、} \def\subsection@cntformat{\arabic{subsection}\quad} \makeatother 這樣的話就能達到目標 ================== 不過可以的話我比較希望是解決titlesec的問題 底層的操作怕以後做索引會出問題 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 122.116.180.163

10/12 14:39, , 1F
這真的是用 titlesec 就可以了. 貼上你失敗的原始碼吧.
10/12 14:39, 1F
\documentclass[11pt,a4paper,notitlepage]{article} \usepackage{color} \usepackage{graphicx} \usepackage{multicol} \usepackage{float} \usepackage{multirow} %表直行 \usepackage{siunitx} %標準符號 \usepackage[BoldFont,SlantFont,CJKnumber,CJKchecksingle]{xeCJK} \usepackage[pdfborder={0 0 0},bookmarksnumbered=true]{hyperref} \usepackage{type1cm} \usepackage[plain]{fancyref} \setCJKmainfont{標楷體} \setromanfont{Times New Roman} \XeTeXlinebreaklocale "zh" \XeTeXlinebreakskip = 0pt plus 1pt \usepackage[margin=2cm,noheadfoot]{geometry} %BMES 2010 標準 邊距2cm \columnwidth 7.75cm %BMES 2010 標準 欄寬7.75cm \pagestyle{empty} %BMES 2010 標準 無頁首頁尾 \setcounter{secnumdepth}{2} \makeatletter \def\@seccntformat#1{\@ifundefined{#1@cntformat}% {\csname the#1\endcsname\quad}% default {\csname #1@cntformat\endcsname}% individual control } \def\section@cntformat{\CJKnumber{\thesection}、} \def\subsection@cntformat{\arabic{subsection}\quad} \makeatother \renewcommand\figurename{圖~} \renewcommand\tablename{表~} \renewcommand\refname{\section{參考文獻}} \renewcommand{\arraystretch}{1.2} % 表格行距 x1.2 \begin{document} ==============中略============= \bibliographystyle{p1} \bibliography{p1} \end{multicols} \end{document} ※ 編輯: SmallBeeWayn 來自: 122.116.180.163 (10/13 02:13)
文章代碼(AID): #1Ci-XGS4 (LaTeX)
討論串 (同標題文章)
文章代碼(AID): #1Ci-XGS4 (LaTeX)