我的软件包有问题babel
。这是一个带注释的最小工作示例\usepackage[french]{babel}
。
\documentclass{book}
\usepackage[utf8]{inputenc}
\usepackage{lipsum}
%\usepackage[french]{babel}
\usepackage[Lenny]{fncychap}
\usepackage{caption}
\usepackage[pdftex]{graphicx}
\usepackage{fancyhdr}
\renewcommand\contentsname{Table des mati\`eres}
\usepackage[colorlinks=true,
linkcolor=red,
urlcolor=blue,
pdftitle={Dossier de Candidature},
pdfauthor={Dimitrios Papas}]{hyperref}
\fancypagestyle{mainmatter-pages}{%
\fancyhf{}% Clear header/footer
\renewcommand{\headrulewidth}{0pt}% Remove header rule
\renewcommand{\footrulewidth}{0pt}% Remove footer rule
\fancyfoot[L]{\hyperref[ToC-first-page]{Jump to Contents}}
\fancyfoot[C]{\thepage}
}
\let\oldtableofcontents\tableofcontents
\renewcommand{\tableofcontents}{%
\clearpage
\phantomsection% Place hyperlink marker
\label{ToC-first-page}% Set \label for hyperlink
\oldtableofcontents
}
\let\oldmainmatter\mainmatter
\renewcommand{\mainmatter}{%
\clearpage
\oldmainmatter
\pagestyle{mainmatter-pages}%
}
\usepackage[affil-it]{authblk}
\usepackage{pdfpages}
\setlength{\oddsidemargin}{.5cm} \setlength{\evensidemargin}{.5cm}
\setlength{\textwidth}{15cm} \setlength{\textheight}{21.0cm}
\setlength{\topmargin}{0in}
\newcommand{\M}{{\it Mathematica}}
\providecommand\Matlab{\textsc{Matlab}}
\newcommand{\FIG}[2]
{
\begin{figure}[!hbt]
\begin{center}
\begin{minipage}{0.85\textwidth}
\centering{\includegraphics[]{#1}}
\caption{\label{#1}\small{#2}}
\end{minipage}
\end{center}
\end{figure}
}
\parindent0pt \parskip10pt
\begin{document}
\title{DOSSIER DE CANDIDATURE}
\author{Dimitrios Papas\thanks{vbkvbkvbdkvbd}}
\affil{
Université\ldots}
\date{\begin{center}
Docteur en Mécanique
\end{center}}
\maketitle \thispagestyle{empty}
\frontmatter
\tableofcontents
\mainmatter
\chapter{First}
\section{First section}
\section{Expérience professionnelle}
blablabla
\begin{description}
\item Depuis 09/2016
\begin{itemize}
\item foo
\begin{itemize}
\item foo
\end{itemize}
\end{itemize}
\end{description}
\end{document}
这按预期工作。但取消注释\usepackage[french]{babel}
似乎与嵌套itemize
环境冲突。我需要这个包来处理像guillemotleft
(和 right) 等字符。
有什么解决方法吗?提前致谢!
答案1
您必须使用\setlist
中的命令enumitem
。顺便说一句,我添加 \uspackage[T1]{fontenc}
并加载了Latin Modern
正确连字符重音字母的字体。我还假设您想要a4paper
,最好将其加载frenchb
为文档类选项:
\documentclass[a4paper, french]{book}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{lipsum}
\usepackage{babel}
\usepackage[Lenny]{fncychap}
\usepackage{caption}
\usepackage{graphicx}
\usepackage{fancyhdr}
\renewcommand\contentsname{Table des mati\`eres}
\usepackage[colorlinks=true,
linkcolor=red,
urlcolor=blue,
pdftitle={Dossier de Candidature},
pdfauthor={Dimitrios Papas}]{hyperref}
\fancypagestyle{mainmatter-pages}{%
\fancyhf{}% Clear header/footer
\renewcommand{\headrulewidth}{0pt}% Remove header rule
\renewcommand{\footrulewidth}{0pt}% Remove footer rule
\fancyfoot[L]{\hyperref[ToC-first-page]{Jump to Contents}}
\fancyfoot[C]{\thepage}
}
\let\oldtableofcontents\tableofcontents
\renewcommand{\tableofcontents}{%
\clearpage
\phantomsection% Place hyperlink marker
\label{ToC-first-page}% Set \label for hyperlink
\oldtableofcontents
}
\let\oldmainmatter\mainmatter
\renewcommand{\mainmatter}{%
\clearpage
\oldmainmatter
\pagestyle{mainmatter-pages}%
}
\usepackage[affil-it]{authblk}
\usepackage{pdfpages}
\setlength{\oddsidemargin}{.5cm} \setlength{\evensidemargin}{.5cm}
\setlength{\textwidth}{15cm} \setlength{\textheight}{21.0cm}
\setlength{\topmargin}{0in}
\newcommand{\M}{{\it Mathematica}}
\providecommand\Matlab{\textsc{Matlab}}
\newcommand{\FIG}[2]
{
\begin{figure}[!hbt]
\begin{center}
\begin{minipage}{0.85\textwidth}
\centering{\includegraphics[]{#1}}
\caption{\label{#1}\small{#2}}
\end{minipage}
\end{center}
\end{figure}
}
\parindent0pt \parskip10pt
\usepackage{enumitem}
\setlist[itemize]{wide=0pt, leftmargin=*}
\setlist[itemize, 1]{label=\textbullet}
\setlist[itemize, 2]{label=\textendash}
\begin{document}
\title{DOSSIER DE CANDIDATURE}
\author{Dimitrios Papas\thanks{vbkvbkvbdkvbd}}
\affil{
Université\ldots}
\date{\begin{center}
Docteur en Mécanique
\end{center}}
\maketitle \thispagestyle{empty}
\frontmatter
\tableofcontents
\mainmatter
\chapter{First}
\section{First section}
\section{Expérience professionnelle}
blablabla
\begin{description}
\item Depuis 09/2016
\begin{itemize}
\item foo
\begin{itemize}
\item foo
\end{itemize}
\end{itemize}
\end{description}
\end{document}