Re: [問題] 關於圖形的caption (己爬文)
※ 引述《sherryshin (想飛)》之銘言:
: 請問一下,在article模式中,如何能使得載入圖形的名稱改為
: Fig.section.subsection....
: 意即,我希望能像在book模式中產生出
: Fig 3.1.1
: Fig 3.1.2
: Fig 3.2.1
首先, book class 的 figure 是 [chapter].[figure in this chapter],
或是在沒有任何 chapter 被定義的情況下為 [figure in this chapter],
而非你所述.
: 等
: 我目前只會將內建的Figure 改成Fig
: 無法將1,2,3...改成3.1.1 3.1.2 3.1.3
: 請問要如何改呢?
% 複製 \subsection 命令
\let\oldsubsection\subsection
% 每次 \subsection{} 後自動將 figure 歸零
\renewcommand{\subsection}[1]{\oldsubsection{#1}\setcounter{figure}{0}}
% 指定 fiugre 計數器為 \thesubsection.\arabic{figure}
\renewcommand{\thefigure}{\thesubsection.\arabic{figure}}
以 \documentclass{article} 為前題,
上面六列放在前置區即可.
要注意的是, 若在某 section 中沒有任何 subsection 就放了 figure,
那就會變成該 subsection = 0 的情況 (如 1.0.3 表示第一節第零小節的第三張圖).
這樣好像怪怪的, 要注意一下.
--
http://apansharing.blogspot.com/
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.128.117.86
※ 編輯: andrew43 來自: 140.128.117.86 (04/15 02:57)
→
04/15 12:48, , 1F
04/15 12:48, 1F
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 2 之 2 篇):