
두 가지 언어로 기사를 작성해야 합니다. 이 코드
\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}
관련 기사의 러시아 부분까지 작업을 수행합니다. \author
, \title
, 명령어 를 반복할 수 없는 점을 고려하여 나머지(영문 초록 및 키워드까지)는 어떻게 해야 하나요 \maketitle
?
덧셈. 의견을 보내주셔서 감사합니다! 나는 Jon의 조언에 따라 titling
패키지를 사용했습니다. 이제 코드는 다음과 같습니다.
\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}
이 코드는 트릭을 수행했습니다. 그러나 어떤 이유에서인지 마지막 페이지에는 첫 번째 페이지와 동일한 각주가 있습니다. 즉, \thanks
러시아어 제목에서 명령 뒤에 붙인 텍스트입니다 . 마지막 페이지에서 제거할 수 있는 방법이 있나요?
답변1
독창적인 솔루션
패키지 를 사용하면 titling
다음이 작동합니다.
\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}
이면의 아이디어는 의 원래(빈) 형식을 저장 \@thanks
하고 이를 다시 초기화하는 데 사용하는 것입니다.
\thanks
영어 버전과 러시아어 버전에 동일한 번호가 있으면 제대로 작동합니다 . 그렇지 않으면 기호가 달라질 수 있습니다. (예: \thanks
영문 제목의 이 누락된 경우 Author1의 각주 기호는 *가 됩니다.) 이 문제를 처리하기 위해 \nothanks
각주 기호를 조정하는 명령을 정의했습니다.
개선된 솔루션
더 쉽게 이해할 수 있는 tex 파일을 얻으려면 위에서 설명한 원칙을 사용하여 \doubleauthor
, \doubletitle
, \doubledate
및 명령을 정의할 수 있습니다 \doublemaketitle
. MWE는 다음과 같습니다.
\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}
새로 정의된 명령은 다음과 같이 사용할 수 있습니다.
\doubleauthor{Author for both versions of titling}
\doubleauthor{Author for first version}{Author for second version}
\doubletitle
그리고\doubledate
다음과 같이 행동한다\doubleauthor
\doublemaketitle{i}
i=1 또는 i=2이면 지정된 버전의 제목을 인쇄합니다.
\thanks
참고: 및 명령은 및 \nothanks
의 두 인수 모두에 사용될 수 있습니다 .\doubleauthor
\doubletitle