KTUGFaq

KTUG FAQ

·Î±×ÀÎ:
ºñ¹Ð¹øÈ£:
°¡ÀÔ
Stop searching forever. Happiness is just next to you.
FrontPage › MetaPost

¸ñÂ÷

1 MetaPost¶õ?
2 MetaPostÀÇ ¼³Ä¡ ¹× »ç¿ë
3 Hangul-ucs¿Í MetaPost
4 °Ë»ö ÃßÃâ °¡´ÉÇÑ ÇÑ±Û PDF¸¦ ¾ò´Â ¹æ¹ý
5 MetaPost Processor

1 MetaPost¶õ?

MetaPost´Â MetaFont·ÎºÎÅÍ ±×¸²À» ±×¸®´Â ±âº»ÀûÀÎ µµ±¸µéÀ» Â÷¿ëÇßÁö¸¸ MetaFont¿Í´Â ´Þ¸® bitmap ´ë½Å PostScript code¸¦ Ãâ·ÂÇÑ´Ù.

3 Hangul-ucs¿Í MetaPost

  1. MetaPost 0.970 ÀÌÈÄ ¹öÀü ¿¹Á¦
    verbatimtex
    \input ucsplain.tex
    \hfont{outbtm}{}
    etex
    
    filenametemplate "%j-%c.eps";
    prologues:=3;
    
    beginfig(1);
        draw fullcircle scaled 2cm; 
        dotlabel("", origin);
        dotlabel.rt(btex ¾È³çÇϼ¼¿ä etex, (cosd(45),sind(45))*1cm);
    endfig;
    end 
    
    • ÆÄÀÏÀ̸§ÀÌ file-1.eps Çü½ÄÀ¸·Î ¸¸µé¾îÁø´Ù.
    • eps ÆÄÀÏ¿¡ type1 ÆùÆ®°¡ ÀÓº£µùµÈ´Ù.
    • epstopdf ¸í·ÉÀ» ÀÌ¿ëÇÏ¿© °£´ÜÈ÷ pdf¸¦ ¸¸µé ¼ö ÀÖ´Ù.
    • pdf ÆÄÀÏ¿¡¼­ ÇÑ±Û °Ë»ö¡¤ÃßÃâÀÌ °¡´ÉÇÏ´Ù.
  2. MetaPost·ÎºÎÅÍ pdf ¸¸µé±â
    $ mpost foo
    $ mptopdf foo
    
    • ÀÌ·¸°Ô ¾ò¾îÁø pdf´Â ebb·Î ¹Ù¿îµù¹Ú½º¸¦ ¾ò±â ¾î·Á¿ï ¼ö ÀÖ´Ù. bbÆÄÀϾò±â¸¦ Âü°íÇ϶ó.
  3. ÇÑ±Û ¿¹Á¦
    • ÇÑ±Û ±Û²ÃÀº type 1 ÆùÆ®(UHC-unicode ¶Ç´Â ¹®È­ºÎ type 1 µî)¸¦ ÀÌ¿ëÇÑ´Ù. ´ÙÀ½ ¿¹Á¦¿¡¼­´Â uhc-unicode¸¦ »ç¿ëÇÏ¿´À½.
    • ÇÑ±Û ÅؽºÆ®ÀÇ °Ë»ö ÃßÃâ±îÁö ¿øÇÑ´Ù¸é, ¾Æ·¡ °ü·Ã ¼ÒÀýÀ» º¼ °Í.
  4. verbatimtex
    %&latex
    \documentclass{article}
    \usepackage{dhucs}
    \SetHangulFonts{wbt}{wgt}{wtt}
    \usepackage{mflogo}
    \begin{document}
    etex;
    
    beginfig(1);
    % Å屯 ¸ð¾ç
    R:=2cm; r:=R/2;
    path p[];
    z0=(0,0); z1-z0=(R,0); z2-z0=(0,R); z3-z0=(-R,0);
    z4-z0=(-r,0); z5-z0=(0,-r); z6-z0=(r,0);
    p0:= z1..z2..z3;
    p1:= p0 rotatedaround(z0,180);
    p2:= (z4..z5..z6) shifted (z4-z0);
    p3:= p2 rotatedaround(z4,180) shifted (z6-z4);
    
    p4:=(p0--p2--reverse p3--cycle) rotatedaround(z0,-angle(3,2));
    p5:=(p1--p3--reverse p2--cycle) rotatedaround(z0,-angle(3,2));
    fill p4 withcolor red;
    fill p5 withcolor blue;
    label(btex \Huge Å屯 ¸ð¾ç etex, (0,R+r)-z0);
    label.rt(btex \LARGE\shortstack[l]{\sf \MP ¿¡¼­ ÇѱÛÀ» 
    »ç¿ëÇϱâ À§Çؼ­´Â \\
    \sf PostScript ÆùÆ®¸¦ ¾²µµ·Ï ÇÏ´Â °ÍÀÌ ÁÁ´Ù.
    \sf Àº±Û²ÃÀº Æ®·çŸÀÔÀ̹ǷΠ\\
    \sf UHC-unicode³ª Àº±Û²Ã type-1 µîÀ» »ç¿ëÇϵµ·Ï \\
    \sf ¼Ò½º¸¦ Àû´çÈ÷ ¼öÁ¤ÇÑ´Ù.} etex, (1.2R,0)-z0);
    endfig;
    end
    
  5. Graph ±×¸®±â

