修改模板头部的行

修改模板头部的行

这是模板 http://www.latextemplates.com/template/wenneker-article

在此处输入图片描述

我的代码是:

\title{\Large Title.} % The article title
\author{
    \textbf{name} % Authors
    \newline\newline % Space before institutions
    \institution{Universidad }
}
\date{%
    $^1$Organization 1\\%
    $^2$Organization 2\\[2ex]%
    \today
}

我希望这条线位于日期下方

编辑 1: 我在 main.tx 中添加此代码

\author{
    \textbf{Juan perez, [email protected]} % Authors
    \newline\newline % Space before institutions
    \institution{Universidad Antuart, sant pertersburgo}
}

% Example of a one line author/institution relationship
%\author{\newauthor{John Marston} \newinstitution{Universidad Nacional Autónoma de México, Mexico City, Mexico}}

\date{\today} % Add a date here if you would like one to appear underneath the title block, use \today for the current date, leave empty for no date
%\date{}
%\date{\vspace{-10ex}}
\preauthor{\begin{center}}
\postauthor{\end{center}}
\postdate{\par\HorRule\end{center}}
\postdate{\par\HorRule\end{center}}

这是结果

在此处输入图片描述

答案1

模板titling在 中加载包structure.tex。因此,您可以在 的前言中添加以下代码main.tex

\postauthor{}
\postdate{\par\HorRule\end{center}}

结果:

在此处输入图片描述


如果您想要以作者和大学为中心,请使用:

\preauthor{\begin{center}}
\postauthor{\end{center}}
\postdate{\par\HorRule\end{center}}

在序言中将其main.tex改为\author

\author{%
  \authorstyle{John Marston\textsuperscript{1,2,3} and Bonnie MacFarlane\textsuperscript{2,3}}% <- remove spurious space!!
  \\[\baselineskip]% <- changed
  \textsuperscript{1}\institution{Universidad Nacional Autónoma de México, Mexico City, Mexico}\\
  \textsuperscript{2}\institution{University of Texas at Austin, Texas, United States of America}\\
  \textsuperscript{3}\institution{\texttt{LaTeXTemplates.com}}
}

作为 MWE(仅使用structure.tex和的相关代码):main.tex

\documentclass[10pt, a4paper, twocolumn]{article}

% --- relevant part from structure.tex ---
\usepackage[english]{babel}
\usepackage{microtype}
\usepackage[svgnames]{xcolor}
\usepackage{sectsty}
\allsectionsfont{\usefont{OT1}{phv}{b}{n}}
\usepackage{geometry}
\geometry{
  top=1cm,
  bottom=1.5cm,
  left=2cm,
  right=2cm,
  includehead,
  includefoot,
  %showframe,
}
\setlength{\columnsep}{7mm}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{XCharter}
\newcommand{\authorstyle}[1]{{\large\usefont{OT1}{phv}{b}{n}\color{DarkRed}#1}}
\newcommand{\institution}[1]{{\footnotesize\usefont{OT1}{phv}{m}{sl}\color{Black}#1}}
\usepackage{titling} % Allows custom title configuration
\newcommand{\HorRule}{\color{DarkGoldenrod}\rule{\linewidth}{1pt}}
\pretitle{
  \vspace{-30pt}%
  \HorRule\vspace{10pt} % <- note that this spurious space is needed!
  \fontsize{32}{36}\usefont{OT1}{phv}{b}{n}\selectfont%
  \color{DarkRed}%
}
\posttitle{\par\vskip 15pt}
\preauthor{}
\postauthor{\vspace{10pt}\par\HorRule\vspace{20pt}}
\usepackage{lettrine}
\usepackage{fix-cm}
\newcommand{\initial}[1]{%
  \lettrine[lines=3,findent=4pt,nindent=0pt]{%
    \color{DarkGoldenrod}% Lettrine colour
    {#1}
  }{}%
}
\usepackage{xstring}
\newcommand{\lettrineabstract}[1]{%
  \StrLeft{#1}{1}[\firstletter]
  \initial{\firstletter}\textbf{\StrGobbleLeft{#1}{1}}
}
% --- end relevant code from `structure.tex` ---

\title{Effective Methods for Capturing Cattle Rustlers}
\author{%
  \authorstyle{John Marston\textsuperscript{1,2,3} and Bonnie MacFarlane\textsuperscript{2,3}}% <- remove spurious space!!
  \\[\baselineskip]% <- changed
  \textsuperscript{1}\institution{Universidad Nacional Autónoma de México, Mexico City, Mexico}\\
  \textsuperscript{2}\institution{University of Texas at Austin, Texas, United States of America}\\
  \textsuperscript{3}\institution{\texttt{LaTeXTemplates.com}}
}

\preauthor{\begin{center}}% <- added
\postauthor{\end{center}}% <- added
\postdate{\par\HorRule\end{center}}% <- added
\date{\today}

\usepackage{lipsum}% only for dummy text
\begin{document}
\maketitle
\lettrineabstract{Lorem ipsum ... \lipsum[1]}
\section{Section}
\lipsum
\end{document}

结果:

在此处输入图片描述

相关内容