StoryCode

LaTexDraw

Latex
반응형

1) LaTeX 에서 그림그리기는 아래와 같이

\section{A Picture}

\begin{center}

\begin{picture}(100,100)(0,0)

\setlength{\unitlength}{1pt}

\put(20,70){\circle{30}}  \put(20,70){\circle*{10}}   % left eye

\put(80,70){\circle{30}}  \put(80,70){\circle*{10}}   % right eye

\put(40,40){\line(1,2){10}} \put(60,40){\line(-1,2){10}} \put(40,40){\line(1,0){20}} % nose

\put(50,20){\oval(80,10)[b]} % mouth

\multiput(0,90)(4,0){10}{\line(1,3){4}}  % left eyebrow

\multiput(100,90)(-4,0){10}{\line(-1,3){4}}  % right eyebrow

\end{picture}

\end{center}


좌표와 각종 그리기 명령을 이용한다.


이걸 좀 편하게 하기 위해, LaTeXDraw 를 사용할 수 있다.



2) https://sourceforge.net/projects/latexdraw/files/latest/download 에서 설치할 수 있다.

현재 3.3.8 버전까지 나와있으며, 윈도우즈/ 리눅스/ 맥에서 사용가능하다.


윈도 : zip 을 다운로드후, install_windows.vbs 를 실행하여 설치한다. 설치후, 커맨더에서 "java -jar LaTeXDraw.jar" 로 실행하면 된다.


3) Sample


4) figure1.pdf 로 저장후에, 다른 TeX 에서 부를수 있다.

\documentclass{article}

\usepackage[pdftex]{graphicx}

\begin{document}

\begin{figure}

  \centerline{\includegraphics{figure1}}

\end{figure}

\end{document}

반응형

'Latex' 카테고리의 다른 글

Dia ( Like Visio )  (0) 2019.02.25
InkScape  (0) 2019.02.25
설치  (0) 2019.02.22