. . . . . .
글꼴 조정
이주용
jlee@formal.korea.ac.kr
고려대학교
2011년 11월 30일
. . . . . .
글꼴 변경 명령어
\textsf{abc} abc sans serif family; 산스 세리프
\textrm{abc} abc Roman (serif) family; 로만
\texttt{abc} abc typewriter family; 타이프라이터
\textbf{abc} abc bold face; 볼드 페이스
\textmd{abc} abc medium face; 미디엄 페이스
\textit{abc} abc italic shape;이 모양
\textsl{abc} abc slanted shape;기 어 모양
\textsc{abc} abc small caps shape; 스몰캡
\textup{abc} abc upright shape; 똑바른 모양
\textnormal{abc} abc 기본 폰트대로
. . . . . .
글꼴 변경 선언어
{\sffamily abc} abc sans serif family; 산스 세리프 {\rmfamily abc} abc Roman (serif) family; 로만
{\ttfamily abc} abc typewriter family; 타이프라이터 {\bfseries abc} abc bold face; 볼드 페이스
{\mdseries abc} abc medium face; 미디엄 페이스 {\itshape abc} abc italic shape;이 모양 {\slshape abc} abc slanted shape;기 어 모양 {\scshape abc} abc small caps shape; 스몰캡 {\upshape abc} abc upright shape; 똑바른 모양 {\normalfont abc} abc 기본 폰트대로
. . . . . .
명령어 대 선언어
관리의 편이성에 비추어, 명령어는 단어와 같이 짧은 구간에, 선언어는 섹션이나 환경같이 긴 구간에 적절하다.
. . . . . .
명령어 사용례
\newcommand{\ keyword } [ 1 ] {%
\ textup {\ t e x t t t {#1}}%
}
\ keyword {LaTeX}
\LaTeX
. . . . . .
선언어 사용례
\ newenvironment { t i n y u p t h e o r e m }{%
\ begin { t heor em }
\ upshape \ t i n y \ b f s e r i e s }{%
\end{ t heorem }}
\ begin { t i n y u p t h e o r e m } t e s t
\end{ t i n y u p t h e o r e m }
Theorem
test
. . . . . .
수학용 글꼴 변경 명령어
\mathrm{a\alpha} aα
\mathit{a\alpha} aα
\mathbf{a\alpha} aα
\mathsf{a\alpha} aα
\mathtt{a\alpha} aα
\mathnormal{a\alpha} aα 수학용 글꼴 변경 선언어는 없다.
. . . . . .
글체 변경
\ usepackage { f o n t s p e c }
\ se t mai nf o n t {⟨기본 (로만) 글체이름⟩}
\ s e t s a n s f o n t {⟨산스 세리프 글체이름⟩}
\ setmonofont {⟨타이프라이터 글체이름⟩}
XeLaTeX 조판기와 같이 특정 조판기만 위 명령들을 해석할 수 있다.
pdfLatex 조판기는 위 명령들을 해석하지 못한다.
. . . . . .
한글 글체 변경
\ usepackage { f o n t s p e c }
\ usepackage [ euc ] { k o t e x }
\ se tm ai nfo n t {⟨기본 (로만) 글체이름⟩}
\ s e t s a n s f o n t {⟨산스 세리프 글체이름⟩}
\ setmonofont {⟨타이프라이터 글체이름⟩}
위 세 명령어들은 kotex의 한글 unicode 설정을 바꾸지 않는다.
euc (extended unix code) 라는 예전 인코딩을 사용하면 위 명령어들에 의해 한글 글체도 바뀐다.
. . . . . .
수식 글체 변경 방지
\ usepackage [ no−math ] { f o n t s p e c }
\ se tmai nf on t {⟨기본 (로만) 글체이름⟩}
\ s e t s a n s f o n t {⟨산스 세리프 글체이름⟩}
\ setmonofont {⟨타이프라이터 글체이름⟩}
fontspec은 기본적으로 수식 글체를 함께 변경한다.
no-math 옵션을 주면 수식 글체가 텍스트 설정되로 변경되는 것을 방지할 수 있다.
. . . . . .
수식 글체 변경
\ usepackage [ no−math ] { f o n t s p e c }
\setmathrm{⟨기본 (로만) 글체이름⟩}
\ setmathsf {⟨산스 세리프 글체이름⟩}
\ setmathtt {⟨타이프라이터 글체이름⟩}
. . . . . .
글체 색깔 변경
\ usepackage { f o n t s p e c }
\ usepackage [⟨색이름옵션⟩ ] { x c o l o r }
\ se t mai nf o n t [ C o l o r=⟨색이름⟩ ] { ⟨기본 (로만) 글체이름⟩}
색이름이 이해될 수 있도록 xcolor 패키지를 사용한다.
지정된 색이름을 사용하기 위해서는 이름이 정의된 색이름옵션을 주어야 한다.
. . . . . .
글체 크기 변경
\ usepackage { f o n t s p e c }
\ se t mai nf o n t [ S c a l e=⟨스케일⟩ ] { ⟨기본 (로만) 글체이름⟩}
스케일로 0에서 1사이 숫자를 넣어준다.
. . . . . .
글체 색깔 크기 함께 변경
\ usepackage { f o n t s p e c }
\ se t mai nf o n t [ C o l o r=⟨색이름⟩ , S c a l e=⟨스케일⟩ ] {⟨기본 (로만) 글체이름⟩}
. . . . . .
글 중간에서 글체 변경
\ usepackage { f o n t s p e c } . . .
글
\ f o n t s p e c [⟨옵션⟩ ] { ⟨글체이름⟩}
글
옵션으로 색이나 크기 등을 조절할 수 있다.
. . . . . .
글체 설정에 이름 주기
\ usepackage { f o n t s p e c } . . .
\ newfo ntfa mily {\ m a i n f o n t }
[ C o l o r=Blue , S c a l e = . 5 ] { Optima }
파란색 50% 스케일 Optima 글체에 \mainfont라는 이름을 줌
. . . . . .
글체 설정 이름으로 글체 바꾸기
\ usepackage { f o n t s p e c } . . .
글
\ m a i n f o n t 글