<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://workspace.onionmixer.net/wiki/index.php?action=history&amp;feed=atom&amp;title=Gentoo_TeXLive_Install</id>
	<title>Gentoo TeXLive Install - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://workspace.onionmixer.net/wiki/index.php?action=history&amp;feed=atom&amp;title=Gentoo_TeXLive_Install"/>
	<link rel="alternate" type="text/html" href="https://workspace.onionmixer.net/wiki/index.php?title=Gentoo_TeXLive_Install&amp;action=history"/>
	<updated>2026-04-21T08:12:13Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://workspace.onionmixer.net/wiki/index.php?title=Gentoo_TeXLive_Install&amp;diff=701&amp;oldid=prev</id>
		<title>Onionmixer: 변경내용수정</title>
		<link rel="alternate" type="text/html" href="https://workspace.onionmixer.net/wiki/index.php?title=Gentoo_TeXLive_Install&amp;diff=701&amp;oldid=prev"/>
		<updated>2013-07-14T12:10:59Z</updated>

		<summary type="html">&lt;p&gt;변경내용수정&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;;Gentoo 에서 TeXLive 의 설치법&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==기본조건==&lt;br /&gt;
&lt;br /&gt;
* Gentoo 가 설치된 X-winwodws 를 사용하는 PC&lt;br /&gt;
* TeX 에서 사용하기 원하는 TTF 또는 OTF 폰트들&lt;br /&gt;
* emacs 24.x 이상&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
그리고 본 문서는 다음의 경우를 대상으로 합니다.&lt;br /&gt;
&lt;br /&gt;
# 본 문서는 emacs를 TeX의 편집기로 사용하는 경우를 대상으로 합니다.&lt;br /&gt;
# 본 문서는 xetex를 사용하는경우를 대상으로 합니다.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==TexLive 기본설치==&lt;br /&gt;
&lt;br /&gt;
아래의 명령을 이용해서 texlive를 설치합니다. 2012 버전을 기준으로 설치하시면 됩니다.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
localhost # USE=&amp;quot;context epspdf graphics xetex pstricks publishers science tex4ht texi2html emacs&amp;quot; emerge texlive&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
다음의 명령을 통해서 rubber 를 설치한다.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
localhost # emerge rubber&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==emacs 를 위한 acutex mode 설치==&lt;br /&gt;
&lt;br /&gt;
emacs를 위해서는 auctex를 설치해줘야 합니다.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
localhost # USE=&amp;quot;preview-latex&amp;quot; emerge -pv auctex&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
그리고 아래와같은 설정을 .emacs 에 넣어주면 됩니다.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lisp&amp;quot;&amp;gt;&lt;br /&gt;
(eval-after-load &amp;quot;tex-mode&amp;quot;&lt;br /&gt;
        &amp;#039;(progn&lt;br /&gt;
                (load &amp;quot;auctex/auctex.el&amp;quot; nil nil t)&lt;br /&gt;
                (load &amp;quot;auctex/preview-latex.el&amp;quot; nil nil t)))&lt;br /&gt;
&lt;br /&gt;
(add-hook &amp;#039;LaTeX-mode-hook&lt;br /&gt;
        &amp;#039;(lambda ()&lt;br /&gt;
                (setq TeX-source-correlate-start-server t)&lt;br /&gt;
                (setq TeX-source-correlate-method &amp;#039;synctex)&lt;br /&gt;
                (TeX-source-correlate-mode 1)&lt;br /&gt;
                (setq LaTeX-command&lt;br /&gt;
                        &amp;quot;latex -file-line-error -synctex=1&amp;quot;)))&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==한글 사용을 위한 kotex의 설치==&lt;br /&gt;
