좀 오래된 폰트이지만 유니코드를 지원하므로 다국어 문서를 만들 때 필요한 폰트입니다.

위의 압축파일을 풀어서 나오는 CODE2000.TTF 파일을 C:\Windows\Fonts 폴더에 갖다 놓으면 TeX에서 바로 쓸 수 있습니다.


* XeLaTeX 으로 컴파일되는 예제 소스
  (소스는 반드시 utf-8 인코딩으로 저장되어야 합니다.)

% use article styling for this document

% Modified from: http://wiki.xelatex.org/doku.php?id=basic_document

\documentclass{article}

% enable system font access

\usepackage{fontspec}

% styling: Palatino (main text), Helvetica (stress), Code2000 (exotic text) and Asana Math (for math things)

\setmainfont{Palatino Linotype}

\newfontfamily{\maintext}{Palatino Linotype}

\newfontfamily{\stressed}{Helvetica}

\newfontfamily{\exotic}{Code2000}

\newfontfamily{\math}{Asana Math}

% start of actual document

\begin{document}

This is a basic XeLaTeX document, which will be processes using the {\stressed xelatex} program.

This means that as long as the document source is in {\stressed UTF-8} encoding,

XeLaTeX {\stressed doesn't care} what you actually wrote.

For instance, we can write in English, or in Korean ({\exotic 한글}), Japanese ({\exotic 日本語}), or in Thai

({\exotic ภาษาไทย}), or in Vietnamese ({\exotic tiếng Việt}), or any other number of languages.

It can even be used for non-languages that are in {\stressed Unicode},

such as mathematical operators (like {\math √ {\maintext and} ∞}). % maintext inside math!

\end{document}





* 위의 소스를 XeLaTeX 으로 컴파일하여 만든 PDF 파일: 




* XeLaTeX 으로 컴파일되는 예제 소스 (section 적용)
  (소스는 반드시 utf-8 인코딩으로 저장되어야 합니다.)

% use article styling for this document

% Modified from: http://wiki.xelatex.org/doku.php?id=basic_document

\documentclass{article}

% enable system font access

\usepackage{fontspec}

% styling: Palatino (main text), Helvetica (stress), Code2000 (exotic text) and Asana Math (for math things)

\setmainfont{Palatino Linotype}

\newfontfamily{\maintext}{Palatino Linotype}

\newfontfamily{\stressed}{Helvetica}

\newfontfamily{\exotic}{Code2000}

\newfontfamily{\math}{Asana Math}

% start of actual document

\begin{document}

\section{XeLaTeX documents}

XeLaTeX documents, which are processed using the {\stressed xelatex} program, use

document source that is in {\stressed UTF-8} encoding, so that you are free to write

in any script that is supported by {\stressed Unicode}.

\section{multilingual text}

Multilingual text is relatively simple in XeLaTeX (when compared to other versions of

TeX), while still leaving you in total control of the styling (compared to word

processing programs like Microsoft Word or OpenOffice Writer)

\subsection{English}

English text is fairly obvious. We pick a main font that supports ascii and we're done!

\subsection{Other languages}

Languages that don't use the "Latin" script are also not a problem, provided we remember to change

to the correct {\stressed font}. For instance, we can write in Korean ({\exotic 한국어}), or in Japanese ({\exotic 日本語}), or in Thai ({\exotic ภาษาไทย}), or in Vietnamese ({\exotic tiếng Việt}), or any other number of languages.

\subsection{Automatic font switching}

XeLaTeX even lets you set up automatic font switching, but it's a bit more work because you need

to tell it which fonts to use for which letters, so most people wouldn't consider it basic functionality.

\section{Sectioning}

We can also section our document so that it's easier for the reader to read through. This document

consists of three sections, of which the second section has three subsections.

\end{document}





* 위의 소스를 XeLaTeX 으로 컴파일하여 만든 PDF 파일: 






Posted by Scripter

댓글을 달아 주세요