Re: [問題] bib自訂編號後,cross ref仍是預設號
: → Marsden: \cite 應該是可行的, 不過要重新定義 \@auxout 03/05 01:03
: → Marsden: \write\@auxout{\string\bibcite{#1}{\thepointnumber}} 03/05 01:17
就像上面推文中提到的,使用 \cite 的時候他的編號是從生成的 .aux
檔中去抓出來的,所以要更動一下。
大概這樣:
\def\@bibitem#1{%
\item
\immediate\write\@auxout{\string\bibcite{#1}{\thepointnumber}}%}
不過放置的位置要喬一下,不然會一直跟最後的 num 差 1
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.112.35.232
※ 文章網址: https://www.ptt.cc/bbs/LaTeX/M.1488648548.A.2C5.html
推
03/05 01:33, , 1F
03/05 01:33, 1F
→
03/05 01:35, , 2F
03/05 01:35, 2F
推
03/05 01:40, , 3F
03/05 01:40, 3F
→
03/05 01:42, , 4F
03/05 01:42, 4F
推
03/05 01:52, , 5F
03/05 01:52, 5F
推
03/05 01:56, , 6F
03/05 01:56, 6F
ㄝ抖,上面的方法是根據原文中你額外定義的計數器來作用的
不過我們似乎可以直接使用 \bibitem 的 counter
https://goo.gl/gDyb3J
這樣直接更動 counter 或許更直接
不用如您上面那般額外定義一個計數器
也較不會出錯
代碼如下:
----------------------------------
%Bibliographic references
\begin{thebibliography}{99}
\makeatletter
\setcounter{\@listctr}{8}
\def\@bibitem#1{% \item \if@filesw
\immediate\write\@auxout{\string\bibcite{#1}{\csname
the\@listctr\endcsname}}% \fi\ignorespaces \addtocounter{\@listctr}{-2}}
\makeatother
\bibitem{my2017paper} my 2017 paper
\bibitem{my2016paper} my 2016 paper
\bibitem{my2015paper} my 2015 paper
\bibitem{my2014paper} my 2014 paper
\bibitem{my2011paper} my 2011 paper
\end{thebibliography}
---------------------------------
推
03/05 02:17, , 7F
03/05 02:17, 7F
因為我忘記 bibitem 本身是讓 counter 加一了 xDDD
上面這樣應該就可以了,可是這樣好像就沒差多少了0.0
※ 編輯: Marsden (140.112.35.232), 03/05/2017 02:37:52
推
03/05 06:01, , 8F
03/05 06:01, 8F
推
03/10 01:59, , 9F
03/10 01:59, 9F
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 2 之 2 篇):
LaTeX 近期熱門文章
PTT數位生活區 即時熱門文章