3

I need to make an article in two languages. This 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}

does the job as far as the Russian part of the article concerned. How can I do the rest (until the abstract and keywords in English) considering that I can't repeat \author, \title, and \maketitle commands?

Addition. Thanks for the comments! I followed Jon's advice and used the titling package. Now the code looks like this:

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

This code did the trick. However, for some reason the last page has the same footnote as the first one, namely the text I put after \thanks command in the Russian title. Is there any way to remove it from the last page?

3
  • You can do everything you want with \begin{titlepage} environment. But it is manual work (and I think it is better than maketitle). And You can insert it twice, of course, for eng and rus language.
    – user98432
    Mar 20, 2016 at 22:27
  • 1
    If you redefine the \maketitle of the document class you are using (but which you did not include in your example here), you could have any number of things included. Or you could use the facilities of the titling package, which provides lots of things to hook into.
    – jon
    Mar 21, 2016 at 0:10
  • Since all the russian stuff, including the article text, comes first, can't you make two separate documents and simply merge the pdfs?
    – Johannes_B
    Mar 21, 2016 at 7:22

1 Answer 1

3

Original solution

Using the titling package the following should work:

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

The idea behind is to save the original (empty) form of \@thanks and use it for reinitialization.

This works fine if the there are the same number \thanks for the English and the Russian version. If not, the symbols might become different. (E.g. if the \thanks in the English title is missing, the footnote symbol for Author1 becomes *). To be able to deal with this problem I defined the command \nothanks to adjust the footnote symbols.

Improved solution

To get a tex-File that is easier to understand, one could use the principles described above, to define the commands \doubleauthor, \doubletitle, \doubledate, and \doublemaketitle. The MWE becomes:

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

The newly defined commands can be used as follows:

  • \doubleauthor{Author for both versions of titling}
  • \doubleauthor{Author for first version}{Author for second version}
  • \doubletitle and \doubledate behave as \doubleauthor
  • \doublemaketitle{i} with i=1 or i=2 prints the specified version of the title.

Remark: The commands \thanks and \nothanks can be used in both arguments of \doubleauthor and \doubletitle.

2
  • 1
    @David I improved my solution, such that the usage becomes more intuitive.
    – crixstox
    Mar 22, 2016 at 15:05
  • @crixstos, this solution does seem like a better one. I prefer the idea of filling entire author/title data in a preamble rather than in two different places of the document body. Thanks!
    – David
    Mar 22, 2016 at 18:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .