
Ich muss einen Artikel in zwei Sprachen erstellen. Dieser Code
\begin{document}
\author{Author Name 1}
\author{Author Name 2}
\affil[1]{Affiliation of the Author 1}
\affil[2]{Affiliation of the Author 2}
\title{Title in Russian}
\date{}
\maketitle
\thispagestyle{firststyle}
\renewcommand{\abstractname}{}
\begin{abstract}
\label{firstpage}
\noindent \textbf{Аннотация:} Abstract in Russian.\par
\vspace{10pt}
\noindent \textbf{Ключевые слова:} keywords in Russian.
\end{abstract}
\section{First section}
Text of the article
\end{document}
funktioniert, soweit es den russischen Teil des Artikels betrifft. Wie kann ich den Rest erledigen (bis zur Zusammenfassung und den Schlüsselwörtern auf Englisch), wenn ich bedenke, dass ich die Befehle \author
, \title
, und nicht wiederholen kann \maketitle
?
Zusatz. Danke für die Kommentare! Ich bin Jons Rat gefolgt und habe das titling
Paket verwendet. Jetzt sieht der Code so aus:
\documentclass[12pt,a4paper]{article}
\usepackage{cmap}
\usepackage{mathtext}
\usepackage[T2A]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english,russian]{babel}
\usepackage{indentfirst}
\frenchspacing
\usepackage{authblk}
\usepackage{titling}
\begin{document}
\preauthor{\large}
\DeclareRobustCommand{\authoring}{
\begin{center}
Автор1\textsuperscript{i}, Автор2\textsuperscript{ii} \par
\vspace{20pt}
\textsuperscript{i}Место работы Автора1 \\
\textsuperscript{ii}Место работы Автора1 \\
\end{center}}
\author{\authoring}
\postauthor{\par}
\title{Название\thanks{ссылка на грант}}
\date{}
\maketitle
\renewcommand{\abstractname}{}
\begin{abstract}
\label{firstpage}
\noindent \textbf{Аннотация:} Abstract in Russian.\par
\vspace{10pt}
\noindent \textbf{Ключевые слова:} keywords in Russian.
\end{abstract}
\section{Первый раздел} Text of the article
\preauthor{\large}
\DeclareRobustCommand{\authoring}{
\begin{center}
Author1\textsuperscript{i}, Author2\textsuperscript{ii} \par
\vspace{20pt}
\textsuperscript{i}Affiliation of Author1 \\
\textsuperscript{ii}Affiliation of Author2 \\
\end{center}}
\author{\authoring}
\postauthor{\par}
\title{Title in English}
\date{}
\maketitle
\renewcommand{\abstractname}{}
\begin{abstract}
\noindent \textbf{Abstract:} Abstract in English.\par
\vspace{10pt}
\noindent \textbf{Keywords:} keyword1, keyword2, \dots.
\end{abstract}
\end{document}
Dieser Code hat funktioniert. Aus irgendeinem Grund hat die letzte Seite jedoch dieselbe Fußnote wie die erste, nämlich den Text, den ich \thanks
im russischen Titel nach dem Befehl eingefügt habe. Gibt es eine Möglichkeit, ihn von der letzten Seite zu entfernen?
Antwort1
Ursprüngliche Lösung
Mit dem titling
Paket sollte Folgendes funktionieren:
\documentclass[12pt,a4paper]{article}
% Needed for cyrillic
\usepackage[T2A]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english,russian]{babel}
\usepackage{titling}
\newcommand{\nothanks}{\protect\stepcounter{footnote}}
\begin{document}
% Save initial \@thanks
\makeatletter
\let\@initialthanks\@thanks
\makeatother
\title{Название\thanks{ссылка на грант}}
\author{Автор1\thanks{Место работы Автора1} \and Автор2\thanks{Место работы Автора2}}
\date{}
\maketitle
\renewcommand{\abstractname}{}
\begin{abstract}
\label{firstpage}
\noindent \textbf{Аннотация:} Abstract in Russian.\par
\vspace{10pt}
\noindent \textbf{Ключевые слова:} keywords in Russian.
\end{abstract}
\section{Первый раздел} Text of the article
% Reinitialize \@thanks
\makeatletter
\let\@thanks\@initialthanks
\makeatother
\title{Title in English \nothanks}
\author{Author1\thanks{Affilation of Author1} \and Author2\thanks{Affilation of Author2}}
\date{}
\maketitle
\renewcommand{\abstractname}{}
\begin{abstract}
\noindent \textbf{Abstract:} Abstract in English.\par
\vspace{10pt}
\noindent \textbf{Keywords:} keyword1, keyword2, \dots.
\end{abstract}
\end{document}
Die Idee dahinter besteht darin, die ursprüngliche (leere) Form zu speichern \@thanks
und sie für die Neuinitialisierung zu verwenden.
Dies funktioniert einwandfrei, wenn die Nummern für die englische und die russische Version gleich sind \thanks
. Andernfalls können die Symbole unterschiedlich sein. (Wenn beispielsweise \thanks
im englischen Titel das fehlt, wird das Fußnotensymbol für Autor1 zu *.) Um dieses Problem zu beheben, habe ich den Befehl \nothanks
zum Anpassen der Fußnotensymbole definiert.
Verbesserte Lösung
Um eine Tex-Datei zu erhalten, die leichter zu verstehen ist, könnte man die oben beschriebenen Prinzipien verwenden, um die Befehle \doubleauthor
, \doubletitle
, \doubledate
, und zu definieren \doublemaketitle
. Das MWE wird:
\documentclass[12pt,a4paper]{article}
% Packages
\usepackage[T2A]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english,russian]{babel}
\usepackage{titling} % Control over the typesetting of the \maketitle command
\usepackage{xparse} % A generic document command parser
% New commands
\NewDocumentCommand{\doubleauthor}{mg}{%
\newcommand{\authorA}{#1}
\IfNoValueTF{#2}{\newcommand{\authorB}{#1}}{\newcommand{\authorB}{#2}}
}
\NewDocumentCommand{\doubletitle}{mg}{%
\newcommand{\titleA}{#1}
\IfNoValueTF{#2}{\newcommand{\titleB}{#1}}{\newcommand{\titleB}{#2}}
}
\NewDocumentCommand{\doubledate}{mg}{%
\newcommand{\dateA}{#1}
\IfNoValueTF{#2}{\newcommand{\dateB}{#1}}{\newcommand{\dateB}{#2}}
}
\makeatletter
\let\@initialthanks\@thanks
\newcommand{\doublemaketitle}[1]{%
\let\@thanks\@initialthanks
\ifcase#1\relax\or
\title{\titleA}
\author{\authorA}
\date{\dateA}
\or
\title{\titleB}
\author{\authorB}
\date{\dateB}
\fi
\maketitle
}
\makeatother
\newcommand{\nothanks}{\protect\stepcounter{footnote}}
% Title info
\doubletitle{азвание\thanks{ссылка на грант}}{Title in English \nothanks}
\doubleauthor{втор1\thanks{Место работы Автора1} \and Автор2\thanks{Место работы Автора2}}{Author1\thanks{Affilation of Author1} \and Author2\thanks{Affilation of Author2}}
\doubledate{}
\begin{document}
\doublemaketitle{1}
Russian content.
\doublemaketitle{2}
English content.
\end{document}
Die neu definierten Befehle können wie folgt verwendet werden:
\doubleauthor{Author for both versions of titling}
\doubleauthor{Author for first version}{Author for second version}
\doubletitle
und\doubledate
verhalte mich wie\doubleauthor
\doublemaketitle{i}
mit i=1 oder i=2 druckt die angegebene Version des Titels.
Bemerkung: Die Befehle \thanks
und können in beiden Argumenten von und \nothanks
verwendet werden .\doubleauthor
\doubletitle