我希望我的章节标题是英文的,但如果我删除 \usepackage{french},编译就会崩溃。你知道我该怎么做吗?谢谢
\documentclass[a4paper]{report}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{fullpage}
\usepackage{eso-pic}
\usepackage{geometry}
\usepackage{french}
\usepackage[Glenn]{fncychap}
% Font style definition
% Interline setting
\renewcommand{\baselinestretch}{1.5}
\newcommand{\HRule}{\rule{\linewidth}{0.5mm}}
\newcommand{\blap}[1]{\vbox to 0pt{#1\vss}}
\newcommand\AtUpperLeftCorner[3]{%
\put(\LenToUnit{#1},\LenToUnit{\dimexpr\paperheight-#2}){\blap{#3}}%
}
\newcommand\AtTopCenterPage[2]{%
\put(\LenToUnit{.5\paperwidth},\LenToUnit{\dimexpr\paperheight-#1}){\blap{\hbox to 0pt{\hss#2\hss}}}%
}
\newcommand\AtUpperRightCorner[3]{%
\put(\LenToUnit{\dimexpr\paperwidth-#1},\LenToUnit{\dimexpr\paperheight-#2}){\blap{\llap{#3}}}%
}
\title{\huge{Development and characterization of a gradient structured material elaborated by direct deposition additive manufacturing}}
\author{\textsc{Corongiu} Chiara}
\date{\today}
\makeatletter
\geometry{hmargin=2cm,vmargin=3cm}
\begin{document}
\begin{titlepage}
\AddToShipoutPicture{
\AtUpperLeftCorner{1.5cm}{1.8cm}{\includegraphics[scale=0.7]{pgarde/uliege.jpg}}
% \AtTopCenterPage{1.5cm}{1cm}{\includegraphics[width=4cm]{pgarde/mms_logo.png}}
\AtUpperRightCorner{1.5cm}{0.6cm}{\includegraphics[scale=0.5]{pgarde/Sonaca2.png}}
}
\begin{center}
\vspace*{5cm}
\HRule
\vspace{0.3cm}
\textsc{\textbf{\@title}}
\vspace{0.3cm}
\HRule
\vspace*{0.5cm}
\LARGE{\textit{Master thesis submitted in partial fulfillment of the requirements\\
for the degree of Master in Aerospace Engineering by\\ \vspace{0.2cm}} \@author}\\
\end{center}
\vfill
\begin{center}
\large{University of Liège - Faculty of Applied Sciences\\
Academic year 2019-2020}
\end{center}
% \begin{center}
% \makebox[\textwidth]{\includegraphics[width=\paperwidth]{data/footer.jpg}}
% \end{center}
\end{titlepage}
\ClearShipoutPicture
\newpage
\pagenumbering{roman}
\setcounter{page}{1}
\english
\chapter*{Abstract}
\newpage
\chapter*{Acknowledgments}
\newpage
\tableofcontents
\listoffigures
\listoftables
\newpage
\pagenumbering{arabic}
\setcounter{page}{1}
\chapter*{Introduction}
\chapter{Powder characterisation}
\end{document}
答案1
该软件包french
似乎已经过时了,最好使用 babel,它绝对是一个主线软件包。
删除后,\usepackage{french}
还需要删除*.aux、*.toc、*.log 和 *.lot 文件,简而言之,就是 LaTeX 在获取 *.pdf 的过程中生成的辅助文件。*注意不要删除.tex 文件!!!
我在一些地方修改了你的代码:
\documentclass[a4paper]{report}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{fullpage}
\usepackage{eso-pic}
\usepackage{geometry}
\usepackage[english, french]{babel}
%\usepackage{french}
\usepackage[Glenn]{fncychap}
% Font style definition
\usepackage{blindtext}
% Interline setting
\renewcommand{\baselinestretch}{1.5}
\newcommand{\HRule}{\rule{\linewidth}{0.5mm}}
\newcommand{\blap}[1]{\vbox to 0pt{#1\vss}}
\newcommand\AtUpperLeftCorner[3]{%
\put(\LenToUnit{#1},\LenToUnit{\dimexpr\paperheight-#2}){\blap{#3}}%
}
\newcommand\AtTopCenterPage[2]{%
\put(\LenToUnit{.5\paperwidth},\LenToUnit{\dimexpr\paperheight-#1}){\blap{\hbox to 0pt{\hss#2\hss}}}%
}
\newcommand\AtUpperRightCorner[3]{%
\put(\LenToUnit{\dimexpr\paperwidth-#1},\LenToUnit{\dimexpr\paperheight-#2}){\blap{\llap{#3}}}%
}
\title{\huge{Development and characterization of a gradient structured material elaborated by direct deposition additive manufacturing}}
\author{\textsc{Corongiu} Chiara}
\date{\today}
\makeatletter
\let\mytitle\@title
\let\myauthor\@author
\let\mydate\@date
\makeatother
%\makeatletter
\geometry{hmargin=2cm,vmargin=3cm}
\begin{document}
\begin{titlepage}
% \AddToShipoutPicture{
% \AtUpperLeftCorner{1.5cm}{1.8cm}{\includegraphics[scale=0.7]{pgarde/uliege.jpg}}
% % \AtTopCenterPage{1.5cm}{1cm}{\includegraphics[width=4cm]{pgarde/mms_logo.png}}
% \AtUpperRightCorner{1.5cm}{0.6cm}{\includegraphics[scale=0.5]{pgarde/Sonaca2.png}}
% }
\begin{center}
\vspace*{5cm}
\HRule
\vspace{0.3cm}
\textsc{\textbf{\mytitle}}
\vspace{0.3cm}
\HRule
\vspace*{0.5cm}
\LARGE{\textit{Master thesis submitted in partial fulfillment of the requirements\\
for the degree of Master in Aerospace Engineering by\\ \vspace{0.2cm}} \myauthor}\\
\end{center}
\vfill
\begin{center}
\large{University of Liège - Faculty of Applied Sciences\\
Academic year 2019-2020}
\end{center}
% \begin{center}
% \makebox[\textwidth]{\includegraphics[width=\paperwidth]{data/footer.jpg}}
% \end{center}
\end{titlepage}
\ClearShipoutPicture
\newpage
\pagenumbering{roman}
\setcounter{page}{1}
\selectlanguage{english}
\chapter*{Abstract}
\blindtext{}
\selectlanguage{french}
\blindtext{}
\newpage
\chapter*{Acknowledgments}
\newpage
\tableofcontents
\listoffigures
\listoftables
\newpage
\pagenumbering{arabic}
\setcounter{page}{1}
\chapter*{Introduction}
\chapter{Powder characterisation}
\end{document}
编译它(两次),您将获得英文和法文的摘要文本。
但是如果您的主要问题是如何在所有章节中自动更改语言,以便章节和章节的语言为英语,而文本为法语,请编辑您的问题。
texdoc packagename
顺便说一句:您可以通过命令行(在 Windows 下:cmd.exe)获取每个软件包的手册。尝试一下texdoc -s packagename
。