我想在文档中添加一条日文引文。我的文档看起来很完美,但当我添加
\usepackage{CJKutf8}
一开始
\begin{CJK}{UTF8}{min}水が綺麗になら虹も一杯\end{CJK}
在我想要引用的地方,我的所有小节标题都失去了粗体,就像我的项目列表的标题一样。我做错了什么?以下是我使用的软件包,如果有用的话:
\documentclass[twoside,openright,12pt]{report}
\usepackage[a4paper,left=2cm,right=2cm,top=2cm,bottom=3cm]{geometry}
\usepackage{lmodern}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{hyperref}
\usepackage[table,xcdraw]{xcolor}
% BIBLIOGRAPHIE
\usepackage[style=authoryear-icomp,autolang=hyphen]{biblatex}
\addbibresource{essai.bib}
\DeclareCiteCommand{\citehyperref}
{\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
\bibhyperref{\usebibmacro{title}\printtext[parens]{\printfield{year}}}}
{\multicitedelim}
{\usebibmacro{postnote}}
\DeclareFieldFormat[article,book,inbook,incollection,inproceedings,patent,thesis,unpublished]{title}{\printnames{author}\addcolon\space\textit{#1}\isdot}
% FIN BIBLIOGRAPHIE
\usepackage{setspace}
\usepackage[french]{babel}
\usepackage[pdftex]{graphicx}
\usepackage{float}
\usepackage{epigraph} % citation retenue
\usepackage{etoolbox}
\usepackage{datetime}
\newdate{datexxx}{01}{09}{2023}
\date{\displaydate{datexxx}}
\usepackage{tcolorbox}
\newenvironment{dialogue}{\parskip=0pt\relax\obeylines}\smallskip
\usepackage{uarial}
\renewcommand{\familydefault}{\sfdefault}
\usepackage{fancyhdr}
\fancypagestyle{plain}{%
\fancyhf{}
\fancyfoot[RO,LE]{\thepage}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}}
\setlength{\headheight}{35pt}
\usepackage{titling}
\newcommand{\subtitle}[1]{%
\posttitle{%
\par\end{center}
\begin{center}\large#1\end{center}
\vskip0.5em}%
}
\newcommand{\HRule}{\rule{\linewidth}{0.5mm}}
\title{XXX}
\subtitle{XXX}
\author{XXX}
\usepackage{hyperref,xcolor}
\definecolor{winered}{rgb}{0,0,0.5}
\definecolor{gris}{rgb}{0.2,0.2,0.2}
\definecolor{bleuclair}{RGB}{207,231,226}
\definecolor{vert}{RGB}{132,246,132}
\hypersetup
{
pdfauthor={César},
pdfsubject={XXX},
pdftitle={XXX},
pdfkeywords={xxx, yyy, zzz},
% colorlinks=false,
pdfborder={0 0 0},
colorlinks=true,
linkcolor={gris},
urlcolor={winered},
filecolor={winered},
citecolor={winered}
}
% --- Glossaire et acronymes
\usepackage{glossaries}
\makeglossaries
\newacronym{xxx}{XXX}{XXX XX}
\frenchbsetup{StandardLists=true}
\usepackage{enumitem}
答案1
我认为使用如下方法更简单、更现代。请注意,您需要使用 LuaLaTeX(推荐)或 XeLaTeX。
\documentclass{article}
\usepackage{lipsum}
\usepackage{fontspec}
\newfontfamily\jptxt{HaranoAjiMincho}
\title{English and {\jptxt 日本語}}
\author{Me or {\jptxt 私}}
\begin{document}
\maketitle
\begin{abstract}
\lipsum[1-1]
\end{abstract}
\tableofcontents
\section{Hello world}
\lipsum[1-1]
\section{{\jptxt 水が綺麗になら虹も一杯}}
\lipsum[1-1]
\end{document}
这将加载与 LaTeX 发行版一起分发的 Unicode 字体。