0

How to change the specific japanese font style ?

        \documentclass{article}
\usepackage{CJKutf8}

\begin{document}

\begin{CJK*}{UTF8}{min}
\section{これは最初のセクションである}
日本語で \LaTeX の組版を実証するための導入部分。

フォントはまた、数学的な形態および他の環境で使用することができる
\end{CJK*}

\bigskip

Outside the environment Latin characters may be used.

\begin{CJK*}{UTF8}{goth}
\section{これは最初のセクションである}
I want to change the japanese font style of this number 2?
\end{CJK*}

\end{document}

  • 1
    Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Sep 12 '22 at 04:28

1 Answers1

1

I run code below on Windows 10, TeX Live 2022 with xelatex. And you should download the fonts from Index of /adobe-fonts/source-han-serif/OTF/Japanese/ and Index of /adobe-fonts/source-han-sans/OTF/Japanese/. Install these fonts for all users by right click on these otf font files.

\documentclass{article}
\usepackage{xeCJK}
\setmainfont{TeX Gyre Termes}
\setsansfont{TeX Gyre Heros}
\setmonofont{TeX Gyre Cursor}
\setCJKmainfont{Source Han Serif}
\setCJKsansfont{Source Han Sans}
\setCJKsansfont{Source Han Serif}
\begin{document}
\section{これは最初のセクションである}
日本语で \LaTeX の组版を実証するための导入部分。
フォントはまた、数学的な形态および他の环境で使用することができる

Outside the environment Latin characters may be used. \section{これは最初のセクションである} I want to change the japanese font style of this number 2?

\sffamily \section{これは最初のセクションである} 日本语で \LaTeX の组版を実証するための导入部分。 フォントはまた、数学的な形态および他の环境で使用することができる

Outside the environment Latin characters may be used. \section{これは最初のセクションである} I want to change the japanese font style of this number 2?

\ttfamily \section{これは最初のセクションである} 日本语で \LaTeX の组版を実証するための导入部分。 フォントはまた、数学的な形态および他の环境で使用することができる

Outside the environment Latin characters may be used. \section{これは最初のセクションである} I want to change the japanese font style of this number 2? \end{document}

enter image description here

Clara
  • 6,012