作者QQrzQQ (QQ)
看板LaTeX
標題Re: [問題] 怎麼讓label顯現自己想要的字
時間Wed May 5 14:38:25 2010
※ 引述《killyou (xxx)》之銘言:
: ===============CODE================
: \appendix %附錄開始
: \section{name of 1st appendix}\label{app:a} %會自動用A,B,C,...編號
: \section{2nd}
: ...
: when use ref will appear Appendix \ref{app:a}
: ===============RESULT==============
: A name of 1st appendix
: B 2nd
: ...
: when use ref will appear Appendix A
: Wish it helps you.
首先先謝謝您 提供的方法
上面的方法 可以解決我提到的問題
可是因為我的Appendix標題要很大 = =+
可能是
Appendix A
內文...........
所以在我採用的模板 (元智大學老師提供)
\appendix
%%% 每一個附錄 (附錄甲、附錄乙、...) 都要複製此段附錄編排碼做為起頭
%%% 附錄編排碼 begin >>>
\newpage
\chapter*{Appendix A} % 修改附錄編號與你的附錄名
\label{app:a} %%% 我加的部分
\phantomsection % for hyperref to register this
\addcontentsline{toc}{chapter}{Appendix A} %建議此內容應與上行相同
%\setcounter{chapter}{0} %如果用的是 TeXLive2007 則打開此行以避免錯誤
\setcounter{equation}{0}
\setcounter{figure}{0}
\setcounter{footnote}{0}
\setcounter{section}{0}
\setcounter{subsection}{0}
\setcounter{subsubsection}{0}
\setcounter{table}{0}
\renewcommand{\thechapter}{A} % 如果是附錄乙,則內容應為{乙}
%%% <<< 附錄編排碼 end
原本應該把label加在\chapter*後面
可是因為*會讓chapter隱藏不顯示
好像也會造成label編號會接續前面的章節...
當我把\chapter*{Appendix A} 改成 \chapter{Appendix A}
就會變成
Chapter A Appendix A
內文.......
但是label就可以正確顯示
但是會多一個標題
所以現在還是不知道要怎麼樣
才能排到想要的樣子....
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.116.187.146
1F:→ killyou:問題是counter? \setcount{chapter}{n} 下一章從n+1起跳 05/06 11:03
2F:→ killyou:\alph{counter},\Alph{counter},\arabic{counter}編號種類 05/06 11:06
3F:→ QQrzQQ:改counter好像行不通~~ 05/08 08:54