&lt;br /&gt;
gentoo 에서 kotex를 설치하기 위해서는 gentoo kr overlay를 사용하는것이 가장 좋습니다. 아래의 사이트를 참고해 주세요.&lt;br /&gt;
&lt;br /&gt;
:http://code.google.com/p/gentoo-kr/source/checkout&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
일단 기본적으로는 아래의 명령어를 통해서 repository 를 받아올 수 있습니다.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
localhost # git clone https://code.google.com/p/gentoo-kr/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
현재 gentoo korea의 Overlay 에 들어가있는 kotex의 ebuild는 압축파일의 digest가 안맞는 경우가 몇개 있습니다. 각 디렉토리로 이동해서 각각 다음의 명령을 진행해주세요.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
localhost # ebuild --force kotex-utils-20121114.ebuild manifest&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
localhost # ebuild --force kotex-dev-20121213.ebuild manifest&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
localhost # ebuild --force collection-kotex-20120529.ebuild manifest&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
위의 명령을 통해서 해당되는 패키지들의 정보를 갱신한다음 collection-kotex 패키지를 설치해서 필요한 패키지들을 설치합니다.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
문제는 이렇게 설치한다고 해서 다 되는건 아닙니다. 최근에 만들어딘 xetex 대상 문서는 kotex-devel 에 몇개 파일이 빠져있기때문이 최근의 버전을 설치하기 원하는 경우에는 이 문서의 첨부파일 부분을 참고해서 위의 &amp;#039;&amp;#039;&amp;#039;ebuild manifest&amp;#039;&amp;#039;&amp;#039; 부분을 진행한뒤 아래의 패키지들&amp;#039;&amp;#039;&amp;#039;만&amp;#039;&amp;#039;&amp;#039; 설치하도록 합니다.&lt;br /&gt;
&lt;br /&gt;
* dev-tex/kotex-utils-20121114.ebuild&lt;br /&gt;
* dev-tex/kotex-dist-20121201.ebuild&lt;br /&gt;
* dev-tex/collection-kotex-20121201.ebuild&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===kotex의 설치확인===&lt;br /&gt;
&lt;br /&gt;
kotex를 설치한후 제대로 설치가 되었는지는 다음의 과정을 통해서 &amp;#039;&amp;#039;&amp;#039;oblivoir.cls&amp;#039;&amp;#039;&amp;#039; 파일을 찾을 수 있으면 정상적으로 설치가 된것으로 간주하셔도 됩니다.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
localhost # texhash&lt;br /&gt;
localhost # kpsewhich oblivoir.cls&lt;br /&gt;
/usr/share/texmf-dist/tex/latex/kotex/utf/oblivoir/oblivoir.cls&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==TeXLive 의 설정==&lt;br /&gt;
&lt;br /&gt;
일단 중요한 부분은 별다르게 없으며 아래와같은 과정을 통해서 관련된 설정을 추가해줍니다.&lt;br /&gt;
&lt;br /&gt;
* kpsewhich texmf.cnf&lt;br /&gt;
* OSFONTDIR 의 대입값에 원하는 폰트 경로를 추가&lt;br /&gt;
* 원하는 font경로에 설치된 TeX의 opentype의 경로를 link해준다&lt;br /&gt;
** ex) ln -s /usr/share/texmf-dist/fonts/opentype /usr/share/fonts/&lt;br /&gt;
* TEXMFHOME 의 대입값을 다음으로 변경해준다.&lt;br /&gt;
** ex) ~/texmf&lt;br /&gt;
* font 캐쉬를 갱신해준다&lt;br /&gt;
** ex) fc-cache -v -r&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==emacs를 위한 추가설정==&lt;br /&gt;
&lt;br /&gt;
위에서 아래와 같은 부분을 설명한적이 있습니다.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lisp&amp;quot;&amp;gt;&lt;br /&gt;
(eval-after-load &amp;quot;tex-mode&amp;quot;&lt;br /&gt;
        &amp;#039;(progn&lt;br /&gt;
                (load &amp;quot;auctex/auctex.el&amp;quot; nil nil t)&lt;br /&gt;
                (load &amp;quot;auctex/preview-latex.el&amp;quot; nil nil t)))&lt;br /&gt;
&lt;br /&gt;
(add-hook &amp;#039;LaTeX-mode-hook&lt;br /&gt;
        &amp;#039;(lambda ()&lt;br /&gt;
                (setq TeX-source-correlate-start-server t)&lt;br /&gt;
                (setq TeX-source-correlate-method &amp;#039;synctex)&lt;br /&gt;
                (TeX-source-correlate-mode 1)&lt;br /&gt;
                (setq LaTeX-command&lt;br /&gt;
                        &amp;quot;latex -file-line-error -synctex=1&amp;quot;)))&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
