๐ป OS & Tools/LaTeX
LaTeX figure ๋ฃ๊ธฐ
๋ณต๋ง
2022. 7. 6. 14:26
LaTex์์ figure์ ์ฌ์ฉํ๊ธฐ ์ํด์๋ graphics
package๋ฅผ ์ ์ธํด์ผ ํ๋ค.
\usepackage{graphicx}
LaTeX์ ๋ค์ด๊ฐ๋ figure์ ์ผ๋ฐ์ ์ผ๋ก ๋ค์๊ณผ ๊ฐ์ด ๊ตฌ์ฑ๋๋ค.
\begin{figure}[!t]
\centerline{\includegraphics[width=\columnwidth]{figure.png}}
\caption{This is the first figure.}
\label{figure_1}
\end{figure}
- Figure์ ๋ด์ฉ์
\begin{figure}
๊ณผ\end{figure}
์ฌ์ด์ ์์นํ๋ค. - [!t]๋ figure์ด ๋์ผ ์ ์๋ ์์น๋ฅผ ์๋ฏธํ๋ค. ๋ค์ ์ค ํ๋ ์ด์์ option์ ์ฌ์ฉํ ์ ์๋ค. ๋จ, ์์๋๋ก ์ ์ฉ๋๋ ๊ฒ์ ์๋๋ค. ๋๋ถ๋ถ์ ๊ฒฝ์ฐ default ๊ฐ์ tbp์ด๋ค. (์ฐธ๊ณ )
- !:๊ธฐ์กด์ ์ค์ ์ ๋ฌด์ํ๊ณ figure ์์น๋ฅผ override
- h: ํ์ฌ ์์น(here)
- t: page์ ๊ฐ์ฅ ์(top)
- b: page์ ๊ฐ์ฅ ์๋(bottom)
- p: ๋ณ๋์ ์๋ก์ด page
\centerline{}
์ figure์ ๊ฐ์ด๋ฐ์ ๋ ฌํ๊ธฐ ์ํจ์ด๋ค.- width๋ก figure์ ํฌ๊ธฐ๋ฅผ ์กฐ์ ํ ์ ์๋ค.
\columnwidth
๋\textwidth
๋ฑ์ macro๋ฅผ ์ฌ์ฉํด๋ ๋๊ณ , ์ง์ mm/in ๋จ์์ ์์น๋ฅผ ์ ๋ ฅํ ์๋ ์๋ค (ex:width=88mm
). - ํ์ฌ .tex ํ์ผ๊ณผ ๊ฐ์ ์์น์ figure์ ํ์ผ๋ช ์ผ๋ก ๋ถ๋ฌ์ฌ ์ ์๋ค. ํ์ directory ๋ด์ ์๋ ๊ฒฝ์ฐ ๊ฒฝ๋ก+ํ์ผ๋ช ์ผ๋ก ๋ถ๋ฌ์๋ ๋๋ค.
\cation{}
์ figure์ caption(์ค๋ช )์ ์๋ฏธํ๋ค.\label{}
์ figure์ ์ฐธ์กฐํ๊ธฐ ์ํ label ์ด๋ฆ์ด๋ค. Text ๋ด์์\ref{figure_1}
๊ณผ ๊ฐ์ด ํด๋น figure์ ์ฐธ์กฐํ ์ ์๋ค.
๋ง์ฝ two-column ํ์์์, figure์ ๋ column์ ๊ฑธ์ณ์ ๋ฃ๊ณ ์ ํ๋ค๋ฉด figure
๋์ figure*
์ ์ฌ์ฉํ๋ฉด ๋๋ค.
\begin{figure*}[!t]
\centerline{\includegraphics[width=\textwidth]{figure.png}}
\caption{This is the first figure.}
\label{figure_1}
\end{figure*}
๋ฐ์ํ