Notice
Recent Posts
Recent Comments
Link
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
Archives
Today
Total
관리 메뉴

Astro Coke

[Cygwin] Using Tex Live in Cygwin 본문

Computer Setup

[Cygwin] Using Tex Live in Cygwin

astrodoo 2019. 4. 4. 02:06

Cygwin 에서 Latex 를 이용하려면, 

가장 쉬운 방법은 cygwin_setup 을 이용해서 tex package 를 설치하는 것이다.

하지만 이때 설치되는 latex 패키지는 Miktex 이나 TexLive 에 비해 작은 패키지를 

설치하기 때문에 

따로 패키지를 설치해야 하는 경우가 많다.

 

그래서 생각한 방법~! 

 

1) Tex Live Window용을 아래 사이트에서 다운 받아 설치한다.

 

https://tug.org/texlive/acquire-netinstall.html

 

 

2) cygwin terminal 을 열고 /usr/bin 폴더로 이동해 기본 명령어들을 연결한다.

Tex Live 가 C:\texlive 에 설치 되었다면 다음과 같이 연결할 수 있다.

 

e.g.)

 

> cd /usr/bin

> ln -s /cygdrive/c/texlive/2018/bin/win32/latex.exe latex

> ln -s /cygdrive/c/texlive/2018/bin/win32/pdflatex.exe pdflatex

> ln -s /cygdrive/c/texlive/2018/bin/win32/dvipdfm.exe dvipdfm

> ln -s /cygdrive/c/texlive/2018/bin/win32/dvipdfmx.exe dvipdfmx

> ln -s /cygdrive/c/texlive/2018/bin/win32/dvips.exe dvips

> ln -s /cygdrive/c/texlive/2018/bin/win32/ps2pdf.exe ps2pdf

> ln -s /cygdrive/c/texlive/2018/bin/win32/bibtex.exe bibtex

 

 

이제 cywin terminal 안에서 tex live full package 를 이용할 수 있다.

 

 

-----------------------------------------------------

 

이 후에 별도로 .cls .bst .bib 등을 설치하려면

 

Windows 시작 메뉴에서 

 

Program > Tex Live 2018 > Tex Live Command-Line

 

으로 터미널을 열어 

 

> kpsewhich -var-value=TEXMFHOME위의 명령어를 통해 기본 local tex directory 를 알아둔다.
예를 들면, 내 기본 디렉토리는,

C:\Users\astrodoo\texmf

로 출력된다.

그럼, 이후에 이곳에 다운받은 패키지들을 복사를 하면 되는데,
이때 주의를 해야할 사항은 Tree 구조를 지켜야 한다는 것.

.sty & .cls 파일은 tex/latex/<package folder>/ 
.bst 파일은 bibtex/bst/<package folder>/ 
.bib 파일은 bibtex/bib/<package folder>/

안에 복사를 해야 한다. 기존에 폴더가 없으면 생성을 해서 복사를 해야 한다. 

ex> aastex.cls 를 복사할 경우

> cp aastex.cls C:\Users\astrodoo\texmf\tex\latex\apj\

이후에는 latex 패키지를 업데이트 해주면 되는데, 

> texhash

를 통해서 할 수 있다.

개별적인 패키지들이 잘 설치되었는지 확인하는 방법은 간단하다.

kpsewhich <package name>

ex) > 
kpsewhich aastex.cls