Rewew \fig command
This commit is contained in:
@@ -30,6 +30,17 @@
|
|||||||
\renewcommand{\tabref}[2][\labelprefix]{Table~\ref{#1:tab:#2}}
|
\renewcommand{\tabref}[2][\labelprefix]{Table~\ref{#1:tab:#2}}
|
||||||
|
|
||||||
% Images
|
% Images
|
||||||
|
% example: \fig[1]{universe}{The Universe}[Additional caption text, not shown in the list of figures]
|
||||||
|
% reference later with: \figref{universe}
|
||||||
|
\RenewDocumentCommand{\fig}{O{1} O{htbp} m m o}{%
|
||||||
|
\begin{figure}[#2]
|
||||||
|
\centering%
|
||||||
|
\includegraphics[width=#1\linewidth]{#3}%
|
||||||
|
\caption[#4]{#4\IfValueTF{#5}{ #5}}% voluntary space before the subfig titles
|
||||||
|
\label{fig:#3}%
|
||||||
|
\end{figure}%
|
||||||
|
}
|
||||||
|
|
||||||
% example:
|
% example:
|
||||||
% \begin{subfigs}{label}{Fig title}[Subfig titles]
|
% \begin{subfigs}{label}{Fig title}[Subfig titles]
|
||||||
% \subfig{subfig1}%
|
% \subfig{subfig1}%
|
||||||
|
|||||||
Reference in New Issue
Block a user