tikz (rev. 1.6)

EDRSPIHCRSSRSS

tikz

공주대학교 문서작성 워크숍 2017에서 집중적으로 다루었으며, 좋은 가이드북과 예제들이 많다.

  • Example: 스마일
    tikz-smile.png
    [PNG image (79.4 KB)]
  • tikz codes:
    \begin{tikzpicture}[line width=1.6pt]
    %\draw [help lines] (0,0) grid (2,2);
    \draw [fill=yellow]      (1,1) circle (1cm);
    \draw ([shift=(193:.75cm)]1,1) arc    (193:347:.75cm);
    \draw plot [domain=.15:.35]   (\x,{2/3*(\x+1)});
    \draw plot [domain=1.65:1.85] (\x,{-2/3*\x+2)});
    \filldraw (.6,1.3)  ellipse (.15cm and .25cm);
    \filldraw (1.4,1.3) ellipse (.15cm and .25cm);
    \path [fill=white] (.55,1.4)  circle (1.5pt);
    \path [fill=white] (1.35,1.4) circle (1.5pt);
    \end{tikzpicture}
    
  • pstricks codes: 여기에서 가져옴.
    \documentclass[dvips]{oblivoir}
    \usepackage{pstricks-add}
    \begin{document}
    \begin{pspicture}[showgrid=false](-1,-1)(3,2)
      %\psaxes[ticks=none]{->}(-.5,-.5)(-1,-1)(2.5,3)
      \psset{linewidth=1.5pt,fillstyle=solid}
      \pscircle[fillcolor=yellow](1,1){1cm}
      \psarc[fillcolor=yellow](1,1){0.75}{193}{347}
      \psplot[algebraic]{1.65}{1.85}{-2/3*x+2}
      \psplot[algebraic]{0.15}{0.35}{2/3*(x+1)}
      \psellipse[fillcolor=black](.6,1.3)(.15,.25)
      \psellipse[fillcolor=black](1.4,1.3)(.15,.25)
      \pscircle[fillcolor=white](.55,1.4){.8mm}
      \pscircle[fillcolor=white](1.35,1.4){.8mm}
    \end{pspicture}
    \end{document}