XeLaTeX 에서 한글/라틴/숫자 등에 굵은 글자, 기울임 글자 등을 적용하고 싶을 때 아래와 같이 사용해 보자.
% ----------------------------------------------------------------
% PDFLaTeX / XeLaTeX with koTeX for Nanum Fonts
% made by Heesung Shin, ensual@gmail.com
% ----------------------------------------------------------------
\usepackage[T1]{fontenc}
\PassOptionsToPackage{no-math}{fontspec}
\usepackage{iftex}
\ifPDFTeX
\usepackage[finemath]{kotex}
%\usepackage{times}
\usepackage{dhucs-nanumfont}
\fi
\ifXeTeX
\usepackage{kotex}
\xetexkofontregime{latin}[puncts=prevfont, colons=prevfont, cjksymbols=hangul]
\defaultfontfeatures+{
BoldFeatures={FakeBold=2},
ItalicFeatures={FakeSlant=0.17},
SlantedFeatures={FakeSlant=0.17},
BoldItalicFeatures={FakeBold=2,FakeSlant=0.17},
BoldSlantedFeatures={FakeBold=2,FakeSlant=0.17},
}
%\setmainfont{Times New Roman}
\setmainhangulfont{NanumMyeongjo}
\setsanshangulfont{NanumGothic}
\setmonohangulfont{NanumGothicCoding}
\fi
예제
\documentclass[12pt]{article}
% ----------------------------------------------------------------
% PDFLaTeX / XeLaTeX with koTeX for Nanum Fonts
% made by Heesung Shin, ensual@gmail.com
% ----------------------------------------------------------------
\usepackage[T1]{fontenc}
\PassOptionsToPackage{no-math}{fontspec}
\usepackage{iftex}
\ifPDFTeX
\usepackage[finemath]{kotex}
\usepackage{dhucs-nanumfont}
\fi
\ifXeTeX
\usepackage{kotex}
\xetexkofontregime{latin}[puncts=prevfont, colons=prevfont, cjksymbols=hangul]
\defaultfontfeatures+{
BoldFeatures={FakeBold=2},
ItalicFeatures={FakeSlant=.17},
SlantedFeatures={FakeSlant=.17},
BoldItalicFeatures={FakeBold=2,FakeSlant=.17},
BoldSlantedFeatures={FakeBold=2,FakeSlant=.17},
}
\setmainhangulfont{NanumMyeongjo}
\setsanshangulfont{NanumGothic}
\setmonohangulfont{NanumGothicCoding}
\fi
\begin{document}
\rmfamily
\mdseries 가나다 Abc 123 \textit{가나다 Abc 123} \textsc{가나다 Abc 123 \textit{가나다 Abc 123}}
\bfseries 가나다 Abc 123 \textit{가나다 Abc 123} \textsc{가나다 Abc 123 \textit{가나다 Abc 123}}
\sffamily
\mdseries 가나다 Abc 123 \textit{가나다 Abc 123} \textsc{가나다 Abc 123 \textit{가나다 Abc 123}}
\bfseries 가나다 Abc 123 \textit{가나다 Abc 123} \textsc{가나다 Abc 123 \textit{가나다 Abc 123}}
\ttfamily
\mdseries 가나다 Abc 123 \textit{가나다 Abc 123} \textsc{가나다 Abc 123 \textit{가나다 Abc 123}}
\bfseries 가나다 Abc 123 \textit{가나다 Abc 123} \textsc{가나다 Abc 123 \textit{가나다 Abc 123}}
\end{document}
PDFLaTeX
XeLaTeX
'Information' 카테고리의 다른 글
MacTeX 2020에서 LaTeX 로컬 세팅 파일 (0) | 2021.03.30 |
---|---|
PDFLaTeX / XeLaTeX with koTeX for Nanum Fonts (0) | 2021.02.17 |
Google Chrome에서만 gmail과 같은 Google 서비스가 느려지면.. (0) | 2015.05.26 |
갤럭시 SIII 3G (SHW-M440S) 젤리빈 4.3 ND1 상단 SKT 로고 제거 (0) | 2014.05.14 |
xetexko 에서 나눔글꼴 사용하기 (0) | 2013.09.15 |
Installation of iWork '09 Retail on Mac with Lion OS (0) | 2012.02.08 |