4 °Ë»ö ÃßÃâ °¡´ÉÇÑ ÇÑ±Û PDF¸¦ ¾ò´Â ¹æ¹ý

KTUGContrib:3418 (by DohyunKim)
  1. ÷ºÎÆÄÀÏÀ» ÀÛ¾÷µð·ºÅ丮¿¡ DZ´Ï´Ù.
  2. ÀÛ¾÷µð·ºÅ丮¿¡¼­ ´ÙÀ½ ¸í·ÉÀ» ³»¸³´Ï´Ù.
       pdftex --ini mptopdf
    
  3. Å×½ºÆ® »ïÀÌ Àû´çÇÑ mp ÆÄÀÏÀ» ÄÄÆÄÀÏÇØ º¾´Ï´Ù.
       mptopdf mytest.mp
    
  4. °á°ú¹°·Î¼­ »ý¼ºµÈ mytest-?.pdf¿¡¼­ ÇѱÛÀÌ °Ë»öµÇ´Â°¡ È®ÀÎÇÕ´Ï´Ù.
  5. ¾µ¸¸ÇÏ´Ù°í »ý°¢µÇ¸é $TEXMF/web2c µð·ºÅ丮·Î mptopdf.fmt¸¦ ¿Å±é´Ï´Ù.
       mv mptopdf.fmt $HOME/texmf/web2c
    
ÁÖÀÇ:
  • hangul-ucs (ucsplain Æ÷ÇÔ)¿¡¼­¸¸ ¾µ¼ö ÀÖ½À´Ï´Ù.
  • ÇѱÛÆùÆ®ÀÇ tfmÀ̸§ÀÌ ounbtmó·³ o·Î ½ÃÀÛÇÏ´Â ÆùÆ®¿¡¸¸ ¾µ¼öÀÖ½À´Ï´Ù. ¿¹ÄÁ´ë uhc-unicode¿¡¼­´Â ¾È µË´Ï´Ù.
  • ¸¸¾à ¿µ¹®ÀÚ°¡ ÆùÆ®¸íÀÌ o·Î ½ÃÀÛÇÑ´Ù¸é Æı¹ÀûÀÎ °á°ú°¡ ¾ß±âµË´Ï´Ù.(ÇÏÁö¸¸ o·Î ½ÃÀÛÇÏ´Â ¿µ¹®ÆùÆ®´Â Á¦°¡ ¾Æ´ÂÇÑ º°·Î ¾ø½À´Ï´Ù.)
  • µû¶ó¼­ º» ±¸ÇöÀº Ư¼öÇÑ dirty trick¿¡ ºÒ°úÇÏ¸ç º¸ÆíÀûÀÎ ÇعýÀÌ ¾Æ´ÔÀ» ºÐ¸íÈ÷ ÇÕ´Ï´Ù. caveat emptor!!!
  • ¾ÐÃàÇØÁ¦Çϸé mptopdf.texÀ̶ó´Â À̸§ÀÇ ÆÄÀÏÀÌ »ý±â´Âµ¥ unttf-pdftex-dhucs.mapÀ» pdftex.map¿¡ ÀÌ¹Ì ºÙ¿©³ÖÀ¸½Å ºÐ(°¡²û ÀÌ·± ºÐÀÌ ÀÖ½À´Ï´Ù)Àº ÀÌ ÆÄÀÏÀÌ ¾µ¸ð¾øÀ¸´Ï Áö¿ö¹ö¸° ÈÄ À§ 2.¹øÀÇ fmt ¸¸µå´Â ÀÛ¾÷À» ÇϽʽÿÀ.

^
Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2009-03-17 05:46:33
Processing time 0.0404 sec