1

I'd like to add only one quote in Japanese in my document. My document looked perfect, but when I added

\usepackage{CJKutf8}

at the beginning and

\begin{CJK}{UTF8}{min}水が綺麗になら虹も一杯\end{CJK}

where I wanted the quote, all my subsubsection titles lost their boldness, as the titles of my item lists. What did I do wrong? Here are the packages I use, if it's useful:

\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 Answers1

1

I think using a method like the following is much more simple and modern. Note that you need to use LuaLaTeX (recommended) or 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}

This loads a Unicode font which is distributed with LaTeX-distributions.

Niranjan
  • 3,435
  • Using LuaLatex is for the moment not an option as I've just tried and the amount of errors I have seems too high for me to solve them completely... I upvoted your answer, though, as it might be useful for next projects. – djcaesar9114 Apr 27 '23 at 12:26
  • @djcaesar9114 It would be a strange situation if your code works with PDFLaTeX and doesn't work with LuaLaTeX. Typically this shouldn't happen, but anyways, I can help you debug. – Niranjan Apr 28 '23 at 10:38
  • Also, there are cases where a code working in XeLaTeX fails with LuaLaTeX and if you are using XeLaTeX, let me mention that my method should work with XeLaTeX too. – Niranjan Apr 28 '23 at 10:40