更改大学名称,论文标题等用于不同语言的摘要

时间:2019-05-21 10:41:57

标签: latex tex

我的论文需要用德语和英语写两个不同的摘要。德语版本可以正常工作,通过使用\ begin {otherlanguage}命令,抽象名称本身可以更改为英语。但此外,我需要在第二个摘要中使用英文斜率,大学名称,学院名称和公司名称。我尝试使用\ renewcommand,但是它不会更改输出文件中的标题,该文件仍然是德语。

我找到了多个标题的软件包(\ titling),但是不适用于大学名称等等。

提前谢谢


\documentclass[11pt, english, ngerman,]{MastersDoctoralThesis}
\thesistitle{Title in German}
\university{University Title in German}


\begin{document}

\begin{abstract}
\addchaptertocentry{\abstractname}
German German German
\end{abstract}


\begin{otherlanguage}{english}

\renewcommand{\thesistitle}{Title in English}
\renewcommand{\university}{University Title in English}

\begin{abstract}
English English English
\end{abstract}

\end{otherlanguage}

2 个答案:

答案 0 :(得分:1)

mustermensch

% This template was downloaded from:
% http://www.LaTeXTemplates.com
% Template license:
% CC BY-NC-SA 3.0 (http://creativecommons.org/licenses/by-nc-sa/3.0/)

\documentclass[11pt, english, ngerman,openany]{MastersDoctoralThesis}

\usepackage{blindtext}
\thesistitle{Wombat} % Your thesis title, this is used in the title and abstract, print it elsewhere with \ttitle
\supervisor{Gerald Giraffe} % Your supervisor's name, this is used in the title page, print it elsewhere with \supname
\examiner{} % Your examiner's name, this is not currently used anywhere in the template, print it elsewhere with \examname
\degree{Doctor of Philosophy} % Your degree name, this is used in the title page and abstract, print it elsewhere with \degreename
\author{John \textsc{Smith}} % Your name, this is used in the title page and abstract, print it elsewhere with \authorname
\addresses{} % Your address, this is not currently used anywhere in the template, print it elsewhere with \addressname

\subject{Biological Sciences} % Your subject area, this is not currently used anywhere in the template, print it elsewhere with \subjectname
\keywords{} % Keywords for your thesis, this is not currently used anywhere in the template, print it elsewhere with \keywordnames
\university{Uni der Zootiere} % Your university's name and URL, this is used in the title page and abstract, print it elsewhere with \univname
\department{Institut der Angewandten Tierpflegeranalyse} % Your department's name and URL, this is used in the title page and abstract, print it elsewhere with \deptname
\group{\href{http://researchgroup.university.com}{Research Group Name}} % Your research group's name and URL, this is used in the title page, print it elsewhere with \groupname
\faculty{\href{http://faculty.university.com}{Faculty Name}} % Your faculty's name and URL, this is used in the title page and abstract, print it elsewhere with \facname

\begin{document}



\begin{abstract}
\addchaptertocentry{\abstractname}
\blindtext
\end{abstract}


\begin{otherlanguage}{english}
\makeatletter
\renewcommand{\@title}{Capybara}
\makeatother
\renewcommand{\univname}{Univerity of Zoo Animals}
\renewcommand{\deptname}{Institute for applied Something}
\begin{abstract}
\blindtext
\end{abstract}
\end{otherlanguage}
\end{document}

答案 1 :(得分:0)

我没有,也不知道软件包MastersDoctoralThesis。 如果其中包含babel软件包,则可以使用iflang测试活动语言。

\documentclass[11pt]{article}
\usepackage{iflang}
\usepackage[german]{babel}
%\usepackage[english]{babel}

\begin{document}
\IfLanguageName{german}{
German German German
}{
English English English
}
\end{document}

如果您的文档类不包含babel语言,则可以通过定义宏并使用ifthen包测试其值来执行类似的操作。

\documentclass[11pt]{article}
\usepackage{ifthen}
\def\mylanguage{german}

\begin{document}
\ifthenelse{\equal{\mylanguage}{german}}{
German German German
}{
English English English
}
\end{document}