
Necesito hacer un artículo en dos idiomas. este codigo
\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}
hace el trabajo en lo que respecta a la parte rusa del artículo en cuestión. ¿Cómo puedo hacer el resto (hasta el resumen y las palabras clave en inglés) considerando que no puedo repetir los comandos \author
, \title
y \maketitle
?
Suma. ! Gracias por los comentarios! Seguí el consejo de Jon y usé el titling
paquete. Ahora el código se ve así:
\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}
Este código funcionó. Sin embargo, por alguna razón la última página tiene la misma nota a pie de página que la primera, es decir, el texto que puse después de \thanks
comando en el título en ruso. ¿Hay alguna forma de eliminarlo de la última página?
Respuesta1
Solución original
Usando el titling
paquete lo siguiente debería funcionar:
\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}
La idea detrás es guardar la forma original (vacía) \@thanks
y utilizarla para la reinicialización.
Esto funciona bien si hay el mismo número \thanks
para la versión en inglés y en ruso. De lo contrario, los símbolos podrían volverse diferentes. (Por ejemplo, si \thanks
falta el título en inglés, el símbolo de nota al pie de Autor1 se convierte en *). Para poder solucionar este problema, definí el comando \nothanks
para ajustar los símbolos de las notas al pie.
Solución mejorada
Para obtener un archivo tex que sea más fácil de entender, se pueden utilizar los principios descritos anteriormente para definir los comandos \doubleauthor
,, y . El MWE se convierte en:\doubletitle
\doubledate
\doublemaketitle
\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}
Los comandos recién definidos se pueden utilizar de la siguiente manera:
\doubleauthor{Author for both versions of titling}
\doubleauthor{Author for first version}{Author for second version}
\doubletitle
y\doubledate
comportarse como\doubleauthor
\doublemaketitle{i}
con i=1 o i=2 imprime la versión especificada del título.
Observación: Los comandos \thanks
y \nothanks
se pueden usar en ambos argumentos de \doubleauthor
y \doubletitle
.