我想在我的文档中添加“初步”。我尝试了以下可接受的答案: 在标题页中添加“非常初步”的提及 但我想把它放在日期下面。我该怎么做?(顺便问一下,它的常规位置在哪里?)
非常感谢!
\begin{filecontents}{preliminary.sty}
\ProvidesPackage{preliminary}
\DeclareOption{draft}{%
\AtBeginDocument{%
\renewcommand\maketitlehookc{%
\begin{center} \Large \textbf{ \color{red}{Preliminary}}\end{center}}}}
\ProcessOptions
\RequirePackage{titling}
\endinput
\end{filecontents}
\documentclass[12pt, draft]{article}
\usepackage{preliminary}
\usepackage[T1]{fontenc}
\usepackage[dvipsnames]{xcolor}
\usepackage{ae,aecompl, amsthm}
\usepackage[colorlinks]{hyperref}
\usepackage{graphicx}
\usepackage{dsfont}
\usepackage{pdfpages}
\usepackage{hyperref}
\hypersetup{
colorlinks=true,
linkcolor=red,
urlcolor=red,
linktoc=all,
citecolor=blue
}
\usepackage{textcomp}
\usepackage[letterpaper, width=17cm, height=20cm]{geometry}
%\usepackage{float}
\usepackage{natbib}
\usepackage{comment}
\definecolor{mygray1}{gray}{0.8}
\definecolor{mygray2}{gray}{0.6}
\definecolor{mygray3}{gray}{0.4}
\definecolor{mygray4}{gray}{0.2}
\newtheorem{theorem}{Theorem}
\newtheorem{lemma}{Lemma}
\newtheorem{proposition}{Proposition}
\newtheorem{corollary}{Corollary}
\newtheorem{conjecture}{Conjecture}
\newtheorem{definition}{Definition}
\newtheorem{example}{Example}
\newtheorem{remark}{Remark}
\newtheorem{claim}{{\sc Claim}}
\newtheorem{condition}{Condition}
\newcommand{\tc}{\textcolor}
\renewcommand{\baselinestretch}{1.25}
\usepackage{mathtools}
\usepackage{upgreek}
\usepackage{authblk}
\usepackage{amssymb}
\usepackage{enumitem}
\usepackage{tikz}
\usetikzlibrary{patterns,arrows,decorations.pathreplacing,calc,intersections,through,backgrounds}
\usepackage[capposition=bottom]{floatrow}
\newcommand{\argmax}{arg\max}
\newcommand{\argmin}{arg\min}
\newcommand*{\QEDA}{\null\nobreak\hfill\ensuremath{\blacksquare}}%
\begin{document}
\title{XX, XX, and XX: \\ How YY May YY YY}
\author{ZZ}
\affil{University of Ohh}
%\date{\today}
%\date{}
\date{\today}
\maketitle
\begin{abstract}
ABC
\noindent {\bf Keywords}: AAA
\end{abstract}
\end{document}
其中,关键的是下面这个部分:
\begin{filecontents}{preliminary.sty}
\ProvidesPackage{preliminary}
\DeclareOption{draft}{%
\AtBeginDocument{%
\renewcommand\maketitlehookc{%
\begin{center} \Large \textbf{ \color{red}{Preliminary}}\end{center}}}}
\ProcessOptions
\RequirePackage{titling}
\endinput
\end{filecontents}
\documentclass[12pt, draft]{article}
\usepackage{preliminary}
答案1
这titling
包裹提供了许多钩子:\maketitlehookc
适合于\affil
liation 和 之间\date
,而 则\maketitlehookd
遵循\date
。因此,将您的 更改preliminary.sty
为 update\maketitlehookd
而不是\miketitlehookc
:
\begin{filecontents}[overwrite]{preliminary.sty}
\ProvidesPackage{preliminary}
\DeclareOption{draft}{%
\AtBeginDocument{%
\renewcommand\maketitlehookd{%
\begin{center}
\Large\bfseries\color{red}%
Preliminary
\end{center}}}}
\ProcessOptions
\RequirePackage{titling}
\endinput
\end{filecontents}