Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- % caption and label
- \newcommand*{\caplab}[2]{\caption{#1}\label{#2}}
- % \myfig{file}{caption}{label}
- \newcommand{\myfig}[3]{%
- \begin{figure}[ht]%
- \begin{center}%
- \includegraphics[width=.8\linewidth]{#1}%
- \caplab{#2}{#3}%
- \end{center}%
- \end{figure}}
- % table for report \begin{mytable}[htbp]{caption}{label}{llrrcc...}
- \newenvironment*{mytable}[4][htbp]%
- {\begin{table}[#1]%
- \begin{center}%
- \caplab{#2}{#3}%
- \begin{tabular}{#4}}%
- {\end{tabular}%
- \end{center}%
- \end{table}}
- % これを\begin{document}の前とかに書いておいて,画像を入れる時は
- % \myfig{image.path}{caption}{fig:label}
- % 表を入れる時は
- % \begin{mytable}[htbp]{caption}{tab:label}{ll|rrcc...}
- % hoge & fuga &...\\
- % \end{mytable}
- % とかやるとキャプションをつけてくれて,ラベルも貼ってくれるから,\ref{fig:label}で参照したりできます
Add Comment
Please, Sign In to add comment