위의 부분을 아래와같이 바꿔주면 됩니다.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lisp&amp;quot;&amp;gt;&lt;br /&gt;
(eval-after-load &amp;quot;tex-mode&amp;quot;&lt;br /&gt;
        &amp;#039;(progn&lt;br /&gt;
                (load &amp;quot;auctex/auctex.el&amp;quot; nil nil t)&lt;br /&gt;
                (load &amp;quot;auctex/preview-latex.el&amp;quot; nil nil t)))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(add-hook &amp;#039;LaTeX-mode-hook&lt;br /&gt;
          &amp;#039;(lambda ()&lt;br /&gt;
             (setq TeX-source-correlate-start-server t)&lt;br /&gt;
             (setq TeX-source-correlate-method &amp;#039;synctex)&lt;br /&gt;
             (TeX-source-correlate-mode 1)&lt;br /&gt;
             (setq LaTeX-command&lt;br /&gt;
                   &amp;quot;latex -file-line-error -synctex=1&amp;quot;)&lt;br /&gt;
             (setq TeX-master&lt;br /&gt;
                      (if (buffer-file-name)&lt;br /&gt;
                          (guess-TeX-master (buffer-file-name))&lt;br /&gt;
                        nil))))&lt;br /&gt;
&lt;br /&gt;
(defun guess-TeX-master (filename)&lt;br /&gt;
    &amp;quot;Guess the master file for FILENAME from currently open .tex files.&lt;br /&gt;
  FILENAME must be absolute&amp;quot;&lt;br /&gt;
    (let (candidate&lt;br /&gt;
          (subdir (file-name-directory filename))&lt;br /&gt;
          (sans-filename (file-name-sans-extension (file-name-nondirectory filename))))&lt;br /&gt;
      (save-excursion&lt;br /&gt;
        (dolist (buffer (buffer-list))&lt;br /&gt;
          (with-current-buffer buffer&lt;br /&gt;
            (let ((file buffer-file-name))&lt;br /&gt;
              (if (and file&lt;br /&gt;
                       (string-match &amp;quot;\\.tex$&amp;quot; file)&lt;br /&gt;
                       (string-match (file-name-directory file) subdir))&lt;br /&gt;
                  (progn&lt;br /&gt;
                    (goto-char (point-min))&lt;br /&gt;
                    (when (re-search-forward&lt;br /&gt;
                           (concat&lt;br /&gt;
                            &amp;quot;\\\\\\(?:in\\(?:clude\\|put\\)\\|usepackage\\){.*&amp;quot;&lt;br /&gt;
                            sans-filename &amp;quot;.*}&amp;quot;)&lt;br /&gt;
                           nil t)&lt;br /&gt;
                      (setq candidate file))))))))&lt;br /&gt;
      (if candidate&lt;br /&gt;
          (message &amp;quot;TeX-master : %s&amp;quot; (file-name-nondirectory candidate)))&lt;br /&gt;
      candidate))&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==emacs 에서 acutex를 사용하는경우 가장 기본적인 사용법==&lt;br /&gt;
&lt;br /&gt;
===TeX compile===&lt;br /&gt;
&lt;br /&gt;
:&amp;#039;&amp;#039;&amp;#039;C-c C-c&amp;#039;&amp;#039;&amp;#039; 를 입력하면 compile을 진행할 수 있습니다.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
단 아래와 같은 경우가 있을 수 있습니다.&lt;br /&gt;
&lt;br /&gt;
C-c C-c 했는데 emacs의 아래쪽에 &amp;#039;&amp;#039;&amp;#039;Command: (default view)&amp;#039;&amp;#039;&amp;#039; 라고 나오는 경우에는&lt;br /&gt;
&lt;br /&gt;
:C-c LaTeX RET&lt;br /&gt;
&lt;br /&gt;
를 진행해서 처리해주도록 합니다.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===TeX compile 결과보기===&lt;br /&gt;
&lt;br /&gt;
볼려고 할때는 C-c C-v 입니다.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===현재의 TeX engine 확인하기===&lt;br /&gt;
&lt;br /&gt;
:M-: TeX-engine RET&lt;br /&gt;
&lt;br /&gt;
위의 명령어를 emacs 에서 진행하면 &amp;#039;&amp;#039;&amp;#039;xetex&amp;#039;&amp;#039;&amp;#039; 라는걸 볼 수 있습니다. 그럼 kotex 에서 acutex 를 사용하는데 별 이상이 없는상태라는걸 확인할 수 있습니다.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==참고주소==&lt;br /&gt;
&lt;br /&gt;
* http://forums.gentoo.org/viewtopic-t-929982-start-0.html&lt;br /&gt;
* http://www.gentoo-wiki.info/LaTeX&lt;br /&gt;
* http://noexists.tistory.com/78&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==첨부파일==&lt;br /&gt;
&lt;br /&gt;
[[file:kotex_newrev_20130714.tar.7z]]&lt;/div&gt;</summary>
		<author><name>Onionmixer</name></author>
	</entry>
</feed>