- 追加された行はこの色です。
- 削除された行はこの色です。
*Cygwin [#y69b4c00]
[[Microsoft Windows]] > Cygwin
*[[Cygwin:https://www.cygwin.com/]] での TeX の利用 [#y69b4c00]
Cygwin は Microsoft Windows 上で動作する Linux(UNIX® 互換システム)ライクな環境です.
x86_64 版のインストーラがあります.
ここでは,Cygwin 上に TeX 環境を構築して利用する方法を説明します.
Cygwin で [[TeX Live]] を使用する場合は
- TeX Live 公式パッケージ
- TeX Live/Cygwin
の選択肢があります.
----
#contents
----
*Cygwin とは [#yd433e3a]
Cygwin は Microsoft Windows 上で動作する Linux (Unix) ライクな環境です.~
**TeX Live 公式パッケージ [#cfed3869]
-[[Cygwin project:http://www.cygwin.com/]]
以下の操作で wget というコマンドを使用しますが,Cygwin
インストール時にパッケージ選択画面で Default のままインストールした場合,wget
がインストールされていないので,そのコマンドが使えません.
あらためて setup-x86_64.exe
を立ち上げ,パッケージ選択画面で wget を検索し,Default から Install
に変更し,wget をインストールしましょう.
*[[TeX Live]] [#dead7b03]
また,TeX Live のインストールには [[Perl]] も必要です.
さらに,TeX で eps 形式の図を扱うときは [[Ghostscript]] も必要です.
少なくとも wget, Perl, Ghostscript は事前に
Cygwin にインストールしておきましょう.
Cygwin の setup.exe のパッケージ選択画面で [[TeX Live]] を選択してインストールできます.~
***TeX Live のインストール [#peed6637]
-All
-Publishing
-[[CygwinにTeXlive公式パッケージを導入する:http://vraisamis.hatenadiary.jp/entry/2013/11/19/213227]]
-http://www.tug.org/texlive/quickinstall.html
-http://www.tug.org/texlive/doc/texlive-en/texlive-en.html#installation
を参照.
[[ミラーサイト>TeX Live#tlnet]]から
install-tl-unx.tar.gz をダウンロードします.
$ wget http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz
install-tl-unx.tar.gz を展開します.
$ tar xvf install-tl-unx.tar.gz
展開したインストーラのディレクトリに移動します.
$ cd install-tl-2*
インストーラを実行します.
オプションでダウンロードするリポジトリを指定できます.
$ ./install-tl -no-gui -repository http://mirror.ctan.org/systems/texlive/tlnet/
asymptote: Vector graphics language for TeX
jgraph: A Filter for Plotting Graphs in Postscript
libkpathsea-devel: TeX file and path search library (development)
libkpathsea6: TeX file and path search library (runtime)
libpaper: Paper handling library (sources)
libpaper-bin: Paper handling library (utilities)
libpaper-devel: Paper handling library (development)
libpaper1: Paper handling library (runtime)
libptexenc-devel: TeX Unicode encoding library (development)
libptexenc1: TeX Unicode encoding library (runtime)
lyx: A latex-based WYSIWYM word processor
pdftk: PDF manipulation without Acrobat.
texlive: TeX Live binaries
texlive-collection-basic: TeX Live basic packages
texlive-collection-bibtexextra: TeX Live extra BibTeX packages
texlive-collection-binextra: TeX Live additional commands
texlive-collection-context: TeX Live ConTeXt packages
texlive-collection-documentation-arabic: TeX Live Arabic documentation
texlive-collection-documentation-base: TeX Live common documentation files
texlive-collection-documentation-bulgarian: TeX Live Bulgarian documentation
texlive-collection-documentation-chinese: TeX Live Chinese documentation
texlive-collection-documentation-czechslova: TeX Live Czech and Slovak documentation
texlive-collection-documentation-dutch: TeX Live Dutch documentation
texlive-collection-documentation-english: TeX Live English documentation
texlive-collection-documentation-finnish: TeX Live Finnish documentation
texlive-collection-documentation-french: TeX Live French documentation
texlive-collection-documentation-german: TeX Live German documentation
texlive-collection-documentation-italian: TeX Live Italian documentation
texlive-collection-documentation-japanese: TeX Live Japanese documentation
texlive-collection-documentation-korean: TeX Live Korean documentation
texlive-collection-documentation-mongolian: TeX Live Mongolian documentation
texlive-collection-documentation-polish: TeX Live Polish documentation
texlive-collection-documentation-portuguese: TeX Live Portuguese documentation
texlive-collection-documentation-russian: TeX Live Russian documentation
texlive-collection-documentation-serbian: TeX Live Serbian documentation
texlive-collection-documentation-slovenian: TeX Live Slovenian documentation
texlive-collection-documentation-spanish: TeX Live Spanish documentation
texlive-collection-documentation-thai: TeX Live Thai documentation
texlive-collection-documentation-turkish: TeX Live Turkish documentation
texlive-collection-documentation-ukrainian: TeX Live Ukrainian documentation
texlive-collection-documentation-vietnamese: TeX Live Vietnamese documentation
texlive-collection-fontsextra: TeX Live extra fonts
texlive-collection-fontsrecommended: TeX Live recommended fonts
texlive-collection-fontutils: TeX Live font utilities
texlive-collection-formatsextra: TeX Live support for miscellaneous other formats
texlive-collection-games: TeX live support for typesetting games
texlive-collection-genericextra: TeX Live extra generic packages
texlive-collection-genericrecommended: TeX Live recommended generic packages
texlive-collection-htmlxml: TeX Live HTML/SGML/XML packages
texlive-collection-humanities: TeX Live packages for law, linguistics, and humanities
texlive-collection-langafrican: TeX Live African language support
texlive-collection-langarabic: TeX Live Arabic language suppport
texlive-collection-langcjk: TeX Live Chinese/Japanese/Korean language support
texlive-collection-langcroatian: TeX Live Croatian language support
texlive-collection-langcyrillic: TeX Live Cyrillic language support
texlive-collection-langczechslovak: TeX Live Czech and Slovak language support
texlive-collection-langfinnish: TeX Live Finnish language support
texlive-collection-langfrench: TeX Live French language support
texlive-collection-langgerman: TeX Live German language support
texlive-collection-langgreek: TeX Live Greek language support
texlive-collection-langhebrew: TeX Live Hebrew language support
texlive-collection-langindic: TeX Live Indic language support
texlive-collection-langitalian: TeX Live Italian language support
texlive-collection-langlithuanian: TeX Live Lithuanian language support
texlive-collection-langmongolian: TeX Live Mongolian language support
texlive-collection-langpolish: TeX Live Polish language support
texlive-collection-langportuguese: TeX Live Portuguese language support
texlive-collection-langspanish: TeX Live Spanish language support
texlive-collection-langswedish: TeX Live Swedish language support
texlive-collection-langtibetan: TeX Live Tibetan language support
texlive-collection-langturkmen: TeX Live Turkmen language support
texlive-collection-langvietnamese: TeX Live Vietnamese language support
texlive-collection-latex: TeX Live core LaTeX support
texlive-collection-latexextra: TeX Live extra LaTeX packages
texlive-collection-latexrecommended: TeX Live recommended LaTeX packages
texlive-collection-luatex: TeX Live LuaTeX packages
texlive-collection-mathextra: TeX Live extra math typesetting packages
texlive-collection-metapost: TeX Live MetaPost packages
texlive-collection-music: TeX Live music typesetting support
texlive-collection-omega: TeX Live Omega packages
texlive-collection-pictures: TeX Live graphics packages
texlive-collection-plainextra: TeX Live extra plain TeX packages
texlive-collection-pstricks: TeX Live PSTricks packages
texlive-collection-publishers: TeX Live support for publishers, standards, conferences, etc.
texlive-collection-science: TeX Live science typesetting packages
texlive-collection-texinfo: TeX Live TeXinfo macros
texlive-collection-xetex: TeX Live XeTeX macros
...
Actions:
<I> start installation to hard disk
<H> help
<Q> quit
Enter command: I
*関連リンク [#bc8cfcc3]
I を入力してインストールを開始します.
-[[[ANNOUNCEMENT] New packages: texlive-20110705-1, texlive-collection-*-20120202-1, libkpathsea{6,-devel}-20110705-1, libptexenc{1,-devel}-20110705-1, asymptote-2.15-1:http://cygwin.com/ml/cygwin/2012-03/msg00120.html]]
-[[tlptexliveリポジトリ:http://tutimura.ath.cx/ptexlive/?tlptexlive%A5%EA%A5%DD%A5%B8%A5%C8%A5%EA]]
-[[Using LaTeX in Japanese on Cygwin.:http://www.mmsp.nitech.ac.jp/~k09/edit.php?tips%2FCygwin%20%E3%81%A7%E6%97%A5%E6%9C%AC%E8%AA%9E%20TeX%202011%20%E5%B9%B4%E7%89%88]]
サーバーの接続エラーが発生したり,アーカイブ中に予期せぬ EOF があったりした場合はインストールが途中でストップします.
エラーが発生した場合は以下のコマンドで途中から再開できたりできなかったりします.
$ ./install-tl -no-gui -profile installation.profile
ABORTED INSTALLATION FOUND: installation.profile
Do you want to continue with the exact same settings as before (y/N): y
再開できない場合は[[接続先を変更>TeX Live#tlnet]]するか,または
[[ISO ファイル>TeX Live#iso]]をミラーサイトからダウンロードしてインストールしてください.
インストールが終了したら /usr/local/bin
ディレクトリ配下にシンボリックリンクを追加します.
$ /usr/local/texlive/????/bin/*/tlmgr path add
***アップデート [#k71f6600]
アップデートには [[tlmgr]] を使用します.
$ tlmgr update --self --all
を実行すれば OK です.
ただし,アップデートによってパッケージや設定が変更されて,今まで動いていたものが動かなくなったりすることがあるかもしれません.
-/usr/local/texlive/????/tlpkg/backups
にパッケージのバックアップが保存されますので,アップデートによって動作しなくなった場合は以前のバージョンに戻してください.
***タイプセットのしかた [#dab5905e]
(u)pLaTeX + dvipdfmx を実行する場合は [[ptex2pdf]] が便利です.
-pLaTeX + dvipdfmx の場合
$ ptex2pdf -l -ot '-synctex=1' foo.tex
-upLaTeX + dvipdfmx の場合
$ ptex2pdf -u -l -ot '-synctex=1' foo.tex
**TeX Live/Cygwin &aname(texlive-cygwin); [#xad0a00d]
TeX Live 由来のパッケージが,texlive.tlpkg に沿ったパッケージングによって
Cygwin 本家から提供されています.
TeX Live のパッケージが一通りそろっていれば問題ないというユーザにとっては十分です.
いわゆる OS のパッケージングなので,Cygwin 本家のパッケージングシステムから独自に変更を加えることに対する対応は甘いという点に,ヘビーユーザは気を付ける必要があります.
***TeX Live/Cygwin 64-bit 版 (x86_64) [#u7b94ff6]
-https://cygwin.com/cgi-bin2/package-grep.cgi?grep=texlive&arch=x86_64
-https://cygwin.com/cygwin/packages/x86_64/texlive-collection-langjapanese/
-https://cygwin.com/cygwin/packages/x86_64/texlive/
-http://ftp.jaist.ac.jp/pub/cygwin/noarch/release/texlive-collection-langjapanese/
-http://ftp.jaist.ac.jp/pub/cygwin/x86_64/release/texlive/
***TeX Live/Cygwin のインストール [#fc129d62]
Cygwin オフィシャルインストーラの setup-x86_64.exe を使って TeX Live/Cygwin をインストールできます.
パッケージ選択画面で Publishing を Default から Install に変更すると TeX Live/Cygwin がフルインストールされます.
***タイプセットのしかた [#ba49fc90]
(u)pLaTeX + dvipdfmx を実行する場合は [[ptex2pdf]] が便利です.
使用法は上の TeX Live 公式パッケージの該当項目を参照してください.
**注意点 [#o2b6fd0e]
***TeX Live/Cygwin の dvipdfmx が TeX Live 公式パッケージの dvipdfmx よりも優先的に実行されて Unable to find TFM file のエラーが発生することがある [#yc6e672e]
TeX Live/Cygwin の dvipdfmx が TeX Live 公式パッケージの dvipdfmx よりも優先的に実行されて Unable to find TFM file のエラーが発生することがあるようです.
TeX Live 公式パッケージの dvipdfmx が優先的に実行されるように PATH を変更するとうまくいくようです.
-[[Unable to find TFM file “″ で2時間無駄にした:http://masuku0w0.hatenablog.jp/entry/2016/04/27/013612]]
-https://twitter.com/I1zkE/status/723790138212376577 , https://twitter.com/I1zkE/status/723795415124996096
-[[【cygwin】w32texとの競合問題:http://bluepost69-tech.hatenablog.com/entry/2016/01/22/031818]]
**不具合 [#iffd4e02]
***TeX Live/Cygwin の dvipdfmx が rungs の呼び出しに失敗する → /usr/share/texmf-dist/dvipdfmx/dvipdfmx.cfg を修正する [#oe289452]
TeX Live/Cygwin の [[dvipdfmx]] がうまく動作しない場合は
/usr/share/texmf-dist/dvipdfmx/dvipdfmx.cfg を修正します.
デフォルトでは
D "rungs -q -dNOPAUSE -dBATCH -dEPSCrop -sDEVICE=pdfwrite -dCompatibilityLevel=%v -dAutoFilterGrayImages=false -dGrayImageFilter=/FlateEncode -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -sOutputFile='%o' '%i' -c quit"
に設定されています.
Ghostscript のコマンド名が gs の場合は
D "gs -q -dNOPAUSE -dBATCH -dEPSCrop -sDEVICE=pdfwrite -dCompatibilityLevel=%v -dAutoFilterGrayImages=false -dGrayImageFilter=/FlateEncode -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -sOutputFile='%o' '%i' -c quit"
に修正します.
-[[dvipdfmx fails to call rungs:https://cygwin.com/ml/cygwin/2013-01/msg00366.html]]
--[[Re: dvipdfmx fails to call rungs:https://cygwin.com/ml/cygwin/2013-01/msg00370.html]]
-[[Cygwin の TeXLive の dvipdfmx が失敗する:http://d.hatena.ne.jp/tsntsumi/20120514/DvipdfmxInTexLiveOnCygwinFailed]] → [[Cygwin の TeXLive の dvipdfmx が成功した:http://d.hatena.ne.jp/tsntsumi/20120515/DvipdfmxInTeXLiveOnCygwinSucceeded]]
**関連リンク [#bc8cfcc3]
-[[Cygwin:https://www.cygwin.com/]]
--[[The Cygwin Project mailing list archives:https://cygwin.com/ml/cygwin/]]
--[[The cygwin-announce mailing list archives:https://cygwin.com/ml/cygwin-announce/]]
--[[The cygwin-apps mailing list archives:https://cygwin.com/ml/cygwin-apps/]]
-[[Cygwin Ports project:http://sourceware.org/cygwinports/]]
-[[gnupack:http://gnupack.osdn.jp/docs/latest/UsersGuide.html]]
***動作環境 [#n6af06c2]
-http://www.cygwin.com/faq.html#faq.what.supported
***License [#fe355f24]
GPLv3
-https://www.cygwin.com/faq.html#faq.what.free
-https://cygwin.com/licensing.html
***ChangeLog [#t7089ab8]
-https://cygwin.com/git/gitweb.cgi?p=newlib-cygwin.git
--https://cygwin.com/git/gitweb.cgi?p=newlib-cygwin.git;a=shortlog
--https://cygwin.com/git/gitweb.cgi?p=newlib-cygwin.git;a=log