%20%E3%81%A7%E5%9B%B2%E3%81%BE%E3%82%8C%E3%81%9F%E6%9B%B8%E5%90%8D%E3%81%AE%E3%82%AB%E3%82%B9%E3%82%BF%E3%83%A0%E6%9B%B8%E5%BC%8F%E8%A8%AD%E5%AE%9A.png)
中国語の組版規則では、書籍のタイトルは通常、UTF-8 Unicode シンボルである書籍のタイトル マーク「《」と「》」で囲まれます。これらのシンボルは、xeCJK パッケージを使用してサポートできます (中国語、日本語、韓国語のすべての文字とシンボルの \catcode を 11 に設定します)。shortvrb が `|' シンボルを処理する方法と同様に、「《」と「》」の制御シーケンスを設定し、これらのマークで囲まれた書籍のタイトルの組版に斜体や青色での表示などの特定の書式を設定する方法があるかどうかを問い合わせたいと思います。
中国語の文字組版 tex ファイルは通常次のようになります。
% !TEX program = xelatex
\documentclass{article}
\usepackage{xeCJK}
\begin{document}
Here is a book title in chinese book title marks
《A Chinese Book》
\end{document}
UTF-8 エンコードの .tex ファイルとして保存されます。
答え1
アクティブ カテゴリ コードを使用して《
コマンドを作成できます。ただし、これを行う欠点は、ペアになっていない《
とエラーが発生することです。
\documentclass{ctexart}
\begin{document}
\catcode`《 = \active
\def《#1》{\emph{#1}}
中文
《中文》
《Chinese》
\end{document}
答え2
以下を使用できます\newunicodechar
:
\documentclass{article}
\usepackage{xeCJK}
\usepackage{newunicodechar}
\newunicodechar{《}{\begingroup《\em\ignorespaces}
\newunicodechar{》}{\/\endgroup》}
\begin{document}
Here is a book title in chinese book title marks
《A Chinese Book》
\end{document}
代替アプローチ:
\documentclass{article}
\usepackage{xeCJK}
\usepackage{newunicodechar}
\newunicodechar{《}{《\hzzhangbook|}
\NewDocumentCommand{\hzzhangbook}{r|》}{\emph{#1}》}
\begin{document}
Here is a book title in chinese book title marks
《A Chinese Book》
\end{document}
違いは、後者のコードでは欠落が》
あるとエラーが発生し、前者のコードではフォーマットが続行されることです。お好みでお選びください。