TeXShop ã®æ¥æ¬èªãã«ããã¡ã€ã«ã®ã¢ãŒã«ã€ã (v1-3) ã§ãã
äœæ¥åœæã®æ¥è±å¯Ÿèš³ããã¹ããã¢ããããŠããŸãã
#Advanced HelpïŒäžçŽåãã®ãã«ãïŒïŒãã®ïŒïŒ
##UnicodeïŒãŠãã³ãŒãïŒ
âUnicode is a format which can simultaneously encode characters from languages across the world: Arabic, Chinese, Greek, Hebrew, Japanese, Roman, Russian, and a host of others. Cocoa can produce Unicode, so TeXShop can as well. To experiment, open the International preference in the System Preferences program, choose the Input Menu tab, and add additional selections to the items already selected. It is illuminating to select Greek (because it is familiar), Hebrew (because it is written from right to left), Arabic (because it is written from right to left and makes extensive use of ligatures, so characters have different shapes at the ends of words than in the middle) and Chinese. A new menu item will appear with a flag indicating the current input language.
ãâ ãUnicode ã¯äžçã®äž»èŠãªèšèªïŒã¢ã©ãã¢èªãäžåœèªãã®ãªã·ã¢èªãããã©ã€èªãæ¥æ¬èªãããŒãåããã·ã¢èªããã®ä»ã®å€ãã®èšèªïŒã®æåããåäžã®æåã³ãŒãäœç³»ã§åŠçããä»çµã¿ã§ãã Cocoa ã®ããã¹ãåŠç㯠Unicode ãããŒã¹ã«ãªã£ãŠããã®ã§ã TeXShop ã§ããã®ãŸãŸ Unicode ãæ±ãããšãã§ããŸãã Unicode ãå®éã«ã©ããªæããªã®ãè©ŠããŠã¿ãã«ã¯ã ãã·ã¹ãã ç°å¢èšå®ããããèšèªç°å¢ããéãã ãå ¥åã¡ãã¥ãŒãã¿ãã§ããã§ã«ãå ¥ãã«ãªã£ãŠãããã®ã«å ããŠå¥ã®èšèªãéžãã§ã¿ãŠãã ãããããšãã°ãã®ãªã·ã¢èªïŒããç¥ãããŠããŸããïŒãããã©ã€èªïŒå³ããå·ŠãžæžããŸãïŒãã¢ã©ãã¢èªïŒå³ããå·Šãžæžãããããªã¬ãã£ãååããåºç¯ã«äœ¿çšããã®ã§èªæ«ãšèªäžãšã§ã¯åäœãç°ãªããŸãïŒããããã¯äžåœèªãªã©ãéžãã§ã¿ããšããããããã§ããããè¿œå ããå ¥åã¡ãã¥ãŒã¯ãçŸåšã®å ¥åèšèªã瀺ãåœæã§è¡šç€ºãããŸãã
âType some characters, switch to another language, and type some more.
ãâ ãæ°æåæã¡èŸŒãã§ã¿ãŠãããä»ã®èšèªã«å€ããããã«ãŸãæã¡èŸŒãã§ã¿ãŸãã
âThere are several formats for Unicode files. A preference item allows users to select two of them. Standard OS X Unicode is the usual code used by Mac OS X, but I do not know if this is useful in the TeX world. UTF-8 Unicode is a popular format because ordinary ascii characters appear as they usually do. If a file is saved in UTF-8 format, TeX can process it, but it will convert Unicode characters to question marks.
ãâ ãUnicode ãã¡ã€ã«ã«ã¯ããã€ãã®åœ¢åŒããããŸããç°å¢èšå®é ç®ã§ã¯ãã®ãã¡ã®ïŒã€ãéžã¹ãŸããæšæºç㪠OS X Unicode 㯠Mac OS X ã§ã¯ãã䜿ãããŸãããããã TeX ã®äžçã§æçšãªã®ãã©ããã«ã€ããŠã¯ããããŸããã UTF-8 Unicode ã¯ãæ®éã® ASCII ãã£ã©ã¯ã¿ãŒãæ®éã«è¡šç€ºãããã®ã§äººæ°ã®é«ãæ¹åŒã§ãã UTF-8 圢åŒã§ãã¡ã€ã«ãä¿åããã° TeX ã§åŠçããããšãã§ããŸããã Unicode æåã¯çå笊ã«çœ®ãæããããŠããŸããŸãã
âThere is a TeX package which accepts UTF-8 Unicode input files; see
ãâ ãUTF-8 Unicode ã§å ¥åããããã¡ã€ã«ãæ±ãã TeX ããã±ãŒãžããããŸã ïŒ äžèšãåç §ããŠãã ããââ
-
http://www.ctan.org/tex-archive/macros/latex/contrib/supported/unicode/
-
è£è¶³ïŒãªã³ã¯äžå šã以äžãåç §
-
http://www.ctan.org/tex-archive/macros/latex/contrib/unicode/
ãUTF ããã±ãŒãžå¯Ÿå¿ãã«ã€ããŠ
TeXShop 1.35 ã§ã¯ãpTeX çšã«UTF ããã±ãŒãžïŒutf.styïŒããµããŒããããããã«ãªããŸããã
ç°å¢èšå®ããã«ã®ã詳现ãã¿ãå ã«ãUTF ããã±ãŒãžå¯Ÿå¿ããšããé ç®ããããŸããããã«ãã§ãã¯ãå ¥ããããšã§ TeXShop ã¯ãpTeX ã察å¿ããŠãªãæåïŒJIS X0208 以å€ã®æåïŒã utf.sty ã®åœ¢åŒã«å€æããŸããããšãã°ãUnicode æå㯠\UTF{Hex code} ãšãªããé-Unicode æå㯠\CID{glyph ID} ãšãªããŸãã
ãã®æ©èœããµããŒããããããšã«ããå©ç¹ã¯ãTeXShop å èµã®ãšãã£ã¿ã§ãé·ãããéããšãã£ãæåãçŽã«å ¥åã§ããããšããããšã§ããèšãæããã°ãã³ãŒãè¡šã調ã¹ãããã§æ¬æäžã« \UTF{9DD7} ã \UTF{9592}ïŒãªãã㯠\CID{07646} ã \CID{08685} ïŒãªã©ãšæžãæéãçãããšããããšã§ãã
- ããã®ããã®å€æããŒãã«ãèŠãŠã¿ããã®ã§ãããã©ãã«æ
å ±ãããã§ããããïŒãïŒè§è€ããã® utf8toutf ã³ãã³ããšã¯å¥ç©ãªã®ã§ããããïŒïŒ
- Cocoa ã® API 㧠ïŒïŒJISã«å€æã§ããæåâãã®ãŸãŸãïŒïŒUTF8ã«å€æã§ããæåâ\UTFãïŒïŒæ®ãâ\CIDããšããåŠçãè¡ã£ãŠããã¯ãã§ããå€æããŒãã«ã¯çšæããŠããŸããã ã©ããããããšãããããŸããCocoa ã® API ã¯ãUTFã³ãŒããCIDã³ãŒããæ¢ããŠãããã®ã§ãããã©ããã«è©³ããæ å ±ã¯ããã§ããããïŒ
- ç§ã¯ããŸã詳ãããªãã®ã§ãTeXShop ã®ãœãŒã¹ã³ãŒãå ããCIDããäœè åã®ãItohãã§æ€çŽ¢ããŠäžãããŸããïŒãã圹ã«ç«ãŠãç³ãèš³ãããŸãã...
å©çšããã«ããã£ãŠã¯ãutf.sty ãã€ã³ã¹ããŒã«ããããã§ãããªã¢ã³ãã«éšã«ã
\usepackage{utf}
ãšèšè¿°ããå¿ èŠããããŸãã ïŒ otf.sty ã«ã€ããŠããå©çšå¯èœã®ããã§ããïŒ
UTF ããã±ãŒãžã»OTF ããã±ãŒãžã«ã€ããŠã®ããã«è©³ããæ å ±ã¯ã以äžãã芧ãã ããã
ãè£è¶³ã
- å°å·çã® pTeX ããã±ãŒãžãå°å ¥ããå Žåã¯ãã€ã³ã¹ããŒã«æã«çµã¿èŸŒãŸããã®ã§ãæ¹ã㊠utf.sty ãã€ã³ã¹ããŒã«ããå¿ èŠã¯ãããŸããã
- ãUTF ããã±ãŒãžå¯Ÿå¿ãæ©èœã¯ãæ¥æ¬èªç³»ã®ãã¹ãŠã®ãšã³ã³ãŒãã£ã³ã°æ¹åŒã§å©çšå¯èœã§ãããSJISX0213 ã«ã€ããŠã¯ãããã«å¯Ÿå¿ãã pTeX ããã±ãŒãžãå©çšããå¿ èŠããããŸãã
- ã°ãªãæ©èœïŒCIDïŒã䜿ããšãã«ã¯ããã©ã®ããã©ã³ããçšããã®ãç¡é£ã§ãããã
##BibTeXïŒ BibTeX ïŒ
âBibTeX is a tool used to create bibliographies in LaTeX documents. The tool assumes that you have a large database of references which you often quote. Simple commands allow you to cite certain of these references in your LaTeX source, and BibTeX then creates a bibliography for your article containing only the items cited.
ãâ ãBibTeX 㯠LaTeX ææžå ã«åèæç®ç®é²ãäœæããããã®ããŒã«ã§ãããã®ããŒã«ã¯ããã°ãã°åŒçšããæç®ãéæããããŒã¿ããŒã¹ãããããšãåæãšããŠããŸããã·ã³ãã«ãªã³ãã³ãã䜿ã£ãŠ LaTeX ãœãŒã¹å ã§æç®ã®äžéšãåç §ããããšãã§ããŸãââBibTeX ã¯ãè«æå ã§åç §ããé ç®ã ããå«ãã åèæç®ç®é²ãäœæããŸãã
ïŒèš³æ³šïŒpTeX ãã£ã¹ããªãã¥ãŒã·ã§ã³ã«ã¯æ¥æ¬èªã«å¯Ÿå¿ãã jBibTeX ãå«ãŸããŠããŸããTeXShop ã®ç°å¢èšå®ããã«ã§ã¯ãBibTeX ã®ä»£ããã« jBibTeX ã䜿ããããèšå®ããããšãã§ããŸãïŒ
âHere is a brief example taken from The LaTeX Companion by Goossens, Mittelbach, and Samarin. Consult this book for many additional details. Suppose the database is a file called "mybibliography.bib" containing the text shown below. In this text, the entries "Felici:1991, Knuth:WEB," and "Liang:1983" are key values used to cite the articles in the LaTeX source.
ãâ ãããã« Goossens ã» Mittelbach ã» Samarin ã®å ±èãThe LaTeX Companionãããåã£ãçãäŸããããŸãããã詳ããããšã«ã€ããŠã¯ãã®æ¬ã§ã調ã¹ãã ãããããŒã¿ããŒã¹ã¯ãmybibliography.bibããšããååã®ãã¡ã€ã«ã§ã以äžã«ç€ºãããã¹ããå«ããã®ãšããŸãããã®ããã¹ãå ã®ãç»é²é ç®ãFelici:1991ã ãKnuth:WEBã ãLiang:1983ãã¯ã LaTeX ãœãŒã¹å ã§è«æãåç §ããã®ã«äœ¿ãããéµå€ïŒåç §åïŒã§ãã
-
è£è¶³ïŒãThe LaTeX ã³ã³ãããªã³ãã¢ã¹ããŒæžç±ç·šééšç£èš³ïŒ1998幎ïŒ
@article{Felici:1991, author ={James Felici}, title ={{PostScript versus TrueType}}, journal ={Macworld}, volume =8, pages={195--201}, month =sep, year = 1991 } @techreport{Knuth:WEB, title ={{The \textsf{WEB} System of Structured Documentation}}, month =sep, year = 1983, author ={Donald E. Knuth}, address ={Stanford, CA 94305}, number ={STAN-CS-83-980}, institution={Department of Computer Science, Stanford University} } @phdthesis{Liang:1983, author ={Franklin Mark Liang}, month =jun, year = 1983, school ={Stanford University}, address ={Stanford, CA 94305}, title ={{Word Hy-phen-a-tion by Com-pu-ter}}, note ={Also available as Stanford University, Department of Computer Science Report No. STAN-CS-83-977} }
âSuppose the LaTeX source file is called "myfile.tex" and contains the following text:
ãâ ãLaTeX ã®ãœãŒã¹ãã¡ã€ã«ã¯ãmyfile.texããšããååã§ã以äžã®ããã¹ããå«ããã®ãšããŸãïŒ
\begin{document}
Consider the argument of Felici~\cite{Felici:1991} in light of these comments.
\nocite{Liang:1983} We provide further remarks later.
\bibliographystyle{plain}
\bibliography{mybibliography}
\end{document}
âWhen this source is typeset, a reference to Felici's article will appear in the text, and a bibliography will be created at the end of the text containing the articles of Felici and Liang, but not the article of Knuth.
ãâ ããã®ãœãŒã¹ãã¿ã€ãã»ãããããšã Felici ã®è«æãžã®åç §ãæç« å ã«ç€ºãããåèæç®ç®é²ãæç« ã®æåŸã«äœæãããŸãââããã«ã¯ Felici ãš Liang ã®è«æã¯ãããŸããã Knuth ã®è«æã¯èŠããããŸããã
âTeXShop can be used with this example in the following way. First edit and typeset the document "myfile.tex" as usual. Citations will appear in the output as "[?]" and the bibliography will be missing. Then select "BibTeX" under the Program button and run BibTeX. Next select "LaTeX" and typeset again. Citations will still appear as "[?]", but the bibliography will be added to the output. Typeset a final time, and citations will have their correct values.
ãâ ãTeXShop ã§ã¯æ¬¡ã«ç€ºãæ¹æ³ã§ãã®äŸãå©çšã§ããŸããæåã«ãmyfile.texããšããææžããã€ãéãã«ç·šéããŠã¿ã€ãã»ããããŸããåç §ã¯ã [?] ããšããŠåºåçµæã«ç€ºãããåèæç®ç®é²ã¯æ¬ èœããŸãããã®ãŸãŸããã°ã©ã ã»ãã¿ã³ã«ãããBibTeXããéžæããŠå®è¡ããŸãã次ã«ãLaTeXããéžãã§å床ã¿ã€ãã»ããããŸããåç §ã¯ãªããã [?] ããšè¡šç€ºãããŸãããåèæç®ç®é²ã¯åºåã«ä»ãå ãããŸããæçµçã«ã¿ã€ãã»ãããããšãåç §ãæ£ããå€ã«ãªã£ãŠããŸãã
âThe file "mybibliography.bib" can be opened and edited by TeXShop. If you use TeXShop to create the file "mybibliography.bib" in the first place, use the pulldown tag labeled "file format" to save the file as a bib file rather than as a tex file.
ãâ ããmybibliography.bibããšãããã¡ã€ã«ã¯ã TeXShop ã§éãããç·šéãããã§ããŸããããæåãã TeXShop ã䜿ã£ãŠãmybibliography.bibããäœæããã®ã§ããã°ãä¿åç»é¢ã®ããã©ãŒãããïŒããšè¡šç€ºã®ãããã«ããŠã³ã¡ãã¥ãŒã§ã tex ãã¡ã€ã«ã§ã¯ãªã bib ãã¡ã€ã«ãšããŠä¿åããŸãã
##MakeIndexïŒ MakeIndex ïŒ
âMakeIndex is a tool used to add an index to a LaTeX document. To create such an index, you should
ãâ ãMakeIndex 㯠LaTeX ææžã«çŽ¢åŒïŒã€ã³ããã¯ã¹ïŒãä»ããã®ã«äœ¿ãããããŒã«ã§ãã玢åŒãäœæããã«ã¯ã以äžã®ããã«ããŸãââ
-
âa. Add the command "\usepackage{makeidx}" to the top of the source file
-
ãâ ãa. ãœãŒã¹ãã¡ã€ã«ã®åé ã«ã³ãã³ãã\usepackage{makeidx}ããå ãã
-
âb. Put a "\makeindex" command in the document preamble
-
ãâ ãb. ã\makeindexãã³ãã³ããããªã¢ã³ãã«ã«å ¥ãã
-
âc. Put a "\printindex" command where the index should appear, often just before "\end{document}"
-
ãâ ãc. 玢åŒã衚瀺ããããå Žæã«ã\printindexãã³ãã³ããå ¥ããââãããŠãã¯ã\end{document}ãã®æå
-
âd. Put index references in the source document, as in the example below:
-
ãâ ãd. ãœãŒã¹å ã§çŽ¢åŒèªãæ瀺ããââäžã®äŸã®ããã«ïŒ
"There are many animals in the world\index{animal}. Examples include bears\index{animal!bear} and tigers\index{animal!tiger} and various insects\index{insect|see{animal}}."
ãäžçã«ã¯æ°å€ãã®åç©ãããŸã\index{ã©ãã¶ã€@åç©}ãåç©ã«ã¯ã¯ã\index{ã©ãã¶ã€@åç©!ã¯ã}ã ãã©\index{ã©ãã¶ã€@åç©!ãã©}ãããã«å€çš®å€æ§ãªæè«\index{ããã¡ã ã@æè«|see{ã©ãã¶ã€@åç©}} ãå«ãŸããŸããã
-
蚳泚ïŒæ¥æ¬èªéšå㯠mendex çšã®ã³ãã³ãã«çœ®ãæããŸããã
âTo create the index, typeset the document as usual. Then run MakeIndex. Then typeset again.
ãâ ã玢åŒãäœæããã«ã¯ããã€ãéãã«ææžãã¿ã€ãã»ããããŸããã€ã¥ã㊠MakeIndex ãå®è¡ããŸãããã®åŸã§å床ã¿ã€ãã»ãããè¡ãªããŸãã
âMany additional details can be found in The LaTeX Companion by Goossens, Mittelbach, and Samarin.
ãâ ãããã«è©³ããããšã«ã€ããŠã¯ã Goossens ã» Mittelbach ã» Samarin ã®å ±èãThe LaTeX Companionãã«æžãããŠããŸãã
- è£è¶³ïŒãThe LaTeX ã³ã³ãããªã³ãã¢ã¹ããŒæžç±ç·šééšç£èš³ïŒ1998幎ïŒ
##Opening Other Files with TeXShopïŒãã®ä»ã®ãã¡ã€ã«ã TeXShop ã§éãïŒ
âTeXShop can open most files for editing. This facility has been provided so users can read TeX-related files with extensions ".log", ".aux", etc. Files with extensions ".jpg", ".tif", ".eps", or ".pdf" are opened as graphic files.
ãâ ãTeXShop ã§ã¯ç·šéçšã«ãããŠãã®ãã¡ã€ã«ãéãããšãã§ããŸããããã«ããã.logããã.auxããªã©ã®æ¡åŒµåãä»ãã TeX é¢é£ãã¡ã€ã«ãèªãããšãã§ããŸãã ã.jpgã ã.tifã ã.epsããããã¯ã.pdfããªã©ã®æ¡åŒµåãä»ãããã¡ã€ã«ã¯ã°ã©ãã£ãã¯ã»ãã¡ã€ã«ãšããŠéãããŸãã
âTeXShop can also open ".dvi" and ".ps" files. In these cases, it converts the file to pdf and displays this pdf file.
ãâ ãTeXShop ã¯ãŸãã.dviããšã.psããã¡ã€ã«ãéãããšãã§ããŸãããã®å Žåããã¡ã€ã«ã¯ pdf ã«å€æããã pdf ãã¡ã€ã«ã衚瀺ãããŸãã
âTeXShop can open ".ins", ".dts", ".sty", ".cls", "mf", ".def", ".fd", ".ltx", ".clo", and "mp" files for processing. It can open any text file.
ãâ ãTeXShop ã¯ã.insã ã.dtsã ã.styã ã.clsã ãmfã ã.defã ã.fdã ã.ltxã ã.cloãããã«ãmpã圢åŒã®ãã¡ã€ã«ãéããŠåŠçããããšãã§ããŸããããã¹ããã¡ã€ã«ãªãã©ã®ãããªãã®ã§ãéããŸãã
âIt is not a good idea to use TeXShop as a general editor. TeXShop can read files written in UniCode and other formats, but it saves files in the format chosen in Preferences. Consequently, information may be lost if TeXShop is used to edit files which really aren't related to TeX.
ãâ ãTeXShop ãäžè¬çãªãšãã£ã¿ãšããŠäœ¿ãããšããã®ã¯ãããèãã§ã¯ãããŸããã TeXShop ã§ã¯ Unicode ããã®ä»ã®åœ¢åŒã§æžããããã¡ã€ã«ãèªã¿èŸŒãããšãã§ããŸããããã¡ã€ã«ã®ä¿åã¯ç°å¢èšå®ã§éžæãã圢åŒã«ãªããŸãããããã£ãŠã TeX ãšã¯ãŸãã§é¢ä¿ã®ãªããã¡ã€ã«ãç·šéããã®ã« TeXShop ãçšãããšãæ å ±ã倱ãããå¯èœæ§ããããŸãã
##MathematicaïŒ Mathematica ïŒ
âMathematica can save images in eps format. These files can be used by either typesetting option; as explained above, they are automatically converted to pdf if typeset with pdflatex.
ãâ ãMathematica 㯠eps 圢åŒã§ã€ã¡ãŒãžãä¿åããããšãã§ããŸãããã®ãã¡ã€ã«ã¯ããããã®ã¿ã€ãã»ããæ¹åŒã§ãå©çšã§ããŸã ïŒ å ã«èª¬æããããã«ã pdflatex ã§ã¿ã€ãã»ãããè¡ãªãã°ãèªåçã« pdf ãžãšå€æãããŸãã
âThe eps files produced by Mathematica use the Macintosh line feed conventions. Earlier versions of TeXShop and teTeX required that these files be converted to use Unix line feeds before converting them to pdf format, but that is no longer necessary.
ãâ ãMathematica ã§äœæãã eps ãã¡ã€ã«ã§ã¯ã Macintosh ã®æ¹è¡ã³ãŒãïŒ CR ïŒãçšããããŸãã TeXShop ããã³ teTeX ã®åæã®ããŒãžã§ã³ã§ã¯ã pdf 圢åŒãžãšå€æããåã« UNIX ã®æ¹è¡ã³ãŒãïŒ LF ïŒã«å€æããŠãããã°ãªããŸããã§ããããä»ã¯ããäžèŠã«ãªããŸããã
##LocalizationsïŒååœèªçãžã®ããŒã«ã©ã€ãº ïŒ
âTeXShop contains a Dutch localization Maarten Sneep, a French localization by Jerome Laurens, a German localization by Keith J. Schultz, Sascha Beverungen, Martin Kerz, and Max Horn, an Italian localization by Giuseppe Carlino, a Japanese localization by Seiji Zenitani, a Spanish localization by Juan L. Varona, and a Portuguese localization by Paulo T. Abreu. Thanks!
ãâ ãTeXShop ã«ã¯ä»¥äžã®ããŒã«ã©ã€ãºãå«ãŸããŸãââ Maarten Sneep ã«ãããªã©ã³ãèªçã JérÃŽme Laurens ã«ãããã©ã³ã¹èªçã Keith J. Schultz ã» Sascha Beverungen ã» Martin Kerz ã» Max Horn ã«ãããã€ãèªçã Giuseppe Carlino ã«ããã€ã¿ãªã¢èªçãéè°·èª åžããã«ããæ¥æ¬èªçã Juan L. Varona ã«ããã¹ãã€ã³èªçããã㊠Paulo T. Abreu ã«ãããã«ãã¬ã«èªçã§ããããããšãïŒ
âIn Japan, modified versions of TeX and LaTeX called ptex and platex are sometimes used. TeXShop has been modified by Makoto Inoue, Seiji Zenitani, and Mitsuhiro Shishikura to deal with these versions. See files in the TeXShop distribution folder on my web site. See http://macwiki.sourceforge.jp/cgi-bin/wiki.cgi?TeXShop for further details. Ptex and platex are available at http://www.ascii.co.jp/pb/ptex/. Dvipdfmx is available at http://project.ktug.or.kr/dvipdfmx/. A dvi previewer for Japanese is available at http://macptex.appi.keio.ac.jp/~uchiyama/macptex.html.
ãâ ãæ¥æ¬ã§ã¯ã TeX ãš LaTeX ãä¿®æ£ããããŒãžã§ã³ââ pTeX ãš pLaTeX ã䜿ãããããšããããŸãããããã®ããŒãžã§ã³ã«å¯Ÿå¿ããããã« TeXShop ã¯ãäºäžçãããéè°·èª åžããããããŠå®åå åºããã«ããä¿®æ£ãæœããŸãããç§ã®ãµã€ãã«ãã TeXShop ãã£ã¹ããªãã¥ãŒã·ã§ã³ã®ãã©ã«ãå ã«ãããã¡ã€ã«ãèŠãŠãã ãããããã«è©³ããããšã«ã€ããŠã¯ãhttp://macwiki.sourceforge.jp/cgi-bin/wiki.cgi?TeXShop ãåç §ããŠãã ããã pTeX ãš pLaTeX 㯠http://www.ascii.co.jp/pb/ptex/ ã§æã«å ¥ããããŸãã dvipdfm 㯠http://project.ktug.or.kr/dvipdfmx/ ã«ãããŸããæ¥æ¬èªçšã® dvi ãã¬ãã¥ãŒã¯ã¯ http://macptex.appi.keio.ac.jp/~uchiyama/macptex.html ã«ãããŸãã
##Syntax ColorsïŒãœãŒã¹ã®ã«ã©ãŒè¡šç€ºïŒ
âWhen syntax coloring turned on in the source window, comments will be colored red, commands will be colored blue, and the symbols
ãâ ããœãŒã¹ãŠã£ã³ããŠã§ãœãŒã¹ã®ã«ã©ãŒè¡šç€ºïŒæ§æã®è²åãïŒãæå¹ã«ãªã£ãŠãããšãã¯ãã³ã¡ã³ãã¯èµ€ãã³ãã³ãã¯éã ã $ ã ã { ã ã } ããšãã£ãèšå·ã¯æç·è²ã«ãªããŸãããããã®è²åããå€æŽããããŠãŒã¶ããããããããŸãããããããã®è²ã¯ãèµ€ã»ç·ã»éïŒïŒ²ã»ïŒ§ã»ïŒ¢ïŒã®æåã®å²åã調æŽããããšã§æ±ºå®ãããŠããŸã ïŒ åæå㯠0.0 ãã 1.0 ãŸã§ã®å®æ°ã§ããããšãã°ã $ ã ã { ã ã } ãã®è²ãæããç·è²ââæåã§èšãã° (r, g, b) = (0.0, 1.0, 0.0) ââã«å€ããããšããŸããããããã«ã¯ã Terminal ã®ãŠã£ã³ããŠãéãã次ã®ãããªã³ãã³ããæã¡èŸŒã¿ãŸãââ
defaults write TeXShop markerred 0.0
defaults write TeXShop markergreen 1.0
defaults write TeXShop markerblue 0.0
âThe corresponding preference items for comments are commentred, commentgreen, commentblue; the items for commands are commandred, commandgreen, commandblue.
ãâ ãã³ã¡ã³ãã®è²ãæå®ããèšå®é ç®ã¯ commentred ã» commentgreen ã» commentblue ã§ã ïŒ ã³ãã³ãã«ã€ããŠã¯ commandred ã» commandgreen ã» commandblue ã§ãã
##Shell Escape ProtectionïŒ Shell-Escape ã®ä¿è·ïŒ
âThe default commands for pdftex and pdflatex are now "pdftex --shell-escape" and "pdflatex --shell-escape." The "shell-escape" portion of this text tells pdftex that it is legal to run other programs during typesetting. This is useful because if tex finds a graphic file in an unsupported format, it can automatically call another program to convert it to supported format. For example, the default Latex template automatically converts tif files to png and automatically converts eps files to pdf.
ãâ ãpdftex ãš pdflatex ã®ããã©ã«ãã³ãã³ãã¯ãpdftex --shell-escapeããšãpdflatex --shell-escapeãã§ãããã®ããã¹ãã®ãshell-escapeãã®éšåã¯ã¿ã€ãã»ããäžã« pdftex ãä»ã®ããã°ã©ã ãå®è¡ããã®ãèš±å¯ããŠããŸãããããæçšãªã®ã¯ããã TeX ããµããŒãããŠããªã圢åŒã®ã°ã©ãã£ãã¯ã»ãã¡ã€ã«ããã£ãå Žåã«ãä»ã®ããã°ã©ã ãåŒã³åºããŠèªåçã«ãµããŒãããŠãã圢åŒã«å€æããããšãã§ããããã§ããããšãã°ãããã©ã«ãã® LaTeX ãã³ãã¬ãŒãã§ã¯ tif ãã¡ã€ã«ãèªåçã« png ã«å€æãã eps ãã¡ã€ã«ã pdf ã«å€æããŸãã
âThis creates one difficulty that may worry some users. The "shell-escape" flag allows pdftex to run ANY program. Thus a disgruntled student could send you a tex source file by email and when you typeset it you would discover that some of the files in your directory had been erased.
ãâ ãããã«ãã£ãŠçããåé¡ãå¿é ãããŠãŒã¶ããããããããŸããã ãshell-escapeããã©ã°ã¯ pdftex ãã©ã®ãããªããã°ã©ã ãå®è¡ããããšã§ãèš±å¯ããŠããŸããŸãããããããäžæºãæ±ãåŠçãã¡ãŒã«ã§éãä»ããŠãã TeX ãœãŒã¹ãã¿ã€ãã»ããããããããªãã®ãã£ã¬ã¯ããªã«ãã£ããã¡ã€ã«ãæ¶ãããŠããŸã£ãŠããââãšãã£ãããšãããªãã§ã¯ãããŸããã
âI believe the danger is slight. A source file which did harm would have to be created deliberately, but sending a "virus" via tex source seems somewhat esoteric. Nevertheless, there are two ways that you can protect yourself. The first and easiest is to remove the letters "--shell-escape" from the two spots they occur in Preferences and then convert all of your graphic files by hand.
ãâ ããã®å±éºæ§ã¯è»œåŸ®ãªãã®ã ââãšç§ã¯æããŸãã害ãçºããœãŒã¹ãã¡ã€ã«ã¯æå³çã«äœæããªããã°ãªããªãã§ããããã TeX ãœãŒã¹ãéããŠããŠã£ã«ã¹ããéãä»ãããšããã®ã¯ãããããé£åãªããšã«æãããŸããããã¯ãšããããšããŠããŠãŒã¶ãèªèº«ãå®ãããã®æ¹æ³ãïŒã€ãããŸããæåã«ããŠæãç°¡åãªæ¹æ³ã¯ãç°å¢èšå®å ã®ïŒç®æã«ããã--shell-escapeããšããæååãåé€ããŠããŸããã°ã©ãã£ãã¯ã»ãã¡ã€ã«ã®å€æããã¹ãŠæåã§è¡ãªãããšã§ãã
âTeXShop now provides a different protection. A preference item under the Engine tab is labeled "Shell Escape Warning." This item is off when TeXShop is delivered. If the item is on and "shell-escape" is active, then the first time a file is typeset during a TeXShop session, a warning dialog will appear allowing you to turn shell-escape off for that particular file. This dialog will not appear again during the session for that particular file. Thus you can typeset your own files using "shell-escape" and typeset files received in the mail without "shell-escape."
ãâ ãTeXShop ã§ã¯ããããšã¯ç°ãªãä¿è·ãæäŸããŠããŸããç°å¢èšå®ããã«ã®ãå éšèšå®ãã¿ãã«ãããShell Escape ãèŠåããããã§ãããã®é ç®ã¯åœåã¯ãªãã«ãªã£ãŠããŸããããããªã³ã«ããshell-escapeããæå¹ã«ãªã£ãŠããã°ããããã¡ã€ã«ã TeXShop ã§åããŠã¿ã€ãã»ãããããšãã«ããã®ç¹å®ã®ãã¡ã€ã«ã«å¯Ÿã㊠shell-escape ããªãã«ããããšãã§ããèŠåãã€ã¢ãã°ãçŸãããŸãããã®ãã€ã¢ãã°ã¯ã TeXShop ã®èµ·åäžã«ã¯ããã®ç¹å®ã®ãã¡ã€ã«ã«å¯ŸããŠããããã衚瀺ãããããšã¯ãããŸããããªã®ã§ããŠãŒã¶èªèº«ã®ãã¡ã€ã«ã¯ãshell-escapeãã䜿ã£ãŠã¿ã€ãã»ããã§ããã¡ãŒã«ã§åãåã£ããã¡ã€ã«ã¯ãshell-escapeããçšããã«ã¿ã€ãã»ããã§ããŸãã
##Colored Text in TeXïŒ TeX ã«ãããæåã®è²æå®ïŒ
âIt has always been possible to color TeX output. To do so, add the line
ãâ ãTeX ã®åºåãã«ã©ãŒåããããšãã§ããŸããããããã«ã¯ãããªã¢ã³ãã«ã«æ¬¡ã®ïŒè¡ãå ããŸãââ
\usepackage{color}
âto the preamble, and insert a line like
ãâ ããããŠãã¿ã€ãã»ãããå§ããåã«æ¬¡ã®ãããªïŒè¡ãæ¿å ¥ããŸãââ
\color{blue}
âbefore typesetting begins. To color a limited section of text, use a command like
ãâ ãããã¹ãã®ç¹å®ã®éšåã«è²ãä»ããããšãã¯ãã³ãã³ãã次ã®ããã«äœ¿ããŸãââ
{\color{red} This is very important!}
{\color{red} ããã¯ãšãŠãéèŠã ïŒ}
âTo define custom colors, use a command like
ãâ ãã«ã¹ã¿ã ã»ã«ã©ãŒãå®çŸ©ããã«ã¯ã次ã®ãããªã³ãã³ãã䜿ããŸãââ
\definecolor{mycolor}{rgb}{0.2, 0.7, 0.8}
âWhen output is colored, the output may be difficult to read on the preview screen. TeXShop has hidden preferences to set the background color of the preview window. This background color will not appear when the document is printed. To set the background to gray, issue the following commands in Terminal:
ãâ ãåºåãã«ã©ãŒã«ããå Žåããã¬ãã¥ãŒãŠã£ã³ããŠã§å€èªãã«ãããªããããããŸããã TeXShop ã«ã¯ããã¬ãã¥ãŒãŠã£ã³ããŠã®èæ¯è²ãå€ããããé ããç°å¢èšå®ããããŸãããã®èæ¯è²ã¯ãææžãå°å·ãããšãã«ã¯çŸãããŸãããèæ¯ãç°è²ã«ããã«ã¯ã Terminal ãã次ã®ãããªã³ãã³ããéããŸãïŒ
defaults write TeXShop Pdfbackground_R 0.5
defaults write TeXShop Pdfbackground_G 0.5
defaults write TeXShop Pdfbackground_B 0.5
âChange 0.5 to 1 to get back to white. If you find yourself changing the background often, create an Applescript macro named "PDF background gray" with the Macro Editor using the following text:
ãâ ãçœã«æ»ãã«ã¯ 0.5 ãïŒã«å€ããŸããããé »ç¹ã«èæ¯ãå€ãããããªãã ãPDF background grayããšããåå㧠AppleScript ãã¯ãããããããŠãããŸãââãã¯ããšãã£ã¿ã䜿ã£ãŠä»¥äžã®ããã¹ããå ¥ããŸãïŒ
--AppleScript
do shell script "defaults write TeXShop Pdfbackground_R 0.5"
do shell script "defaults write TeXShop Pdfbackground_G 0.5"
do shell script "defaults write TeXShop Pdfbackground_B 0.5"
âand create a similar macro named "PDF background white".
ãâ ãåæ§ã«ãPDF background whiteããšããååã®ãã¯ãããããããŠãããŸãã
##More About teTeXïŒ teTeX ã«ã€ããŠããã«ïŒ
âteTeX is installed in the directory /usr/local/teTeX, which is not visible from the Finder. But the installer creates a symbolic link to this directory in /Library/teTeX. Therefore, go to /Library/teTeX to inspect files in teTeX.
ãâ ãteTeX 㯠/usr/local/teTeX ãšãããã£ã¬ã¯ããªã«ã€ã³ã¹ããŒã«ãããŸããããã¡ã€ã³ãããã¯èŠãããšãã§ããŸãããããã©ãã€ã³ã¹ããŒã©ã¯ããã®ãã£ã¬ã¯ããªã®ã·ã³ããªãã¯ã»ãªã³ã¯ã /Library/teTeX ã«äœããŸãããªã®ã§ teTeXã® ãã¡ã€ã«ã調ã¹ãã«ã¯ /Library/teTeX ã«è¡ããŸãã
âThe documentation for teTeX is in /Library/teTeX/share/texmf/doc/tetex. In particular, examine the files
ãâ ãteTeX ã«ã€ããŠã®ããã¥ã¡ã³ãé¡ã¯ /Library/teTeX/share/texmf/doc/tetex ã«ãããŸããç¹ã«ã次ã®ãã¡ã€ã«ã調ã¹ãŠã¿ãŠãã ããââ
- TETEXDOC.pdf
- teTeX-FAQ
âAdditional documentation for Gerben Wierda's Mac OS X compilation is in
ãâ ãGerben Wierda ã«ãã Mac OS X ãžã®ç§»æ€ã«ã€ããŠã®è¿œå ã®ããã¥ã¡ã³ãé¡ã¯æ¬¡ã®å Žæã«ãããŸãââ
/Library/teTeX/README.macosx
âIt is possible to store additional style files, fonts, etc., in teTeX itself. But teTeX is owned by root and lives in /usr/local/teTeX, which isn't visible in the Finder. Moreover, it is a good idea to keep this directory pure so it can be upgraded easily when later versions are released. It is better to construct a mirror image of the teTeX directory structure inside your Library folder and store your personal files there.
ãâ ãè¿œå ã®ã¯ã©ã¹ãã¡ã€ã«ããã©ã³ããªã©ã teTeX ãã®ãã®ã«æ ŒçŽããŠããããšãã§ããŸããããã©ã teTeX ã¯ææè ãã«ãŒãã»ãŠãŒã¶ã«ãªã£ãŠããã/usr/local/teTeX ã«ããã®ã§ãã¡ã€ã³ãããã¯èŠãããšãã§ããŸãããããã«èšãã°ããã®ãã£ã¬ã¯ããªã¯ããããã«ããã»ããããã§ãããââåŸã«æ°ããããŒãžã§ã³ããªãªãŒã¹ããããšãã«ã¢ããã°ã¬ãŒããç°¡åã«ã§ããŸãããã teTeX ã®ãã£ã¬ã¯ããªæ§é ãšãŸã£ããåãç©ããŠãŒã¶ã®ã©ã€ãã©ãªã»ãã©ã«ãã«äœããããã«å人çãªãã¡ã€ã«ãå ¥ããŠããã®ãããã§ãããã
âThe files must be in appropriate directories. teTeX uses a directory structure invented by the TeX working group. Suppose you want to add a extra style file named new.sty to the style files used by LaTeX. Look inside teTeX and notice that a natural spot for this file would be
ãâ ããã¡ã€ã«ã¯é©åãªãã£ã¬ã¯ããªã«çœ®ããŠãããã°ãªããŸããã teTeX 㯠TeX ã¯ãŒãã³ã°ã°ã«ãŒãã®èæ¡ãããã£ã¬ã¯ããªæ§é ãçšããŠããŸãã new.sty ãšããååã®ç¹å¥ãªã¹ã¿ã€ã«ãã¡ã€ã«ãã LaTeX ã§äœ¿ããããã«è¿œå ããããšããŸãã teTeX ã®äžãèŠããšããã®ãã¡ã€ã«ãåããèªç¶ãªå Žæã¯ä»¥äžã®ããã ãšãããããšã§ãããââ
/usr/local/teTeX/share/texmf/tex/latex/misc/
âSo inside your home directory's Library folder, make a series of subdirectories as follows:
ãâ ããšããããšã§ãããŒã ã»ãã£ã¬ã¯ããªã®ã©ã€ãã©ãªã»ãã©ã«ãå ã«ã次ã®ãããªäžé£ã®ãµããã£ã¬ã¯ããªãäœæããŠãã ããïŒ
Library --> texmf --> tex --> latex --> misc
âand store "new.sty" inside this misc directory.
ãâ ããã®ããã§ãnew.styãããã® misc ãã£ã¬ã¯ããªã«æ ŒçŽããŸãã
##Coexisting with FinkïŒ Fink ãšã®å ±åïŒ
âMac OS X can also run X-windows applications using free third party software. These applications run side by side with regular Mac OS X programs. Fink is a system which can download and compile these applications on Mac OS X. For details, see http://fink.sourceforge.net. In particular, Fink can install ghostview, xdvi, and xemacs.
ãâ ãMac OS X ã§ã¯ããµãŒãããŒãã£è£œã®ããªãŒãœãããŠã§ã¢ã䜿ãããšã§ã X-window ã¢ããªã±ãŒã·ã§ã³ïŒïŒïŒžã¢ããªã±ãŒã·ã§ã³ïŒãå®è¡ãããããšãã§ããŸãïŒèš³æ³šïŒçŸåšã§ã¯ Apple çŽæ£ã® X11 ããããŸãïŒãã¢ããªã±ãŒã·ã§ã³ã¯éåžžã® Mac OS X ããã°ã©ã ãšäžŠè¡ããŠå®è¡ãããŸãã Fink 㯠Mac OS X äžã§ïŒžã¢ããªã±ãŒã·ã§ã³ãããŠã³ããŒãããŠã³ã³ãã€ã«ããããšãã§ããŸãã詳ããããšã«ã€ããŠã¯ http://fink.sourceforge.net ãåç §ããŠãã ããã Fink ã§ã¯ãšããã ghostview ã» xdvi ããã« xemacs ãã€ã³ã¹ããŒã«ããããšãã§ããŸãã
âFink installs software in /sw/bin. One of the packages Fink can install is teTeX. In the past this caused problems because users had duplicate copies of teTeX, configured one of the copies, and then found that the configuration did not affect the other copy. The latest version of Fink gives the option of using Gerben Wierda's teTeX with symbolic links in /sw/bin rather than installing a second copy. We recommend that you choose that option.
ãâ ãFink ã¯ãœãããŠã§ã¢ã /sw/bin ã«ã€ã³ã¹ããŒã«ããŸãã Fink ã«ãã£ãŠã€ã³ã¹ããŒã«ã§ããããã±ãŒãžã®ã²ãšã€ã teTeX ã§ãããã®ããšã§éå»ã«åé¡ãèµ·ããŸããââãŠãŒã¶ã teTeX ã®éè€ããã³ããŒãæã£ãŠãããã³ããŒã®ã²ãšã€ã§èšå®ãè¡ãªãããã°ããããŠããäžæ¹ã®ã³ããŒã«ã¯èšå®ãåæ ãããŠããªãããšã«æ°ä»ããã®ã§ãã Fink ã®ææ°ã®ããŒãžã§ã³ã§ã¯ãïŒã€ãã®ã³ããŒãã€ã³ã¹ããŒã«ããªãããã«ãã/sw/bin å ã«ã·ã³ããªãã¯ã»ãªã³ã¯ãäœæããããšã§ Gerben Wierda ã® teTeX ã䜿çšãããªãã·ã§ã³ããããŸãããã®ãªãã·ã§ã³ãéžæããããšããå§ãããŸãã
##Coexisting with Other TeX DistributionsïŒä»ã® TeX ãã£ã¹ããªãã¥ãŒã·ã§ã³ãšã®å ±åïŒ
âProblems may arise when multiple TeX distributions are available on a system, especially if they set environment variables. This may lead to hard to detect problems where other files are used than the ones you expect.
ãâ ãã²ãšã€ã®ã·ã¹ãã äžã§è€æ°ã® TeX ãã£ã¹ããªãã¥ãŒã·ã§ã³ãå©çšå¯èœã«ãªã£ãŠãããšãåé¡ãèµ·ãããããããŸããââããšã«ç°å¢å€æ°ãèšå®ãããŠããå Žåã«ã¯ããã®ããšã¯ãæããããŠäœ¿çšãããŠãããã¡ã€ã«ã«åããåé¡ãèŠã€ãåºãã®ãé£ããããå¯èœæ§ããããŸãã
##ConTeXt and MetaPostïŒ ConTeXt ãš MetaPost ïŒ
âConTeXt is a general purpose TeX macro package by Hans Hagen; for some, it will be a serious alternative to LaTeX. See http://www.pragma-ade.com/ for details.
ãâ ãConTeXt 㯠Hans Hagen ã®äœæããæ±çšç㪠TeX ãã¯ãããã±ãŒãžã§ã ïŒ äººã«ãã£ãŠã¯ããã¯ã LaTeX ã«åã£ãŠä»£ãããã®ã§ãããã詳ãã㯠http://www.pragma-ade.com/ ãåç §ããŠãã ããã
âMetaPost is a MetaFont like system by John Hobby which can output postscript and pdf files. The package can be used to draw elaborate postscript illustrations. See http://cm.bell-labs.com/who/hobby/MetaPost.html for more details. Interesting metapost examples can be found at many web sites; for instance see http://www.cs.ucc.ie/~dongen/mpost/mpost.html. TeXShop now supports MetaPost.
ãâ ãMetaPost 㯠MetaFont ã«é¡äŒŒããã·ã¹ãã ã§ã John Hobby ã«ããäœæãããŸãããããã¹ãã¹ã¯ãªãããš pdf ã®ãã¡ã€ã«ãåºåã§ããŸãããã®ããã±ãŒãžã¯ç²Ÿå·§ãªãã¹ãã¹ã¯ãªããã®ã€ã©ã¹ããæãã®ã«äœ¿ããŸãã詳ããããšã«ã€ããŠã¯ http://cm.bell-labs.com/who/hobby/MetaPost.html ãåç §ããŠãã ããã MetaPost ã䜿ã£ããããããäœäŸã¯ãã¡ãã¡ã®ãµã€ãã§èŠã€ããããŸã ïŒ ããšãã° http://www.cs.ucc.ie/~dongen/mpost/mpost.html ãã芧ãã ããã TeXShop 㯠MetaPost ããµããŒãããŠããŸãã
âHere is a sample MetaPost file:
ãâ ãããã« MetaPost ãã¡ã€ã«ã®ãµã³ãã«ããããŸãïŒ
prologues:=2;
color yellow; yellow = green + red;
def star (expr size, n, pos, color)=
for a=0 step 360/n until 360:
draw (origin -- (size/2,0))
rotatedaround (origin, a)
shifted pos withcolor color;
endfor ;
enddef;
beginfig(1);
pickup pencircle scaled 2mm; star (2cm,5,origin,red);
endfig;
beginfig(2);
pickup pencircle scaled 2mm; star (2cm,7,origin,yellow);
endfig;
beginfig(3);
pickup pencircle scaled 2mm; star (2cm,11,origin,green);
endfig;
beginfig(4);
pickup pencircle scaled 2mm; star (2cm,13,origin,blue);
endfig;
end
âSuppose this file is named "metademo.mp." When the file is processed by MetaPost, it will generate four different postscript files, named metademo.1, metademo.2, metademo.3, metademo.4. These names are determined by the number parameter of "beginfig()." If this number is nonnegative, like beginfig(0) or beginfig(10), the resulting file will be named metademo.0 or metademo.10. If this number is negative, like beginfig(-10), the resulting file will be named metademo.ps, overwriting any earlier metademo.ps file created by the source.
ãâ ããã®ãã¡ã€ã«ã®ååããmetademo.mpããšããŸããããã MetaPost ã§åŠçãããšã metademo.1, metademo.2, metademo.3, metademo.4 ãšããïŒã€ã®ç°ãªããã¹ãã¹ã¯ãªããã»ãã¡ã€ã«ãçæãããŸãããã¡ã€ã«åã¯ãbeginfig()ããšããçªå·ãã©ã¡ãŒã¿ã§æ±ºå®ãããŠããŸãããã®çªå·ã beginfig(0) ããã㯠beginfig(10) ãšããããã«è² ã§ã¯ãªãæŽæ°ïŒèªç¶æ°ïŒãªããçµæãšããŠçãããã¡ã€ã«ã®åå㯠metademo.0 ããã㯠metademo.10 ãšãªããŸãããããã®çªå·ã beginfig(-10) ã®ããã«è² ã®æ°ã ã£ãå Žåã«ã¯ãçæããããã¡ã€ã«ã®åå㯠metademo.ps ãšãªãããã以åã«ãœãŒã¹ããäœãããŠãããã¹ãŠã® metademo.ps ãã¡ã€ã«ãäžæžãããŸãã
âIn its default configuration, TeXShop assumes that one of the numbers is zero. TeXShop calls the script pstopdf, which runs MetaPost and thus creates all of these postscript files. The script then converts each postscript file to a pdf file. Finally, the script renames the zeroth pdf file to the name of the source with extension "pdf", for instance metademo.pdf and displays this figure in the preview screen.
ãâ ããã®ããã©ã«ãã®èšå®ã§ãçªå·ã®ã²ãšã€ããŒãã«ãªã£ãŠãããšä»®å®ããŸãã TeXShop ã¯ã¹ã¯ãªãã pstopdf ãåŒã³åºããŸãââ MetaPost ãå®è¡ãããããšã§å šçªå·åã®ãã¹ãã¹ã¯ãªããã»ãã¡ã€ã«ãäœãããŠããŸããã¹ã¯ãªããã¯åãã¹ãã¹ã¯ãªããã»ãã¡ã€ã«ããããããã« pdf ãã¡ã€ã«ã«å€æããŸããæåŸã«ããŒãçªç®ã® pdf ãã¡ã€ã«ã®ååãããœãŒã¹ã®ååã«æ¡åŒµåãpdfããä»ãããã®ïŒãã®äŸã§ã¯ metademo.pdf ïŒã«å€ãããã®å³ããã¬ãã¥ãŒç»é¢ã«è¡šç€ºããŸãã
âWhen you are editing a MetaPost file, change the number of the figure being edited from positive to zero. TeXShop will then display this figure as it is being debugged. When you are satisfied with this figure, change its number back to positive and change the number of another figure from positive to zero.
ãâ ãMetaPost ãã¡ã€ã«ãç·šéããŠãããšãã«ãç·šéäžã®å³ã®çªå·ãæ£ã®æ°ãããŒãã«å€ããŠã¿ãŠãã ããã TeXShop ã¯ãã®å³ããããã°äžã®ãã®ãšããŠè¡šç€ºããŸãããã®å³ãæºè¶³ã®ãããã®ã«ãªã£ãããçªå·ãæ£ã®æ°ã«æ»ããä»ã®å³ã®çªå·ãæ£ã®æ°ãããŒãã«å€ããŸãã
âOnce MetaPost files have been created, then can be displayed like any other illustration. Pdflatex can be used if the illustrations are converted to pdf form, or TeX and Ghostscript can be used to include the postscript illustrations without conversion. For example, the four illustrations created by the above MetaPost file can be displayed by typesetting the following file with TeX and Ghostscript:
ãâ ããã£ãã MetaPost ãã¡ã€ã«ãäœãããã°ãä»ã®ã€ã©ã¹ããšåæ§ã«è¡šç€ºã§ããŸããã€ã©ã¹ãã pdf 圢åŒã«å€æãããŠããã° pdflatex ã§æ±ããŸããã TeXïŒGhostscript ãªããã¹ãã¹ã¯ãªããã®ã€ã©ã¹ããå€æãªãã§æ±ããŸããããšãã°ãäžèšã® MetaPost ãã¡ã€ã«ããäœãããïŒã€ã®ã€ã©ã¹ãã¯ã次ã®ãããªãã¡ã€ã«ã TeXïŒGhostscript ã§ã¿ã€ãã»ããããããšã§è¡šç€ºã§ããŸãïŒ
\documentclass[11pt] {article}
\usepackage{graphicx}
\begin{document}
Here are some illustrations.
\vspace{.2in}
\includegraphics[width=1cm]{metademo.1}
\hfill
\includegraphics[width=1cm]{metademo.2}
\hfill
\includegraphics[width=1cm]{metademo.3}
\hfill
\includegraphics[width=1cm]{metademo.4}
\hfill
\end{document}
âIt is also possible to embed MetaPost source code directly in a Latex document using the package mfpic. When this method is used, the MetaPost preference should be set to "mpost" rather than "mptopdf" in the Preferences dialog so MetaPost will run directly when the MetaPost engine is selected. A document containing MetaPost source code is first typeset with pdflatex or latex, creating a mp source file with all of the document's illustrations. This file is then compiled with MetaPost. Finally, the document is typeset again with pdflatex or latex to show the resulting illustrations.
ãâ ãmfpic ããã±ãŒãžã䜿ãããšã§ã MetaPost ã®ãœãŒã¹ã³ãŒãã LaTeX ææžã«çŽæ¥åã蟌ãããšãã§ããŸãããã®æ¹æ³ãçšããéã«ã¯ãç°å¢èšå®ãã€ã¢ãã°ã§ã MetaPost ã®èšå®ããmptopdfãã§ã¯ãªããmpostãã«ããŠãããŸãââãã®ããã« MetaPost ãšã³ãžã³ãéžæãããŠãããš MetaPost ãçŽæ¥å®è¡ãããŸãã MetaPost ã®ãœãŒã¹ã³ãŒããå«ãææžã¯ãæåã« pdflatex ãªãã㯠latex ã§ã¿ã€ãã»ããããææžã«ãããã¹ãŠã®ã€ã©ã¹ããã²ãšãŸãšãã«ãã mp ãœãŒã¹ãã¡ã€ã«ãäœæããŸãããããŠãã®ãã¡ã€ã«ã MetaPost ã§ã³ã³ãã€ã«ããŸããæåŸã«ãææžãå床 pdflatex ãŸã㯠latex ã§ã¿ã€ãã»ããããŠã€ã©ã¹ãã衚瀺ããŸãã
âBelow is an example created by Claus Gerhardt. Save this example as "MetaPostTest". Notice the line "\opengraphsfile{MetaPostTest}" in the source. Although the mfpic package permits any name for this graph file, its name must be the same as the document name to use the following procedure in TeXShop. Typeset the document once, switch to MetaPost and typeset again, switch back to LaTeX and typeset a final time. In this process, either pdflatex or latex + ghostscript can be used for the first and third steps.
ãâ ãäžã«ããã®ã¯ Claus Gerhardt ã«ããäœäŸã§ãããã®äŸããMetaPostTestããšããŠä¿åããŸãããœãŒã¹å ã®ã\opengraphsfile{MetaPostTest}ããšæžãããè¡ã«æ³šç®ããŠãã ããã mfpic ããã±ãŒãžã¯ãã®ã°ã©ãã£ãã¯ã»ãã¡ã€ã«ãã©ã®ãããªååã§ãã£ãŠãããŸããªããšã¯ããã TeXShop ã§æ¬¡ã®ãããªæé ãèžãã«ããã£ãŠã¯ãææžãšåãååã§ãªããã°ãªããŸããããã£ããææžãã¿ã€ãã»ãããããã MetaPost ã«åãæ¿ããŠå床ã¿ã€ãã»ãããè¡ãªããããäžåºŠ LaTeX ã«æ»ããŠæçµçã«ã¿ã€ãã»ããããŸãããã®éçšã«ãããŠãïŒçªç®ãšïŒçªç®ã®ã¹ãããã§ã¯ã pdflatex ãŸã㯠latexïŒghostscript ã®ããããçšããŠãããŸããŸããã
- è£è¶³ïŒäœäŸã®ãœãŒã¹ã³ãŒãã¯å²æããŸããã
âThe following example, also provided by Claus Gerhardt, shows the power of MetaPost.
ãâ ãäžã®äŸããŸã Claus Gerhardt ã®æäŸã«ãããã®ã§ã MetaPost ã®åšåã瀺ããŠããŸãã
- è£è¶³ïŒãã®ãœãŒã¹ã³ãŒãã«ã€ããŠãããã§èŒããã«ã¯ããããé·ãã®ã§å²æããŸããã
##Plist FilesïŒ Plist ãã¡ã€ã«ïŒ
âMac OS X makes extensive use of xml files; xml is a structured language closely related to html.
ãâ ãMac OS X 㯠xml ãã¡ã€ã«ãåºæ±ã«å©çšããŠããŸã ïŒ xml 㯠html ãšå¯æ¥ãªé¢é£ã®ããæ§é åèšèªã§ãã
âTeXShop uses five xml files for configuration: completion.plist, autocompletion.plist, KeyEquivalents.plist, Macros_Latex.plist, and Macros_Context.plist. These files reside inside your personal library in a folder called ~/Library/TeXShop created when TeXShop first runs. If you have modified the default TeXShop configuration and want to move TeXShop to another machine preserving your modifications, copy ~/Library/TeXShop to the new machine.
ãâ ãTeXShop ã§ã¯ïŒã€ã® xml ãã¡ã€ã«ãèšå®ã®ããã«çšããŠããŸãïŒ completion.plist ã» autocompletion.plist ã» KeyEquivalents.plist ã» Macros_Latex.plist ããã« Macros_Context.plist ã§ãããããã®ãã¡ã€ã«ã¯ãŠãŒã¶å人ã®ã©ã€ãã©ãªå ã«ãã ~/Library/TeXShop ãšãããã©ã«ãå ã«çœ®ãããŠããŸãââãã®ãã©ã«ã㯠TeXShop ãåããŠèµ·åããéã«äœãããŸãããã TeXShop ã®ããã©ã«ãèšå®ãããã£ãŠãããããããã®ãŸãŸä»ã®ãã·ã³ã«ç§»è¡ããããã®ã§ããã°ã ~/Library/TeXShop ãã³ããŒããŠãã ããã
âThe files are used to configure the Latex Panel, Auto Completion, the Keyboard Menu Shortcuts, and the Macro menu. Details are given elsewhere in this document.
ãâ ããã¡ã€ã«ã¯ã LaTeX ããã«ããªãŒãã³ã³ããªãŒããã¡ãã¥ãŒé ç®ã®ã·ã§ãŒãã«ããã»ããŒããã¯ãã»ã¡ãã¥ãŒãªã©ã®èšå®ã«å©çšãããŠããŸãã詳现ã«ã€ããŠã¯ãã®ããã¥ã¡ã³ãã®å¥ã®å Žæã§è¿°ã¹ãŠãããŸãã
âFiles of type plist are ordinary text files, so they can be opened and edited with TeXShop, TextEdit, or other text editors. Editing the file is straightforward, but somewhat tedious.
ãâ ãplist 圢åŒã®ãã¡ã€ã«ã¯ããæ®éã®ããã¹ããã¡ã€ã«ãªã®ã§ã TeXShop ã TextEdit ãªããã¯ä»ã®ããã¹ããšãã£ã¿ã§éãããç·šéãããã§ããŸãããã¡ã€ã«ãç·šéããã®ã¯ç°¡åã§ãããããã¶ãéå±ã§ãã
âIf a plist file contains unicode characters, it needs to be edited and saved in UTF-8 format. Before opening such a file in TeXShop, change the TeXShop encoding preference to UTF-8. Then edit and save the file. Then change the encoding preference back to the original value. The default value is MacOSRoman if you did not reset it earlier.
ãâ ããã plist ãã¡ã€ã«ã« Unicode æåãå«ãŸããŠãããªãã UTF-8 圢åŒã§ç·šéãä¿åããå¿ èŠããããŸãã TeXShop ã§ãããããã¡ã€ã«ãéãåã«ã TeXShop ã®ãšã³ã³ãŒãã£ã³ã°èšå®ã UTF-8 ã«å€æŽããŠãã ããããã®ããã§ãã¡ã€ã«ãç·šéãããä¿åãããããŸãããã®åŸãšã³ã³ãŒãã£ã³ã°èšå®ã¯å ã«æ»ããŠãããŸãããã以åã«èšå®ããªãããŠããªããªããããã©ã«ãã§ã¯ MacOSRoman ã§ãã
âIf you installed the Developer distribution of Mac OS X and you double click a .plist file, it will open in a program named Property List Editor. This program is useful for editing plist files, but it is buggy and does not display all file information. In particular, comments are missing. It is better to use TeXShop.
ãâ ãMac OS X ã® Developer Tools ãã€ã³ã¹ããŒã«ããŠããã®ã§ããã°ã.plist ãã¡ã€ã«ãããã«ã¯ãªãã¯ãããšã Property List Editor ãšããããã°ã©ã ã§éããããšæããŸãããã®ããã°ã©ã 㯠plist ãã¡ã€ã«ãç·šéããã®ã«äŸ¿å©ã§ããããã°ã ããã§ããããã¡ã€ã«ã®ãã¹ãŠã®æ å ±ã衚瀺ã§ããŸãããããšã«ãã³ã¡ã³ããæ¬ ããŠããŸããŸãã TeXShop ã䜿ãã»ããããã§ãããã
##Redefining Keyboard Menu ShortcutsïŒã¡ãã¥ãŒé ç®ã®ã·ã§ãŒãã«ããã»ããŒãåå®çŸ©ããïŒ
âIt is possible to redefine all keyboard menu shortcuts used by TeXShop. To do so, open the file ~/Library/TeXShop/Menus/KeyEquivalents.plist with TeXShop, read the comments at the top of the file, and edit the file to redefine selected menu shortcuts. Be sure to edit and save in UTF-8 format if you use Unicode characters.
ãâ ãTeXShop ã§äœ¿ãããŠããã¡ãã¥ãŒé ç®ã®ãã¹ãŠã®ã·ã§ãŒãã«ããã»ããŒã¯åå®çŸ©ããããšãã§ããŸãã ~/Library/TeXShop/Menus/KeyEquivalents.plist ãšãããã¡ã€ã«ã TeXShop ã§éãããã¡ã€ã«ã®åé ã«ããã³ã¡ã³ããèªãã ããã§ãã¡ã€ã«ãç·šéããã¡ãã¥ãŒé ç®ã®ã·ã§ãŒãã«ãããåå®çŸ©ããŸãã Unicode æåã䜿çšããã®ã§ããã°ãããªãã UTF-8 圢åŒã§ç·šéãä¿åããããã«ããŠãã ããã