Korean
Introduction
LaTeX supports many worldwide languages by means of special packages. This article explains how to import and use packages to typeset documents containing Korean text. A list of Korean typefaces available on Overleaf can be found here.
Example using Google Noto CJK fonts
We can use the xeCJK
package, which requires the XeLaTeX compiler, to typeset some Korean using the Noto CJK fonts installed on Overleaf:
\documentclass{article}
\usepackage{xeCJK}
\setmainfont{Noto Serif}
\setCJKmainfont{Noto Serif CJK KR}
\setCJKsansfont{Noto Sans CJK KR}
\setCJKmonofont{Noto Sans Mono CJK KR}
\begin{document}
\section{소개}
전체 문서에 대한 기본 정보를 소개 단락.
\begin{verbatim}
그것은 간격 방법을 참조 그대로 글꼴을 테스트
\end{verbatim}
Latin characters are also allowed.
\end{document}
Open this Korean example in Overleaf
This example produces the following output:
In the above example four different different fonts are declared:
\setmainfont{Noto Serif}
: Uses the Noto Serif font for text with Latin characters.
\setCJKmainfont{Noto Serif CJK KR}
: Sets the fontNoto Serif CJK KR
to be used as the main font.
\setCJKsansfont{Noto Sans CJK KR}
: Just as the previous command, this usesNoto Sans CJK KR
for document elements to be typeset in a sans serif font.
\setCJKmonofont{Noto Sans Mono CJK KR}
: Uses theNoto Sans Mono CJK KR
font for document elements that require a monospace font; for instance, within theverbatim
environment.
Example using Noto fonts and different font weights
Because the xeCJK
package uses fontspec
the usual LaTeX font style, family and weight selection commands, such as \ttfamily
, \bfseries
and \textsf
continue to work, as shown in the following example:
\documentclass{article}
\usepackage{xeCJK}
\setmainfont{Noto Serif}
\setCJKmainfont{Noto Serif CJK KR}
\setCJKsansfont{Noto Sans CJK KR}
\setCJKmonofont{Noto Sans Mono CJK KR}
\begin{document}
\section{소개}
전체 문서에 대한 기본 정보를 소개 단락.
\vspace{10pt}
\noindent Regular weight monospace: {\ttfamily 전체 문서에 대한 기본 정보를 소개 단락.}
\vspace*{10pt}
\noindent Bold weight monospace: {\ttfamily\bfseries 전체 문서에 대한 기본 정보를 소개 단락.}
\vspace*{10pt}
\noindent Sans serif: \textsf{ 전체 문서에 대한 기본 정보를 소개 단락.}
\vspace*{10pt}
\noindent Sans serif bold: \textsf{\bfseries 전체 문서에 대한 기본 정보를 소개 단락.}
\vspace*{10pt}
\noindent And of course, Latin characters are also allowed in \textbf{bold} or \textit{italics}.
\end{document}
Open this second Korean example in Overleaf
This example produces the following output:
Example using xeCJK
with fonts loaded into your project
The following example uses fonts, UnGungseo.ttf
and gulim.ttf
, uploaded into the Overleaf project.
\documentclass{article}
\usepackage{xeCJK}
\setmainfont{Noto Serif}
\setCJKmainfont{UnGungseo.ttf}
\setCJKsansfont{UnGungseo.ttf}
\setCJKmonofont{gulim.ttf}
\begin{document}
\section{소개}
전체 문서에 대한 기본 정보를 소개 단락.
\begin{verbatim}
그것은 간격 방법을 참조 그대로 글꼴을 테스트
\end{verbatim}
Latin characters are also allowed.
\end{document}
Open this XeLaTeX and xeCJK example in Overleaf
This example produces the following output:
Typesetting Korean documents with pdfLaTeX
If your workflow means you have to use pdfLaTeX, and cannot use XeLaTeX, you can use the CJKutf8
package with pdfLaTeX. Here is an example:
\documentclass{article}
\usepackage{CJKutf8}
\begin{document}
\begin{CJK}{UTF8}{mj}
전체 문서에 대한 기본 정보를 소개 단락.
\begin{verbatim}
그것은 간격 방법을 참조 그대로 글꼴을 테스트
\end{verbatim}
\end{CJK}
Latin characters are also allowed.
\end{document}
Open this CJKuft8
package example in Overleaf
This example produces the following output:
Note that in order to type Korean text you must use the CJK
environment:
\begin{CJK}{UTF8}{mj}
will start a CJK
environment, the first parameter passed to the environment declaration is the text encoding. Use only UTF8
on Overleaf, since all text files on Overleaf are UTF8. The second parameter is the font family to be used: use mj
for Korean.
Further reading
For more information see
- A list of Korean typefaces available on Overleaf
- Supporting modern fonts with XƎLaTeX
- Typesetting quotations and quotation marks
- International language support
- Chinese
- French
- German
- Greek
- Italian
- Japanese
- Arabic
- Portuguese
- Russian
- Spanish
- The not so short introduction to LaTeX2ε
- LaTeX/Internationalization on WikiBooks
- LaTeX/Special_Characters on WikiBooks
Overleaf guides
- Creating a document in Overleaf
- Uploading a project
- Copying a project
- Creating a project from a template
- Using the Overleaf project menu
- Including images in Overleaf
- Exporting your work from Overleaf
- Working offline in Overleaf
- Using Track Changes in Overleaf
- Using bibliographies in Overleaf
- Sharing your work with others
- Using the History feature
- Debugging Compilation timeout errors
- How-to guides
- Guide to Overleaf’s premium features
LaTeX Basics
- Creating your first LaTeX document
- Choosing a LaTeX Compiler
- Paragraphs and new lines
- Bold, italics and underlining
- Lists
- Errors
Mathematics
- Mathematical expressions
- Subscripts and superscripts
- Brackets and Parentheses
- Matrices
- Fractions and Binomials
- Aligning equations
- Operators
- Spacing in math mode
- Integrals, sums and limits
- Display style in math mode
- List of Greek letters and math symbols
- Mathematical fonts
- Using the Symbol Palette in Overleaf
Figures and tables
- Inserting Images
- Tables
- Positioning Images and Tables
- Lists of Tables and Figures
- Drawing Diagrams Directly in LaTeX
- TikZ package
References and Citations
- Bibliography management with bibtex
- Bibliography management with natbib
- Bibliography management with biblatex
- Bibtex bibliography styles
- Natbib bibliography styles
- Natbib citation styles
- Biblatex bibliography styles
- Biblatex citation styles
Languages
- Multilingual typesetting on Overleaf using polyglossia and fontspec
- Multilingual typesetting on Overleaf using babel and fontspec
- International language support
- Quotations and quotation marks
- Arabic
- Chinese
- French
- German
- Greek
- Italian
- Japanese
- Korean
- Portuguese
- Russian
- Spanish
Document structure
- Sections and chapters
- Table of contents
- Cross referencing sections, equations and floats
- Indices
- Glossaries
- Nomenclatures
- Management in a large project
- Multi-file LaTeX projects
- Hyperlinks
Formatting
- Lengths in LaTeX
- Headers and footers
- Page numbering
- Paragraph formatting
- Line breaks and blank spaces
- Text alignment
- Page size and margins
- Single sided and double sided documents
- Multiple columns
- Counters
- Code listing
- Code Highlighting with minted
- Using colours in LaTeX
- Footnotes
- Margin notes
Fonts
Presentations
Commands
Field specific
- Theorems and proofs
- Chemistry formulae
- Feynman diagrams
- Molecular orbital diagrams
- Chess notation
- Knitting patterns
- CircuiTikz package
- Pgfplots package
- Typesetting exams in LaTeX
- Knitr
- Attribute Value Matrices
Class files
- Understanding packages and class files
- List of packages and class files
- Writing your own package
- Writing your own class