#LyX 1.5.1 created this file. For more info see http://www.lyx.org/ \lyxformat 276 \begin_document \begin_header \textclass oblivoir \begin_preamble \usepackage[dbl4x6]{fapapersize} \usepackage[charter]{mathdesign} \parindent=2em \newcommand\kotex{% \texorpdfstring{\textsf{k}\textit{o}\kern.5pt\lower.15ex\hbox{.}\kern.5pt\protect\TeX}{ko.TeX}} %%% XeTeX logo \DeclareRobustCommand\XeTeX{\relax X\lower.5ex\hbox{\kern-.07em\reflectbox{E}}\relax \kern-.15em\TeX} \setsubsubsecheadstyle{\sffamily\large} \let\ORIGTOC\tableofcontents \def\tableofcontents{\ORIGTOC*} \let\LYXORG\LyX \def\LyX{\texorpdfstring{\LYXORG}{LyX}} \SetGremphFonts{utgt}{utgt} \hypersetup{colorlinks} \end_preamble \options footnote,microtype \language koreanUCS \inputencoding auto \font_roman default \font_sans default \font_typewriter default \font_default_family default \font_sc false \font_osf false \font_sf_scale 100 \font_tt_scale 100 \graphics default \paperfontsize default \spacing single \papersize default \use_geometry false \use_amsmath 1 \use_esint 1 \cite_engine basic \use_bibtopic false \paperorientation portrait \secnumdepth 2 \tocdepth 2 \paragraph_separation indent \defskip medskip \quotes_language english \papercolumns 1 \papersides 1 \paperpagestyle default \tracking_changes false \output_changes false \author "" \author "" \end_header \begin_body \begin_layout Title KC2007/mpm 처음 사용하기 \end_layout \begin_layout Author KTUG Collection Team \end_layout \begin_layout Date 2007년 8월 \end_layout \begin_layout Abstract 이 문서는 KC2007을 이용하여 TeX에 입문하는 Windows 사용자를 위한 ``따라하기 안내서(Tutorial)''이다. KC2007 시스템에 대한 자세한 설명과 설정 및 운영방법 등에 대해서는 ``사용자 설명서(User's Guide)'' 및 ``관리자 설명서(Administrator's Guide)''를 참고하라. 이 글은 완전한 초보자를 위한 최소한의 정보만을 제공한다. \end_layout \begin_layout Standard \begin_inset LatexCommand tableofcontents \end_inset \end_layout \begin_layout Standard \newpage \end_layout \begin_layout Section 들어가는 말 \end_layout \begin_layout Standard 작년에 이어 KC2007을 제작하게 되었다. 작년 한 해 동안의 여러 가지 경험을 살려, 더 나은 시스템이 되어야 할텐데. \end_layout \begin_layout Standard KC2006은 두 번 CD로 제작 \begin_inset ERT status collapsed \begin_layout Standard \backslash cntrdot \end_layout \end_inset 배포되었고 세 번 시스템을 바꾸었다. 그 기간 동안 많은 분들이 사실상 베타 테스터나 다름없는 상황을 이해해주시고 개선을 건의해주신 덕에 그런대로 만족스러운 TeX 실행체계로 자리잡을 수 있었다고 생각한다. KTUG Collection Team은 모든 사용자께 다시 한 번 감사한 마음을 표한다. 어쩔 도리 없이 이번 KC2007도 사실상 비슷한 상황일 것이므로, 배전의 격려와 도움을 부탁드리는 바이다. \end_layout \begin_layout Standard 이 글은 KTUG Collection Team을 저자로 하여 공개되는 문서로서, 초안을 김강수가 쓰고 조인성이 감수하였다. 내용에 대한 의견, 코멘트는 \begin_inset LatexCommand url target "mailto:info@mail.ktug.or.kr" \end_inset 로 보내주시기 바란다. \end_layout \begin_layout Section 알아두어야 할 것 \end_layout \begin_layout Standard KC2007은 다음과 같은 형식으로 제작 \begin_inset ERT status collapsed \begin_layout Standard \backslash cntrdot \end_layout \end_inset 배포된다. \end_layout \begin_layout Enumerate \begin_inset ERT status collapsed \begin_layout Standard \backslash tightlist \end_layout \end_inset KC2007/TeXLive : 주로 Linux와 Mac OS X를 위한 것으로 이 버전은 TeXLive 2007 텍 실행체계가 설치되어 있는 조건을 전제로 \begin_inset ERT status collapsed \begin_layout Standard \backslash kotex{} \end_layout \end_inset 설치만을 지원한다. 이 버전에 대한 더 상세한 정보는 \begin_inset ERT status collapsed \begin_layout Standard \backslash kotex{} \end_layout \end_inset 사이트 \begin_inset Foot status collapsed \begin_layout Standard \begin_inset LatexCommand url target "http://project.ktug.or.kr/ko.TeX/" \end_inset \end_layout \end_inset 를 참고하라. \end_layout \begin_layout Enumerate KC2007/mpm : Win32를 위한 바이너리와 지원체계를 갖춘 완전한 TeX Implementation \begin_inset Foot status collapsed \begin_layout Standard TeX 관련 실행파일들, 매크로 스타일과 클래스, 유틸리티 등을 모두 포함하여 제공되는, 시스템에서 TeX을 운영하기 위한 배포판을 말한다. TeX 배포판, TeX 실행체계 등과 같은 말이다. \end_layout \end_inset 으로 제공되는 것으로 KC2006의 다음 버전이다. 이 글에서 KC2007이라 하면 이 버전을 가리키는 것으로 한다. 여기서 ``mpm''이라 함은 MiKTeX Package Manager를 패키지 관리 도구로 채택하고 있음을 의미한다. \end_layout \begin_layout Standard KC2007/mpm의 특징은 다음과 같다. \end_layout \begin_layout XEnumerate \begin_inset OptArg status collapsed \begin_layout Standard \InsetSpace ~ \InsetSpace ~ \InsetSpace ~ 가. \end_layout \end_inset \begin_inset ERT status collapsed \begin_layout Standard \backslash tightlist \end_layout \end_inset 기본적인 설계는 KC2006에서 크게 변한 것이 없다. \begin_inset Foot status collapsed \begin_layout Standard 제작자로서, 이 부분에 대해서는 망설임이 매우 많았다. 원래 두 종류의 개발 옵션을 가지고 있었는데, 하나는 KC2006의 설계를 그대로 이어받는 것이고 다른 하나는 TeXLive를 이용하는 것이었다. 즉, KC2007/mpm도 TeXLive의 트리 구조를 그대로 이용하고자 하는 것이었는데, 그럴 경우 여러 가지 변경을 가하지 않으면 안 될 일이라, 호환성을 최대한 유지하는 선에서 타협하였다. \end_layout \end_inset \end_layout \begin_layout XEnumerate 한글 환경은 \begin_inset ERT status collapsed \begin_layout Standard \backslash kotex \end_layout \end_inset 이 탑재되었다. \end_layout \begin_layout XEnumerate pdfTeX, \begin_inset ERT status collapsed \begin_layout Standard \backslash XeTeX \end_layout \end_inset , luaTeX 등 주요 엔진이 최신 버전으로 교체되었다. \end_layout \begin_layout XEnumerate Ghostscript가 GPL 8.60이 채택되었다. \end_layout \begin_layout Standard 이러한 변화는 시스템 설계상의 것으로, 사실상 사용자 수준에서는 크게 새로운 것이 없다고 보아도 좋을 것이다. 이전과 동일한 점 중에서 몇 가지, \end_layout \begin_layout XEnumerate \begin_inset OptArg status collapsed \begin_layout Standard \InsetSpace ~ \InsetSpace ~ \InsetSpace ~ 가. \end_layout \end_inset \begin_inset ERT status collapsed \begin_layout Standard \backslash tightlist \end_layout \end_inset 기본 에디터는 여전히 EmEditor이다. 이것은 EmEditor에 free 버전이 있다는 점 때문에 채택된 것으로, EmEditor free \begin_inset Formula $+$ \end_inset KCmenu 조합 사용을 입문자에게 적절한 것으로 상정하고 있다. 그러나 자신에게 맞는 에디터, 예컨대 EmEditor Professional 버전이나 WinEdt 또는 TeXmaker 등을 사용하는 것도 좋다. KC2007의 KCmenu는 에디터 설정을 매우 손쉽게 변경할 수 있도록 해준다. \end_layout \begin_layout XEnumerate KC2007이 설치되는 시점에서 만약 \family typewriter HOME \family default 변수가 설정되어 있는 상태였다면, 시스템의 사용자 변수 \family typewriter HOME \family default 은 변경되지 않는다. 그러나 이 변수가 설정되어 있지 않은 상태라면 \family typewriter [TeX]/HOME \family default 폴더를 사용자 변수 \family typewriter HOME \family default 에 할당한다. 이 변수 이름을 \family typewriter TeXHOME \family default 등으로 하자는 의견이 일부 있었으나, KC2007은 \family typewriter HOME \family default 을 필요로 하고, 이 디렉터리를 사용하도록 하는 것이 논리적으로 무난하다고 보아서 변경하지 않았다. \end_layout \begin_layout XEnumerate 언인스톨시, \family typewriter [TeX]/HOME \family default 폴더는 삭제되지 않는다. \end_layout \begin_layout XEnumerate 바이너리(실행파일)들은 W32TeX의 것을 가져왔으므로 TeXLive와 동일하다. 그러나 대체로 TeXLive의 버전업은 없다고 해도 과언이 아니지만 KC2007은 지속적으로 업그레이드가 이루어진다. \end_layout \begin_layout Section 내려받기와 설치 \end_layout \begin_layout Subsection MiKTeX과 KC2007 \end_layout \begin_layout Standard Windows 운영체제에서 가장 많은 사용자를 가지고 있는 Christian Schenk 씨의 MiKTeX은 그 자체가 하나의 TeX Implementation이다. 쉬운 설치, 강력한 패키지 관리, 윈도 친화적인 사용자 환경 등이 특징이며 그 명성만큼이나 다양한 지원 체계도 갖추고 있다. \end_layout \begin_layout Standard KC2007은 독자적인 텍 실행 체계이다. 그러므로 MiKTeX과 KC2007을 동시에 설치해서 쓸 필요도 없고 그렇게 할 수도 없다. 즉, KC2007을 사용하려 한다면 MiKTeX을 제거해야 한다. \end_layout \begin_layout Standard MiKTeX과 KC2007은 대부분 그 기능이 동일하지만 다음과 같은 몇 가지 차이점을 갖는다. \end_layout \begin_layout Enumerate MiKTeX과 달리 KC2007은 한글 관련 환경을 기본으로 제공한다. 즉 KC2007을 설치하면 별도로 한글 관련 설정을 추가할 필요가 없다. \end_layout \begin_layout Enumerate MiKTeX과 달리 KC2007은 TeXLive 또는 W32TeX의 실행 환경에 더 가까우며 TeXLive의 web2c 표준과 호환된다. \end_layout \begin_layout Enumerate MiKTeX 2.6에는 없는 \begin_inset ERT status collapsed \begin_layout Standard \backslash XeTeX \end_layout \end_inset , luaTeX 등의 엔진이 탑재되어 있다. \end_layout \begin_layout Enumerate MiKTeX의 Yap과 \family typewriter texify \family default 라는 유틸리티가 KC2007에는 없다. 그 대신, dviout과 \family typewriter kcltxmk \family default 라는 유틸리티가 제공된다. 하는 일은 거의 비슷하지만 사용법이 약간 차이가 난다. \end_layout \begin_layout Standard 두 시스템을 모두 사용해본 사용자들의 경험담에 의하면, 프로그램의 실행 속도는 KC2007의 것이 현저히 빠르다고 한다. 또한, KC2007의 패키지 관리는 MiKTeX의 것을 빌어쓰고 있다. 즉, KC2007은 (아마도) TeXLive의 강력함과 MiKTeX의 편리함을 모두 취하려는 전략의 결과라고 생각한다. \end_layout \begin_layout Subsection 내려받기(Download) \end_layout \begin_layout Standard 내려받기는 KC2007 페이지 \begin_inset Foot status collapsed \begin_layout Standard \begin_inset LatexCommand url target "http://faq.ktug.or.kr/faq/KC2007" \end_inset \end_layout \end_inset 에서 한다. KC2007은 기본 설치 파일과 추가 설치 파일로 구분되어 있다. 설치 파일의 크기가 지나치게 커지는 것을 막기 위해 구분한 것으로, 기본 설치 파일( \family typewriter KC2007-TINY-INSTALL.exe \family default )은 실행 파일 형식이며 추가 설치 파일은 KC2007에서 사용하는 업데이트 파일 형식인 \family typewriter kcupdate \family default 확장자 파일로 되어 있다. \end_layout \begin_layout Standard 추가 설치 파일은 몇 종류가 있는데, TeX 입문자라면, 다음 두 가지를 설치하는 것이 좋다. \begin_inset Foot status collapsed \begin_layout Standard 다른 방식의 설치는 TeX 시스템을 잘 알고 있고 자신이 시스템을 구축하고 관리할 수 있다면 생각해볼 수 있는 옵션이다. 처음 사용자는 basic dist와 kotex을 설치하는 것이 가장 간편하고 수고를 덜 수 있는 방법이 된다. 물론 이 경우에도 다양한 패키지 스타일들은 \family typewriter kcmpm \family default 과 \family typewriter kclogmpm \family default 을 이용하여 관리할 수 있다. \end_layout \end_inset 기본 설치 실행파일과 함께 다운로드받아 두면 편리하다. \end_layout \begin_layout Enumerate 한글 환경 (ko.TeX) 설치 파일 = kotex (약 87mebibytes) \end_layout \begin_layout Enumerate 기본 배포 추가 스타일 = basic dist (약 100mebibytes) \end_layout \begin_layout Standard 처음 설치 시에 주의할 사항은, ``기본 설치 파일''을 아래 지침에 따라 설치한 후, 기본 설정(dviout, mktexlsr, kcmpm 초기화)을 마친 후에 위의 추가 설치 파일들을 실행하라는 것이다. \end_layout \begin_layout Subsection 기본 설치 파일의 인스톨(Install) \end_layout \begin_layout Standard 다운로드받은 실행파일( \family typewriter KC2007-MINI-INSTALL.exe \family default )을 더블 클릭하여 실행한다. \begin_inset Foot status collapsed \begin_layout Standard 이 파일 이름의 일부인 ``mini''라는 표현은 KC2007 공개판에 붙는 명칭이다. 한국텍학회(KTS) 회원에게는 TeXLive의 기본 distribution을 모두 포함한 full 버전의 KC2007이 CD 또는 DVD로 제공되는데, 공개판으로는 그 패키지의 일부만을 설치해주고 필요한 것은 온라인 자동 설치하도록 하는 버전을 제공한다. 두 버전의 기능상의 차이는 전혀 없으며, 동일한 바이너리를 채택하고 있다. \end_layout \end_inset \end_layout \begin_layout Enumerate 잠깐의 로딩 시간이 지난 다음, 설치 시작 화면이 나타나면 \emph on 다음 \emph default 버튼을 눌러서 진행한다. \end_layout \begin_deeper \begin_layout Center \begin_inset Graphics filename kc07-01.jpg scale 50 \end_inset \end_layout \end_deeper \begin_layout Enumerate 사용권 관련 계약사항에 모두 \emph on 동의 \emph default 한다. \end_layout \begin_deeper \begin_layout Center \begin_inset Graphics filename kc07-02.jpg scale 50 \end_inset \end_layout \end_deeper \begin_layout Enumerate 다음으로 구성요소 선택을 한다. \end_layout \begin_deeper \begin_layout Center \begin_inset Graphics filename kc07-05.jpg scale 50 \end_inset \end_layout \begin_layout Standard 그냥 \emph on 다음 \emph default 버튼을 눌러 진행한다. \end_layout \end_deeper \begin_layout Enumerate 시작 메뉴 폴더 선택도 그냥 \emph on 다음 \emph default 으로 진행한다. \end_layout \begin_deeper \begin_layout Center \begin_inset Graphics filename kc07-06.jpg scale 50 \end_inset \end_layout \end_deeper \begin_layout Enumerate 설치 위치를 정해야 한다. 기본값(default)은 그림에서 보듯이 \family typewriter C: \backslash KC2007 \backslash TeX \family default 으로 되어 있다. 초보자는 이를 변경하지 않고 \emph on 설치 \emph default 버튼을 누른다. \end_layout \begin_deeper \begin_layout Center \begin_inset Graphics filename kc07-07.jpg scale 50 \end_inset \end_layout \begin_layout Standard 사용자가 변경하고자 할 때에는, 경로명에 공백이 들어가지 않도록 하고, 마지막에는 반드시 \family typewriter \family default 이라는 폴더가 위치해야 한다. 예를 들면 \family typewriter C: \backslash KC2007 \backslash TeX \family default 은 괜찮지만 \family typewriter C: \backslash TeX \backslash MyKC2007 \family default 은 안된다. 어떤 이유에선가 \family typewriter Program Files \family default 폴더 아래 두어야만 할 상황이라면 8.3 파일 이름 형식으로 다음과 같이 써넣는다: \family typewriter C: \backslash Progra~1 \backslash TeX \family default . \end_layout \end_deeper \begin_layout Enumerate 설치가 시작되면, 방대한 시스템이 설치되는 과정을 시커먼 cmd 창으로 감상하면서 기다린다. (설치 시간은 컴퓨터 사양에 따라 대략 5분--20분 정도 걸린다.) \end_layout \begin_deeper \begin_layout Center \begin_inset Graphics filename kc07-08.jpg scale 50 \end_inset \end_layout \end_deeper \begin_layout Enumerate 설치 종료되면, 바탕 화면에 \family typewriter KCmenu \family default 의 바로가기가 생겨난다. \end_layout \begin_deeper \begin_layout Center \begin_inset Graphics filename kc07-10.jpg scale 50 \end_inset \end_layout \end_deeper \begin_layout Standard 일단 이것으로 기본적인 설치는 마무리되었다. \end_layout \begin_layout Standard 설치 후에, 현재 화면에 실행 중인 Shell을 일단 한번 내릴 필요가 있다. 즉, Internet Explorer는 한번 닫았다가 다시 열고, Total Commander 같은 파일 관리 프로그램도 닫고 재실행하는 것이 좋다. 물론 Cmd 창도 마찬가지다. 이것은 설치 프로그램이 설정한 레지스트리와 환경변수를 유효하게 하기 위해서이다. \end_layout \begin_layout Subsection 설정(Setup) \end_layout \begin_layout Standard 이제 KC2007을 실제로 운영하기 위한 설정을 몇 가지 실행해야 한다. 이 설정은(dviout 초기화(Install)를 제외하면) 시스템 운영 과정에서 몇 번이고 반복할 수 있는 것이므로 매우 중요하다. 그 과정을 눈여겨 보아두는 것이 좋다. \end_layout \begin_layout Subsubsection dviout 설정 \end_layout \begin_layout Standard dviout은 KC2007의 기본 뷰어이다. 물론 pdf에 익숙해지면 쓸 기회가 줄어드기도 하지만, 여전히 많은 입문서에서 dvi를 기본 결과 파일로 안내하고 있으며, Inverse Search와 같은 것을 위해서도 사용할 필요가 있다. \end_layout \begin_layout Standard 이 설정 과정은 일회성(one-time) 과정이므로 처음 설치시 한 번만 해두면 된다. Windows 단축키가 있는 키보드라면 \family typewriter +R \family default 키를 눌러서 \begin_inset ERT status collapsed \begin_layout Standard \backslash explpunc. \end_layout \end_inset 이것은 \family typewriter [시작] - [실행] \family default 을 누르는 것과 같다 \begin_inset ERT status collapsed \begin_layout Standard . \backslash \end_layout \end_inset \family typewriter dviout \family default 이라 입력하고 확인한다. 그러면 dviout이 실행된다. \end_layout \begin_layout Center \begin_inset Graphics filename kc07-dviout-01.jpg scale 50 \end_inset \end_layout \begin_layout Standard 메뉴의 \family typewriter Option -> Install \family default 을 찾아서 선택한다. (메뉴의 \family typewriter Setup Parameters \family default 항목을 잘 보아두도록 하자. 이 후로, dviout의 모든 설정은 이 Setup Parameters 항목을 통해 이루어진다.) \end_layout \begin_layout Center \begin_inset Graphics filename kc07-dviout-02.jpg scale 50 \end_inset \end_layout \begin_layout Standard 이 이후에 이루어지는 일은 기본적으로 \family typewriter Finish \family default 가 나올 때까지 \family typewriter Next \family default 를 누르는 것밖에 없다. 가벼운 마음으로 몇 번 \family typewriter Next \family default 버튼을 눌러준다. \end_layout \begin_layout Center \begin_inset Graphics filename kc07-dviout-05.jpg scale 50 \end_inset \end_layout \begin_layout Standard 마지막 단계가 지나면 프로그램 그룹이 등록되고 프로그램 그룹 창이 뜰 것이다. 그러면 성공! \end_layout \begin_layout Center \begin_inset Graphics filename kc07-dviout-06.jpg scale 40 \end_inset \end_layout \begin_layout Standard \begin_inset VSpace bigskip \end_inset \end_layout \begin_layout Standard 이제 시스템 초기화 과정을 거치면 모든 설치과정이 끝난다. \end_layout \begin_layout Paragraph 주의사항: \begin_inset LatexCommand label name "par:remark" \end_inset \end_layout \begin_layout Standard dviout 설정에서, 두어 가지 주의할 사항이 있다. 첫번째는 그림에 관련된 것으로 자신의 주 작업 그림이 EPS인 경우와 그렇지 않은 경우에 설정값을 조금 다르게 하는 것이 좋다. 안타깝지만 dviout은 PSTricks로 그린 그림을 직접 보여주지는 않는다. 그러나 일반적인 EPS 그림은 매우 잘 보여준다. FAQ에 이에 대한 언급이 있으므로 반드시 참고하기 바란다. \begin_inset Foot status collapsed \begin_layout Standard \begin_inset LatexCommand url target "http://faq.ktug.or.kr/faq/KC2006/\\%C3\\%B3\\%C0\\%BD\\%BB\\%E7\\%BF\\%EB\\%C0\\%DA/\\%BC\\%B3\\%C4\\%A1/DviOut\\%BC\\%B3\\%C1\\%A4" \end_inset \end_layout \end_inset 처음 설치시의 기본값은 EPS 작업에 적합하게 되어 있다. \end_layout \begin_layout Standard 또 하나는 truetype 폰트 사용에 관한 것인데, \begin_inset ERT status collapsed \begin_layout Standard \backslash kotex \end_layout \end_inset 은 기본 폰트가 트루타입이 아니므로, 지금 당장은 큰 문제가 되지 않을 것이다. 지금은 처음 설정이므로 \family typewriter Install \family default 로 충분하다. dviout은 트루타입 글꼴을 pk 비트맵을 만들지 않고 직접 보여줄 수 있는 탁월한 기능이 있고, 처음 설치 옵션은 이 기능을 활성화해두었다. 이 설정을 바꾸는 것도 \family typewriter Setup Parameters \family default 를 통하여 가능하다. \end_layout \begin_layout Standard \begin_inset ERT status collapsed \begin_layout Standard \backslash kotex{} \end_layout \end_inset 문서를 디스플레이할 때 dviout은 pk 글꼴이라는 비트맵 폰트를 생성한다. 처음에 pk 비트맵 글꼴 생성 시간이 조금 소요되지만 한번 만들어진 글꼴을 다음에 다시 사용하므로 어느 정도 시간이 지나면 pk 글꼴 생성의 필요가 점점 줄어들면서 빠른 속도로 화면 보여주기를 할 수 있다. TeX을 처음 이용하는 분들이 가끔 왜 화면 보여주기가 이렇게 더디냐고 질문하기도 하는데 그 까닭이 주로 pk 글꼴 생성 시간이므로 문서를 만들고 처리하는 경험이 쌓여갈수록 처리 시간이 빨라져, 문제가 해결되어 갈 것임을 알아두자. \end_layout \begin_layout Standard 그러나 자신이 초보자라면 이 모든 주의사항을 `잊고' 다음의 시스템 초기화 과정으로 가면 된다. \end_layout \begin_layout Subsubsection 몇 가지 초기화 \end_layout \begin_layout Standard 시스템 초기화는 \emph on 명령행 입력을 통해서 하는 것이지만, \family typewriter \emph default KCmenu \family default \begin_inset Foot status collapsed \begin_layout Standard likesam 님이 KC2006을 위하여 제작한 유틸리티. \end_layout \end_inset 를 사용하면 이를 매우 쉽게 할 수 있다. KC2007이 설치되고 나면 바탕 화면에 KCmenu 바로가기가 생기는데, 이것을 더블 클릭하여 실행한다. KCmenu가 열릴 때는 파일 찾기 대화창이 나타나지만 지금은 파일 작업을 하려는 것이 아니므로 \family typewriter [ESC] \family default 또는 \family typewriter [취소] \family default 를 누른다. 그러면 KCmenu의 세번째 탭인 \family typewriter [TeX 시스템 관리] \family default 가 열린 상태가 된다. \end_layout \begin_layout Center \begin_inset Graphics filename setting.jpg scale 50 \end_inset \end_layout \begin_layout Standard 이 상태에서 초기화 버튼을 차례로 한번씩 눌러준다. 하나씩 누를 때마다 cmd 창이 열리면서 초기화를 실행하므로, cmd 창의 동작이 모두 끝나기를 기다린 후 다음 버튼을 누른다. \end_layout \begin_layout Enumerate TDS 갱신 : 명령행에서 \family typewriter mktexlsr \family default 을 실행하는 것과 동일하다. 향후로도 가장 많이 사용할 초기화 버튼이다. \end_layout \begin_layout Enumerate map 갱신 : 자주 사용할 것은 아니지만, 맨 처음 설치했을 때는 \begin_inset CharStyle DotEmph show_label true status inlined \begin_layout Standard 반드시 \end_layout \end_inset 해주어야 한다. 명령행에서 \family typewriter updmap \family default 을 실행하는 것과 동일하다. \end_layout \begin_layout Enumerate 패키지 관리(kcmpm) --- 초기화(update-db) : 명령행에서 \family typewriter kcmpm --update-db \family default 를 실행하는 것과 동일하다. kcmpm은 패키지 관리와 자동 패키지 설치를 위해 꼭 필요한 유틸리티이므로, 이 초기화도 필수적으로 해둔다. 인터넷 연결이 원활하지 않으면 실패하는 경우도 있으므로, 만약 문제가 생기면 반드시 질문을 올려 해결해두어야 한다. \end_layout \begin_layout Enumerate 시스템 글꼴 갱신(fc-cache) : 명령행에서 \family typewriter fc-cache -f -v \family default 를 실행하는 것과 동일하다. \begin_inset ERT status collapsed \begin_layout Standard \backslash XeTeX \end_layout \end_inset 을 위한 글꼴 초기화이다. \begin_inset ERT status collapsed \begin_layout Standard \backslash XeTeX \end_layout \end_inset 이 꼭 필요하지 않다면 생략해도 무방하다. pdfLaTeX 등을 사용하는 데는 지장이 없다. 시스템의 글꼴 디렉터리를 모두 읽기 때문에 약간 시간이 소요되므로 컴퓨터가 반응이 없는 것처럼 보이더라도 (2분 가량) 기다린다. \end_layout \begin_layout Standard 이 정도의 초기화를 해주면 충분하다. \end_layout \begin_layout Subsection 한글 환경과 기본 배포 스타일의 설치 \end_layout \begin_layout Standard 설치 파일을 다운로드받을 때 추가 설치 파일 두 개를 미리 다운로드받아 두었다면, 해당 폴더를 탐색기로 열었을 때 이 파일들의 아이콘이 생겨나 있음을 볼 수 있다. 이 상태에서는 더블클릭으로 추가 파일의 설치가 진행된다. \family typewriter kotex \family default 과 \family typewriter basic-dist \family default 파일은 어느 것을 먼저 설치해도 상관없다. \end_layout \begin_layout Standard 만약 미리 다운로드해두지 않았다면 Internet Explorer를 한번 닫았다가 다시 열어서, KC2007 페이지로 연결한다. KCmenu의 Help 탭에 KC2007 페이지의 바로가기 단축 버튼이 있다. 한글 환경 설치 파일과 기본 배포 추가 스타일은 \family typewriter kcupdate \family default 형식의 파일이므로, 링크를 누르고 ``실행''을 선택하면 (설치 후 환경변수와 레지스트리 정보가 활성화되었을 때) 된다. 또는 대상 파일을 저장하여 더블 클릭하는 방법도 있다. \end_layout \begin_layout Section 에디터 \end_layout \begin_layout Standard 에디터의 선택은 어렵고도 중요한 일이다. KC2007은 에디터를 제공하지 않는다. 자신에게 가장 알맞은 에디터를 선택해서 써야 한다. \end_layout \begin_layout Subsection EmEditor \end_layout \begin_layout Standard EmEditor는 Emura Soft에서 제작한 셰어웨어 유니코드 편집기 \begin_inset Foot status collapsed \begin_layout Standard \begin_inset LatexCommand url target "http://www.emeditor.com" \end_inset \end_layout \end_inset 이다. 기능제한이 있기는 하나 무료로 이용할 수 있는 free version도 있기 때문에 부담없이 쓸 수 있다. KC2007은 이 에디터를 위한 설정을 기본으로 해준다. 즉, 별다른 추가 설정 없이 EmEditor를 바로 사용할 수 있다. TeX 전용 에디터는 아니지만 EmEditor Professional 버전에 M's TeX Helper 플러그인을 설치하면 TeX 작업에 특화된 환경을 조성할 수 있다. \end_layout \begin_layout Standard EmEditor를 더 잘 사용하기 위한 방법에 대한 것은 KTUG Faq \begin_inset Foot status collapsed \begin_layout Standard \begin_inset LatexCommand url target "http://faq.ktug.or.kr/faq/EmEditorTip" \end_inset \end_layout \end_inset 를 참고한다. \end_layout \begin_layout Subsection WinEdt \end_layout \begin_layout Standard 아마도 가장 유명한 Windows 셰어웨어 편집기가 아닐까 한다. 유니코드 편집에 약간의 제약이 있기는 하나 탁월한 기능을 갖춘 TeX 전용 편집기이다. WinEdt 설정을 위해서는 다음과 같이 한다. \end_layout \begin_layout Enumerate File Type Association : 이것은 WinEdt 자체에서 해결된다. \end_layout \begin_layout Enumerate TEXEDIT 변수 설정 : KCmenu의 환경변수 \family typewriter TEXEDIT \family default 설정 항목에서 WinEdt에 해당하는 행을 고른 뒤 활성화한다. \end_layout \begin_layout Enumerate Inverse Search 설정 : dviout에서 WinEdt을 위한 Inverse Search를 설정한다. \end_layout \begin_layout Enumerate \family typewriter KC2006_Config_for_WinEdt.exe \family default 를 실행한다. \begin_inset Foot status collapsed \begin_layout Standard 주의할 것은 WinEdt을 기본 옵션으로 설치해 두어야 한다는 것이다. \begin_inset LatexCommand url target "http://faq.ktug.or.kr/faq/KC2006/WinEdt" \end_inset \end_layout \end_inset \end_layout \begin_layout Enumerate WinEdt의 \family typewriter Option- \family default > \family typewriter Configuration \family default 에서 \family typewriter KC2006 \family default 을 선택한다. \end_layout \begin_layout Standard 이 에디터에서 유니코드 파일을 편집할 때는 저장 옵션에서 \family typewriter :UTF-8 \family default 을 잘 선택해주어야 한다. 유니코드 편집된 파일을 나중에 다시 열었을 때 UTF-8 모드가 유지되도록 하려면, 파일의 첫머리에, \end_layout \begin_layout LyX-Code % -*- TeX:UTF-8 -*- \end_layout \begin_layout Standard 라고 써두면 된다. \end_layout \begin_layout Subsection LyX \end_layout \begin_layout Standard LyX은 WYSIWYM (What You See Is What You \emph on Mean \emph default ) 워드 프로세서이다. 또한 LaTeX Front-end 에디터로 쓸 수 있다. LyX 1.5.x 버전은 유니코드 문서를 편집할 수 있다. \end_layout \begin_layout Enumerate WYSIWIM 철학에 입각하여 일일이 LaTeX Commands를 쳐넣지 않아도 문서를 손쉽게 편집할 수 있다. \end_layout \begin_layout Enumerate LaTeX의 강력한 기능을 거의 모두 활용할 수 있다. \end_layout \begin_layout Enumerate 수식 편집은 수식입력창이 별도로 제공되는 등 거의 WYSIWYG이므로 수식 편집기로 사용할 수도 있다. \end_layout \begin_layout Standard LyX에서 한글 LaTeX 문서를 작성하려면, 한글화 설정을 해야 하는데, 이에 대해서는 KTUG Faq에 잘 나와 있으므로 다음 페이지들을 참고하라. \end_layout \begin_layout Itemize \begin_inset ERT status collapsed \begin_layout Standard \backslash href{http://faq.ktug.or.kr/faq/Karnes/LyX}{ \end_layout \end_inset Karnes/LyX \begin_inset ERT status collapsed \begin_layout Standard } \end_layout \end_inset \end_layout \begin_layout Itemize \begin_inset ERT status collapsed \begin_layout Standard \backslash href{http://faq.ktug.or.kr/faq/LyX/Korean}{ \end_layout \end_inset LyX/Korean \begin_inset ERT status collapsed \begin_layout Standard } \end_layout \end_inset \end_layout \begin_layout Standard 생각건대 LyX은 여타 에디터를 대체할 만한 훌륭한 LaTeX 편집기라고 볼 수 있을 것 같다. 참고로, 이 문서도 LyX에서 작성하였다. 그림 \begin_inset LatexCommand ref reference "fig:lyx" \end_inset \begin_inset ERT status collapsed \begin_layout Standard \backslash 는 \end_layout \end_inset 이 문서를 편집하는 화면이다. \end_layout \begin_layout Standard \begin_inset Float figure wide false sideways false status open \begin_layout Center \begin_inset Graphics filename lyx-window.jpg scale 50 \end_inset \end_layout \begin_layout Standard \begin_inset Caption \begin_layout Standard LyX 1.5.1 \end_layout \end_inset \begin_inset LatexCommand label name "fig:lyx" \end_inset \end_layout \end_inset \end_layout \begin_layout Section KC2007의 유지 \end_layout \begin_layout Subsection KC2007의 확장과 추가 설치 \end_layout \begin_layout Standard KC2007은 TeXLive와 같은 ``완비된(complete)'' 시스템이 아니다. 만약 그런 방식으로 구성한다면 설치 파일의 크기만 1Gibibytes를 훌쩍 넘을 것이다. 그 대신 시스템의 확장이 필요할 때는 그에 따라 추가 설치가 가능하도록 하였다. 여기에는 두 가지 방법이 있다. \end_layout \begin_layout Description 패키지\InsetSpace ~ 추가설치(mpm) MiKTeX Package Manager를 빌어서 사용자가 새로운 패키지가 필요하여 이를 설치하고자 할 때, MiKTeX Package Manager (mpm)를 빌면 온라인상에서 직접 설치할 수 있다. 이를 위하여 KC2007이 제공하는 기본 유틸리티는 kcmpm이다. 컴파일 과정에서, 설치되지 않은 새로운 패키지를 자동으로 검색하여 온라인상에서 자동으로 설치할 수 있게 하는 유틸리티는 kclogmpm이다. KCmenu에 있는 ``패키지 자동 설치'' 버튼을 누르면 kclogmpm을 실행해준다. \newline kcmpm은 update-db가 정기적으로 필요하다. 대개 3--4개월마다 한번 정도 초기화(update-db)를 해주면 될 것으로 보는데, MiKTeX의 사정에 따라 좀더 빠르게 변할 수도 있다. db 초기화는 자동적으로 이루어지지 않으므로, 이따금 생각날 때 한번씩 눌러주면 된다. \end_layout \begin_layout Description kcupdate KC2007 기본 설치만으로 부족을 느끼는 경우, 시스템의 확장을 위하여 kcupdate를 사용할 수 있다. 주로 추가 폰트, 추가 매크로 등으로 이루어져 있으며, 기본 설치로는 제공되지 않지만 혹시 필요할는지 모르는 추가적인 시스템도 이 방식으로 설치한다. kcupdate 형식의 추가 설치 또는 확장 파일은 KC2007/UPDATES 페이지 \begin_inset Foot status collapsed \begin_layout Standard \begin_inset LatexCommand url target "http://faq.ktug.or.kr/faq/KC2007/UPDATES" \end_inset \end_layout \end_inset 에서 다운로드받아 설치할 수 있다. 현재 제공되는 kcupdate는, MusiXTeX 확장, 추가 폰트 등으로 이루어져 있으며 향후 새로운 것이 더해질 수 있다. \newline 해당 링크를 누르고 ``열기''를 클릭하면 알아서 설치해준다. 이런 방식을 우리는 ``반자동 설치''라고 부르는데, \begin_inset CharStyle DotEmph show_label true status inlined \begin_layout Standard 반자동 \end_layout \end_inset 이란 웹 브라우저로 해당 페이지를 열어서 링크를 클릭해야 한다는 것까지를 의식한 표현이며, 그 이후의 설치와 설정은 자동으로 이루어진다. 이런 설치용 파일들의 확장자가 \family typewriter .kcupdate \family default 이다. \begin_inset Foot status open \begin_layout Standard \family typewriter kcupdate \family default 파일은 실제로는 gzip 압축된 tar 파일이다. 그리고 여기에 \family typewriter _kcupdate.bat \family default 라는 설정용 배치파일이 들어 있다. KC2007은 \family typewriter .kcupdate \family default 라는 확장자를 가진 파일은 적당한 곳에 압축을 푼 다음 이 배치파일을 자동으로 실행해주는 일을 한다. \end_layout \end_inset \end_layout \begin_layout Subsection 정기 업데이트 \end_layout \begin_layout Standard KC2007은 정기적으로 \begin_inset Foot status collapsed \begin_layout Standard ``정기적''이라는 말은 반드시 날짜를 지켜서라는 뜻이 아니라, 대체로 regular하게라는 정도의 의미이다. 즉, \begin_inset CharStyle DotEmph show_label true status inlined \begin_layout Standard 정기 \end_layout \end_inset 업데이트(또는 정규 업데이트)가 릴리스되는 날짜가 정해져 있지는 않다. \end_layout \end_inset 업데이트가 릴리스된다. 대략 한 달에 한 번 정도 새로운 업데이트 파일이 올라오므로 \begin_inset LatexCommand url target "http://faq.ktug.or.kr/faq/KC2007/UPDATES" \end_inset 페이지를 가끔 방문하여 새로운 업데이트가 있는지를 확인하는 것이 좋다. 또, \family typewriter KCmenu \family default 의 ``시스템 관리'' 탭 보면 ``권장 Update 유무 확인''이라는 버튼이 있는데, 이 버튼을 누르면 현재 설치되어 있는 KC2007의 버전이 최신의 것인지를 알려준다. \begin_inset Foot status collapsed \begin_layout Standard 컴퓨터가 온라인에 연결되어 있어야 한다. \end_layout \end_inset 만약 새로운 정기 업데이트가 있다면 업데이트 사이트로 이동하게 해주므로 편리하게 정기 업데이트를 확인할 수 있다. \end_layout \begin_layout Standard KC2007의 정기 업데이트 파일은 RUD( \emph on R \emph default egular \emph on U \emph default p \emph on D \emph default ate)라 표시된 번호를 붙여서 구별한다. KC2007 설치 배포판은 RUD 1.2.1이다. 이후의 업데이트 파일을 설치하면 이 번호가 증가한다. KC2006의 마지막 버전은 RUD 5.5였다. 어느 정도 정기 업데이트 파일이 쌓이면 일괄 설치 버전을 별도로 제공하기도 하며, 설치 실행파일을 별도로 릴리스하기도 한다. 예컨대 KC2006은 RUD 5.2, RUD 5.4에서 설치 프로그램을 릴리스하였다. 그러나 대부분 차례대로 RUD들을 설치해가면, 새로이 설치 프로그램을 돌려야 할 필요가 거의 없을 것이다. \end_layout \begin_layout Standard 정기 업데이트 파일의 제공 형식도 kcupdate이다. \end_layout \begin_layout Section 문서의 작성, 컴파일 \end_layout \begin_layout Standard 이제, 본격적으로 문서를 작성하고 처리하는 연습을 해보자. TeX을 설치하는 궁극적 목적이 문서를 작성하기 위해서이므로, 이 과정을 테스트해봄으로써 LaTeX 사용법을 거의 대부분 짐작할 수 있게 될 것이다. 그러나 LaTeX 명령들을 이 글에서 모두 설명할 수는 없다. 그것은 LaTeX 사용법에 관한 많은 도움 문헌들, 예컨대 lshort-kr, latex4wp, LaTeX Companion 등을 참고하여 익혀야 할 것이다. \begin_inset LatexCommand ref reference "sec:help" \end_inset 절을 참고하라. \end_layout \begin_layout Subsection 작업 디렉터리란? \end_layout \begin_layout Standard 먼저 알아두어야 할 것은 작업 디렉터리 \begin_inset Foot status collapsed \begin_layout Standard `디렉터리'는 전통적인 명칭이고 그림 운영체제(GUI)가 도입된 후로 흔히 `폴더'라 부른다. 이 글에서는 이 두 용어를 넘나들어 썼다. \end_layout \end_inset 이다. 자신의 작업 디렉터리 위치를 정확하게 알아두는 것은 매우 중요하다. 이와 관련하여 다음과 같은 점을 지적해두자. \end_layout \begin_layout Enumerate 작업 디렉터리의 경로(PATH)에 공백 문자가 들어 있지 않은 것이 좋다. \begin_inset Foot status collapsed \begin_layout Standard 실은, KC2007에서 작업할 때 작업 디렉터리의 공백 문자는 대부분의 경우 문제되지 않는다. 그러나 예전 TeX utility 중 일부는 공백 문자에 에러를 보이기도 한다. 그러므로 아예 공백 문자를 포함하지 않는 경로를 권장하는 것이다. \end_layout \end_inset Windows XP의 바탕 화면에 있는 ``내 문서'' 폴더는 그 경로가(사용자 ID가 user라 할 때), \family typewriter C: \backslash Documents and Settings \backslash user \backslash My Documents \family default 이다. 이 경로에는 공백 문자가 들어 있다. 바탕 화면이나 ``내 문서''를 작업 디렉터리로 선택해도 큰 문제는 없다. 그러나 공백 문자 관련 주의가 필요하므로, 진짜 처음 사용자라면 권장하지 않는다고 말해두겠다. \end_layout \begin_layout Enumerate 작업 디렉터리의 경로에 되도록 즉시 접근할 수 있으면 편리하다. 그러므로 경로의 깊이가 너무 깊지 않도록 하는 것이 좋다. \end_layout \begin_layout Enumerate 작업 디렉터리에서 명령창을 즉시 열 수 있으면 때로 편리하다. 이것은 여러 가지 유틸리티가 있으므로 자신에게 적절한 것을 찾아서 설치하거나 설정해두도록 하자. 가장 간편한 것 중 하나가 `빵집'이라는 압축 유틸리티인데 설치시 옵션으로 오른쪽 버튼의 맥락 메뉴에 명령창 열기를 추가할 수 있게 되어 있다. EmEditor나 WinEdt 등 편집기의 툴바에도 명령창을 여는 단추가 있는데, 이를 클릭하면 현재 작업중인 디렉터리로 명령창이 열린다. \end_layout \begin_layout Standard 작업 디렉터리를, 가령, \family typewriter C: \backslash WORK \family default 로 하기로 하자. 요약하면, 자신의 작업 디렉터리와 그 경로에 주의를 기울이라는 것이다. 때로는 자신이 작성한 문서가 어디에 저장되어 있는지 잘 모르는 경우도 있으므로, 항상 어느 디렉터리에서 작업하고 있는가를 알 필요가 있는 것이다. \end_layout \begin_layout Subsection 새로운 문서 작성하기 \end_layout \begin_layout Standard 기존 문서를 불러와서 작업할 수도 있겠지만, 여기서는 간단한 파일을 새로 만들고, 저장하고, 컴파일하고, 결과를 보기로 하자. 에디터는 EmEditor를 이용하는 것으로 가정하겠다. 새 문서를 만드는 방법은 몇 가지가 있다. \end_layout \begin_layout Enumerate EmEditor에서 간단한 문서를 먼저 편집하여 자신의 작업 디렉터리에 저장하는 방법. \end_layout \begin_layout Enumerate 작업 디렉터리에 먼저 내용이 없는 파일을 만들고 이것을 EmEditor로 열어서 편집하고 재저장하는 방법. \end_layout \begin_layout Standard 어떤 방법을 써도 마찬가지이다. EmEditor에 다음과 같은 내용을 써넣어보자. \end_layout \begin_layout LyX-Code \backslash begin{verbatim} \end_layout \begin_layout LyX-Code \backslash documentclass{oblivoir} \end_layout \begin_layout LyX-Code \backslash begin{document} \end_layout \begin_layout LyX-Code 헬로우, Hello, World! \end_layout \begin_layout LyX-Code \backslash end{document} \end_layout \begin_layout LyX-Code \backslash end{verbatim} \end_layout \begin_layout Standard 이 파일을 저장한다. 저장할 때, 문서의 인코딩에 주의해야 한다. EmEditor에 아무런 설정을 가하지 않은 상태에서는 Windows 기본 인코딩인 CP949로 저장되는데, 이것은 곤란하다. 그러므로 반드시 \family typewriter UTF-8 \family default 로 저장하도록 하자. 인코딩을 제어하거나 변경하는 것이 EmEditor에서 모두 가능하므로, Faq의 관련 페이지 \begin_inset Foot status collapsed \begin_layout Standard \begin_inset LatexCommand url target "http://faq.ktug.or.kr/faq/EmEditorTip/Language" \end_inset \end_layout \end_inset 를 잘 읽어두어야 할 것이다. 다른 에디터의 경우라도 저장시 인코딩 문제에 신경써야 한다는 점이 같다. \end_layout \begin_layout Subsection 컴파일하고 결과 보기 \end_layout \begin_layout Standard `컴파일'이란 작성한 \family typewriter .tex \family default 파일에 대해 \family typewriter latex \family default 을 실행하는 것이다. 즉 ``TeX으로 하여금 LaTeX 포맷을 이용하여 입력 파일을 처리하게 하는 것''을 ``LaTeX을 실행한다'' 또는 ``컴파일한다''고 한다. 최종 목적 출력이 pdf라 할 때, pdfLaTeX을 직접 실행하는 방법도 있지만, 먼저 LaTeX을 실행하여 dvi를 만들고, 이 dvi에 대하여 pdf 변환 유틸리티(DVIPDFM \emph on x \emph default )를 실행하는 방법도 있다. 이 두 가지(또는 세 가지) 방법의 일장일단에 대해서는 다른 곳에서(예를 들면 \begin_inset ERT status collapsed \begin_layout Standard \backslash kotex \end_layout \end_inset 사용설명서 등) 충분히 다루었으므로 해당 글을 참고하면 된다. \end_layout \begin_layout Subsubsection 컴파일 하기 \end_layout \begin_layout Standard 컴파일하는 전통적인 방법은 명령행을 이용하는 것이다. 예를 들어, \family typewriter foo.tex \family default 이라는 파일을 컴파일하기 위해서, cmd 창을 열고(당연히 작업 디렉터리에서 또는 작업 디렉터리로 이동해서 ), 다음과 같이 명령어를 써넣는 것이다. \end_layout \begin_layout Standard \begin_inset ERT status collapsed \begin_layout Standard \backslash begin{verbatim} \end_layout \begin_layout Standard #> latex foo \end_layout \begin_layout Standard \backslash end{verbatim} \end_layout \end_inset \end_layout \begin_layout Standard 또는 아래의 \begin_inset LatexCommand ref reference "sub:invsearch" \end_inset 절에서 설명되는 Inverse Search를 위해서는 다음과 같이 써넣는다. \end_layout \begin_layout Standard \begin_inset ERT status collapsed \begin_layout Standard \backslash begin{verbatim} \end_layout \begin_layout Standard #> latex -src foo \end_layout \begin_layout Standard \backslash end{verbatim} \end_layout \end_inset \end_layout \begin_layout Standard 그러나 명령행에 익숙하지 않거나 좀더 GUI-지향적인 작업환경을 원한다면, 명령행 작업을 버튼을 한 번 클릭하는 것으로 대신하도록 할 수 있다. WinEdt이나 EmEditor+MTeXHelper2 환경에서는 다양한 방법으로 컴파일하는 단추를 갖추고 있다. 이러한 에디터를 텍작업에 특화된 환경을 갖춘 에디터라 한다. 그러나 텍에 특화된 에디터가 없다 하더라도, KCmenu를 이용하면 단추를 누르는 것으로 텍작업을 할 수 있다. \end_layout \begin_layout Standard KCmenu를 이용하여 컴파일하려면, 일단 KCmenu로 하여금 자신이 작성하고자 하는 파일을 현재 작업 파일로 인식하도록 해야 한다. 가장 쉬운 방법은 KCmenu 아이콘으로 해당 파일을 ``끌어다놓기'' 하는 것이다. 또는, KCmenu를 실행하면 처음에 뜨는 파일 찾기 대화창에서 자신이 작업한 파일을 찾아가도 된다. 그 후, LaTeX 버튼을 누른다. \end_layout \begin_layout Subsubsection 문서작성 결과 확인하기 \end_layout \begin_layout Standard 결과를 보고 싶으면, ``dvi 보기'' 단추를 누르거나, 아예 pdf까지 자동실행한 후에 pdf 보기하는 방법이 있다. 버튼 클릭 한 번이면 최종 결과물까지 모두 만들어주므로, 원본(소스)에 문제만 없다면 컴파일하고 결과를 보는 것은 아주 쉬운 일이다. 다만, 컴파일하고 화면으로 pdf파일 등의 결과 파일을 보여주기까지 걸리는 시간 정도는 참아줘야 한다. 짧은 문서는 거의 즉각적으로 결과를 볼 수 있다. 긴 문서는 약간의 시간이 걸리지만 대부분 참을 만하다. dviout 설정의 주의사항( \begin_inset LatexCommand pageref reference "par:remark" \end_inset 페이지)에서 언급한 바와 같이 dvi 파일의 경우, 처음에는 약간의 시간이 걸리지만, 만들어진 pk 글꼴이 축적될수록 결과를 빨리 볼 수 있다. \end_layout \begin_layout Subsubsection 필요한 패키지가 설치되어 있지 않을 때 \end_layout \begin_layout Standard LaTeX의 장점 중 하나가 전세계의 수많은 사람들이 지난 십수년 간 만들어 둔 ``솔루션''이 축적되어 있다는 것이다. 그것이 스타일 패키지라 불리는 것이다. 거의 대부분의 상상가능한 문제에 대응하는 패키지가 CTAN \begin_inset Foot status collapsed \begin_layout Standard Comprehensive TeX Archive Network. \begin_inset LatexCommand url target "http://ctan.tug.org" \end_inset \end_layout \end_inset 에 올려져 있으므로 이를 이용하여 손쉽게 원하는 기능을 활용할 수 있다. 이 패키지를 가져다 자신의 문서에서 쓰도록 하는 선언이 \family typewriter \backslash usepackage{} \family default 이다. 그런데 이 선언은 현재 자신의 TeX 시스템에 해당 스타일 패키지가 설치되어 있어야만 정상적으로 작동한다. 웬만한 스타일 패키지는 배포판에 거의 포함되어 있으나, 그렇지 않은 것도 있을 수 있다. 사실 TeXLive가 엄청난 규모의 크기를 자랑하는 배포판이기는 하지만 ``모든 패키지가 완비되어'' 실려 있다고 말하기는 어렵다. 거기에도 빠진 것이 있는 것이며, 새로이 추가된 패키지는 실리지 못하기도 하는 것이다. \end_layout \begin_layout Standard KC2007/mpm은 이와 같은 스타일 패키지를 MiKTeX Package Manager를 빌어서 관리한다. \begin_inset Foot status collapsed \begin_layout Standard KC2007/mpm이 빌어온 것은 MiKTeX이 아니라 MiKTeX Package Manager와 그 Repository임을 분명히 해둔다. 즉, MiKTeX이 사용하고 있는 Package Manager용 파일 저장소에서 동일한 파일을 가져와서 설치하거나 사용하는 것이다. 그러나 KC2007은 MiKTeX이 아니다. \end_layout \end_inset 또한, MiKTeX 최대의 장점이라 일컬어지는 소위 ``패키지 자동 설치''를 대부분 지원한다. KCmenu의 경우, \family typewriter [자동 패키지 설치 (kclogmpm)] \family default 이라는 단추가 그 기능을 한다. 컴파일할 때마다 이 단추를 쓸 필요는 없다. 패키지가 설치되지 않았다는 메시지를 만났을 때만 누르면 된다. 명령행에서 \family typewriter kclogmpm foo \family default 와 같이 실행하는 것과 동일하다. \end_layout \begin_layout Standard 다만, 이 자동 패키지 설치가 만능은 아니다. 일부 패키지 호출 방식이 복잡한 경우에는 직접 설치해야 하는 경우도 있는데, 이 때는 패키지의 이름을 알아야 한다. 예를 들면 musixps라는 패키지를 설치하려면 KCmenu의 \family typewriter [TeX System 관리] \family default 탭에서 패키지 관리의 열람, 갱신, 설치, 제거 버튼을 이용하거나, 명령행에서 \family typewriter 다음과 같이 kcmpm \family default 명령을 쓰면 될 것이다. \end_layout \begin_layout LyX-Code #> kcmpm --install=musixps \end_layout \begin_layout Standard 패키지는 한번 시스템에 설치되면 계속 설치된 상태로 유지되므로 시간이 갈수록 새로이 설치해야 할 패키지의 수가 줄어들 것이 틀림없다. 이것은 dviout이 시간이 갈수록 페이지 뷰어 시간이 적게 걸리게 되는 것과 유사하다. TeX은 초기의 진입장벽만 잘 넘으면 그 후부터는 눈에 띄게 편리해지는 특징을 가지고 있다. \end_layout \begin_layout Subsubsection 에러가 발견되었을 때의 처치법 \end_layout \begin_layout Standard 어떤 이유에서든 작성한 문서가 성공적으로 컴파일 종료되지 않고 에러를 발생시킨다면, 무언가 잘못된 것이다. \begin_inset Foot status collapsed \begin_layout Standard 컴파일은 성공적으로 종료되지만 메시지를 남기는 ``경고(Warning)''라는 것도 있다. 예를 들어 Overfull, Underfull 등은 경고이다. 경고는 오류(에러)가 아니므로, 그 경중을 잘 판단하여 필요한 것은 고치고 아니면 그냥 두어도 상관없다. log 파일을 잘 읽는 것은 이런 의미에서도 아주 중요하다. \end_layout \end_inset 에러의 종류에는 수십 가지가 있지만, 컴파일시 에러가 발생하는 이유는 다음 두 유형 중 하나이다. \begin_inset Foot status collapsed \begin_layout Standard dviout에서 한글이 안 보인다든가, 그림이 보이지 않는다든가 하는 것은 전부 컴파일시 에러가 아니라 시스템 설정 에러일 뿐이다. 시스템 설정 에러는 설치를 다시 하거나 설정을 올바르게 만들거나 재부팅하면 거의 대부분 해결된다. 컴파일시 에러란, 컴파일이 성공적으로 종료되지 않는 에러를 말한다. 컴파일은 되었다면\SpecialChar \ldots{} 그 후부터는 TeX의 소관이 아닌 것이다. \end_layout \end_inset \end_layout \begin_layout Enumerate \begin_inset ERT status collapsed \begin_layout Standard \backslash tightlist \end_layout \end_inset 무슨 의미인지 모르면서 다른 사람의 코드를 베껴왔기 때문. \end_layout \begin_layout Enumerate 자신이 작성한 코드라면, 오타이거나 착각. \end_layout \begin_layout Standard \begin_inset CharStyle DotEmph show_label true status inlined \begin_layout Standard 다른 이유는 없다 \end_layout \end_inset . TeX에서, TeX 시스템의 오류 때문에 에러가 발생할 가능성은 전무하다고 할 수 있다. \end_layout \begin_layout Standard 에러 발생의 경우 해결책은 다음 두 가지 중의 하나이다. \end_layout \begin_layout Enumerate \begin_inset ERT status collapsed \begin_layout Standard \backslash tightlist \end_layout \end_inset 자신의 오타나 착각을 발견했으면 수정한다. \end_layout \begin_layout Enumerate 자신의 오타나 착각은 전혀 없다고 생각하거나 찾을 수 없는 경우에는 KTUG 게시판에 질문한다. \end_layout \begin_layout Standard 이 두 가지 처방으로 모든 문제가 해결되기를 바란다. 다만 게시판에 질문할 때는 다음 조건을 충족시키는 것이 좋을 것이다. \end_layout \begin_layout XEnumerate \begin_inset OptArg status collapsed \begin_layout Standard \InsetSpace ~ \InsetSpace ~ \InsetSpace ~ ㄱ) \end_layout \end_inset 적절한 게시판에 질문한다. 예컨대 그림 관련 질문은 설치운영게시판에 한다든가 하는 것이다. \end_layout \begin_layout XEnumerate 최소한의 코드를 제공한다. \family typewriter 최소한의 코드이어도 되지만 \backslash documentclass, \backslash begin{document}, \backslash end {document} \family default 를 모두 포함하는 완전한, 컴파일가능한 예제가 아니면, 한참 동안 또는 계속 답을 얻기 어려울 수 있다. \end_layout \begin_layout XEnumerate 그림이 문제라면 문제가 된 그림을 첨부한다. \end_layout \begin_layout XEnumerate log 파일을 함께 제공한다. \end_layout \begin_layout XEnumerate 자신의 상황을 가급적 자세하게 설명하고 자신이 원하는(또는 생각하는) 정상적인 상태에 대한 정보를 제공한다. \end_layout \begin_layout Standard 이 규칙을 지키는 것이 질문자나 답변자나 시간과 노력을 절약하는 방법인 것이다. \end_layout \begin_layout Subsection 인버스 서치는 언제 필요한가? \begin_inset LatexCommand label name "sub:invsearch" \end_inset \end_layout \begin_layout Standard 인버스 서치(Inverse Search)란, dvi 디스플레이 창의 특정 위치에서 거기에 대응하는 소스의 위치로 편집기를 열어주는, dvi previewer와 에디터의 동시화 기능을 말한다. 더 구체적으로 말하자면, dviout 화면상에서 특정 위치를 더블 클릭하면 에디터(예로, EmEditor)가 해당파일의 해당소스의 위치에서 열리는 것이다. \begin_inset Foot status collapsed \begin_layout Standard dviout의 경우, 문단 시작 위치에 가깝게 마우스를 두고 더블 클릭하는 것이 좋다. \end_layout \end_inset \end_layout \begin_layout Standard 인버스 서치는 소스 수정 시에 매우 요긴하게 쓸 수 있다. WYSIWYG 출력화면에서 소스로 바로 이동하여 수정이 가능하다는 것은 생각만해도 즐거운 일이다. Windows 시스템에서는 pdf의 동시화가 불가능하여 \begin_inset Foot status collapsed \begin_layout Standard vpe 패키지를 쓰면 부분적으로 pdf 동시화가 가능하다. 그러나 이 패키지가 아주 안정적으로 동작하지 않고 특히 array나 tabular와 약간 충돌이 있기 때문에 일반적 목적에 사용하기에는 (아직은) 좀 어려워 보인다. \end_layout \end_inset 부득이 인버스 서치용으로 dviout을 쓰게 되어 있다. Mac OS X와 같은 경우, TeXShop이나 Emacs로 pdf Viewer에서 인버스 서치가 가능하지만, 이것은 아직까지는 Mac에 한정된 기능이라고 보인다. \begin_inset Foot status collapsed \begin_layout Standard Mac에서는 \family typewriter -src \family default 옵션 대신 \family typewriter pdfsync \family default 라는 패키지를 이용해야 한다. \end_layout \end_inset \end_layout \begin_layout Standard 인버스 서치가 제대로 동작하게 하기 위해서는 다음 두 가지 조건이 충족되어야 한다. \end_layout \begin_layout Enumerate dviout에서 에디터를 호출하는 설정을 제대로 해두어야 한다. \end_layout \begin_layout Enumerate LaTeX을 돌려서 dvi를 얻을 때 source special이라는 기능을 활성화해두어야 한다. 이것은 \family typewriter latex -src \family default 와 같이 \family typewriter -src \family default 또는 \family typewriter -src-specials \family default 옵션을 주어서 LaTeX을 부르면 된다. \end_layout \begin_layout Standard 다행히 KCmenu의 LaTeX 실행 버튼은 2번의 옵션을 활성화하도록 기본값으로 정해두었다. 또한 EmEditor를 위한 설정이 미리 된 상태로 설치된다. 그러므로 KCmenu의 LaTeX 실행 버튼으로 dvi를 만들면 EmEditor에 대해서 인버스 서치가 동작한다. 다른 에디터라면 거기에 맞게 dviout의 설정을 직접 변경해야 하는데, 이에 대해서는 Faq를 참고하라. \begin_inset Foot status collapsed \begin_layout Standard \begin_inset LatexCommand url target "http://faq.ktug.or.kr/faq/InverseSearch" \end_inset \end_layout \end_inset \end_layout \begin_layout Standard 인버스 서치에 대응하는 것으로 포워드 서치(Forward Search)라는 기능도 있다. 이것은 에디터의 현재 편집 중인 위치로 dvi viewer를 열어주는 기능이다. 인버스 서치만큼 중요한 역할을 하는 것은 아니더라도 제법 요긴하게 사용할 때가 있다. 포워드 서치는 편집기에서 dvi viewer를 부르는 외부 프로그램 실행 옵션을 잘 설정하면 되는데, 몇 가지 편집기에서의 설정값에 관한 정보가 Faq에 있다. \begin_inset Foot status collapsed \begin_layout Standard \begin_inset LatexCommand url target "http://faq.ktug.or.kr/faq/ForwardSearch" \end_inset \end_layout \end_inset 다만 dviout은 프로그램의 특성 때문에 현재 편집기 위치에서 한 페이지 정도 전후의 출입이 있으므로 열린 위치가 꼭 편집기 커서가 있는 바로 그 위치가 아니더라도 실망하지 말고 한 페이지 정도 앞뒤로 이동해보도록 하라. \end_layout \begin_layout Subsection 유틸리티 \end_layout \begin_layout Standard KC2007을 더 효율적으로 사용하기 위해서는 몇 가지 추가 프로그램을 설치하는 것이 편리할 수 있다. 아래 소개하는 것은 ``없어서는 안 되는'' 것은 아니므로 꼭 필요해지면 자신의 판단으로 설치하면 되는 것들이다. \end_layout \begin_layout Subsubsection 언어 \end_layout \begin_layout Standard KC2007은 TeX의 운영에 필요한 거의 모든 프로그램을 포함하고 있지만, Perl이나 ruby와 같은 프로그래밍 언어 자체를 탑재하고 있지는 않다. 그러나 일반적인 LaTeX 문서의 작성 등에는 KC2007 기본 설치만으로도 큰 문제를 겪지 않을 것이다. \end_layout \begin_layout Standard 다만, ConTeXt와 같은 패키지를 활용하기 위해서는 특히 ruby는 필수이며, Perl도 있으면 좋다. ruby 설치 프로그램은 편의를 위하여 \family typewriter HOME/UPDATES \family default 폴더에 넣어둔 것이 있으므로 이를 이용한다. 반면 Perl은 Active Perl이 좋은 평가를 받고 있는데, 이것은 \begin_inset ERT status collapsed \begin_layout Standard \backslash href{http://www.activestate.com}{ \end_layout \end_inset Active State \begin_inset ERT status collapsed \begin_layout Standard } \end_layout \end_inset 사 사이트에 접속하여 내려받아 설치할 수 있다. Active Perl은 ACL(ActiveState Community License)로 배포되는 프로그램으로서 language distribution은 무료로 설치 사용할 수 있다. \end_layout \begin_layout Subsubsection 그림 관련 유틸리티 \end_layout \begin_layout Standard KC2007에는 몇 가지 그림 관련 유틸리티가 포함되어 있다. \family typewriter sam2p, bmeps, bmp2png, png2bmp, jbig2, fig2dev, potrace, ebb, xbb, jpeg2ps \family default 등이 그런 유틸리티들이다. KC2007에 있는 유틸리티의 종류를 모두 소개하는 것은 이 글에서는 벅차다. 그러나 직접 그림을 그리거나 편집하는 도구는 별도로 제공하지 않는데, 이것은 자신의 손에 익은 것을 사용하면 될 것이다. \end_layout \begin_layout Standard \family typewriter tex4ht \family default 를 사용하기 위해서는 \family typewriter netpbm \family default 이라는 유틸리티가 필요한데, 이것은 \begin_inset ERT status collapsed \begin_layout Standard \backslash href{http://gnuwin32.sourceforge.net/packages/netpbm.htm}{ \end_layout \end_inset GNU \begin_inset ERT status collapsed \begin_layout Standard \backslash - \end_layout \end_inset Win32 \begin_inset ERT status collapsed \begin_layout Standard } \end_layout \end_inset 에 포함되어 있는 것을 추천한다. 한편, LyX을 위해서는 ImageMagick라는 유틸리티가 있어야 한다. 이것은 LyX을 설치하면서 함께 설치하도록 할 수 있다. \end_layout \begin_layout Section 도움말을 얻을 수 있는 곳 \begin_inset LatexCommand label name "sec:help" \end_inset \end_layout \begin_layout Subsection 필수 문서 \end_layout \begin_layout Standard \family typewriter KCmenu \family default 의 \family typewriter Help \family default 탭에 ``도움 문서 읽기''라는 버튼이 있다. 오른쪽의 텍스트 필드에 적당한 파일 이름을 써넣고 이 버튼을 누르면 해당 문서를 찾아서 뷰어로 열어준다. 이 기능을 사용하여 읽어볼 만한 필수적인 문서를 별도의 \family typewriter kcupdate \family default 로 제공하고 있다. \begin_inset ERT status collapsed \begin_layout Standard \backslash href{http://faq.ktug.or.kr/faq/KC2007/UPDATES \backslash #s-4.1}{ \end_layout \end_inset KC2007/UPDATES#s-4.1 \begin_inset ERT status collapsed \begin_layout Standard } \end_layout \end_inset \begin_inset Foot status collapsed \begin_layout Standard \begin_inset LatexCommand url target "http://faq.ktug.or.kr/faq/KC2007/UPDATES\\#s-4.1" \end_inset \end_layout \end_inset 의 ``KCmenu 필수 문서'' 항목을 보라. \end_layout \begin_layout Subsection 그밖의 도움말 \end_layout \begin_layout Standard KTUG의 FAQ 사이트( \begin_inset LatexCommand url target "http://faq.ktug.or.kr/faq" \end_inset )는 방대한 TeX/LaTeX 관련 정보를 자랑하고 있다. 거기에다가 한글로 되어 있는 것이다! 거의 대부분의 필요한 정보를 여기에서 얻을 수 있다. \end_layout \begin_layout Standard LaTeX을 처음 시작하는 사람이 반드시 읽어야 할 입문용 문헌으로 lshort-kr을 많이 추천한다. \begin_inset LatexCommand url target "http://faq.ktug.or.kr/faq/lshort-kr" \end_inset 페이지를 찾아보면 다운로드받을 수 있다. \end_layout \begin_layout Standard LaTeX에서 한글을 사용하는 문제에 대한 자세한 사항은 한국어 텍( \begin_inset ERT status collapsed \begin_layout Standard \backslash kotex \end_layout \end_inset ) 사용 설명서를 \begin_inset Foot status collapsed \begin_layout Standard \begin_inset LatexCommand url target "http://people.ktug.or.kr/~karnes/FILES/kotexguide.pdf" \end_inset \end_layout \end_inset 보면 된다. \end_layout \begin_layout Standard \begin_inset VSpace bigskip \end_inset \end_layout \begin_layout Standard 즐텍! \end_layout \end_body \end_document