![如何将左右文本移到上面一行?](https://linux22.com/image/471424/%E5%A6%82%E4%BD%95%E5%B0%86%E5%B7%A6%E5%8F%B3%E6%96%87%E6%9C%AC%E7%A7%BB%E5%88%B0%E4%B8%8A%E9%9D%A2%E4%B8%80%E8%A1%8C%EF%BC%9F.png)
我的代码如下:
% Source: http://tex.stackexchange.com/a/5374/23931
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[margin=1in]{geometry}
\usepackage{xcolor} % Add the xcolor package
\usepackage{biblatex} %Imports biblatex package
\addbibresource{papers.bib} %Import the bibliography file
\usepackage{hyperref}
\hypersetup{
colorlinks,
citecolor=green,
linkcolor=blue,
urlcolor=blue
}
\newcommand{\HRule}{\rule{\linewidth}{0.5mm}}
\newcommand{\Hrule}{\rule{\linewidth}{0.3mm}}
\makeatletter% since there's an at-sign (@) in the command name
\renewcommand{\@maketitle}{%
\parindent=0pt% don't indent paragraphs in the title block
\centering
{\Large \bfseries\textsc{\@title}}
\HRule\par%
\textit{\@author \hfill \@date}
\par
}
\makeatother% resets the meaning of the at-sign (@)
\title{Statement of Purpose}
\author{\textcolor{blue}{ \textbf{Tim hammerberg}}}
\date{\textcolor{blue}{ \textbf{hammerberg.github.io}}}
\begin{document}
\maketitle% prints the title block
\vspace{0.4em}
Recent breakthroughs in natural language processing (NLP) have unlocked remarkable capabilities. However, there are still core limitations concerning efficiency.
\end{document}
我想要 Tim hammerberg 和 hammerberg.github.io 就在上面,怎么做?
答案1
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[margin=1in]{geometry}
\usepackage{xcolor} % Add the xcolor package
\usepackage{biblatex} %Imports biblatex package
\addbibresource{papers.bib} %Import the bibliography file
\usepackage{hyperref}
\hypersetup{
colorlinks,
citecolor=green,
linkcolor=blue,
urlcolor=blue
}
\newcommand{\HRule}{\rule{\linewidth}{0.5mm}}
\newcommand{\Hrule}{\rule{\linewidth}{0.3mm}}
\makeatletter% since there's an at-sign (@) in the command name
\renewcommand{\@maketitle}{%
\parindent=0pt% don't indent paragraphs in the title block
\centering
{\Large \bfseries\textsc{\@title}}\par%
\textit{\@author \hfill \@date}\par%
\HRule%
% \par
}
\makeatother% resets the meaning of the at-sign (@)
\title{Statement of Purpose}
\author{\textcolor{blue}{ \textbf{Tim hammerberg \vspace{-2ex}}}}
\date{\textcolor{blue}{ \textbf{hammerberg.github.io}}}
\begin{document}
\maketitle% prints the title block
\vspace{0.8em}
Recent breakthroughs in natural language processing (NLP) have unlocked remarkable capabilities. However, there are still core limitations concerning efficiency.
\end{document}
编辑要删除标题前的间距,请将几何形状更改为
\usepackage[margin=0.5in]{geometry}
平均能量损失
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[margin=0.5in]{geometry}
\usepackage{xcolor} % Add the xcolor package
\usepackage{biblatex} %Imports biblatex package
\addbibresource{papers.bib} %Import the bibliography file
\usepackage{hyperref}
\usepackage{titling}
\hypersetup{
colorlinks,
citecolor=green,
linkcolor=blue,
urlcolor=blue
}
\newcommand{\HRule}{\rule{\linewidth}{0.5mm}}
\newcommand{\Hrule}{\rule{\linewidth}{0.3mm}}
\makeatletter% since there's an at-sign (@) in the command name
\renewcommand{\@maketitle}{%
\parindent=0pt% don't indent paragraphs in the title block
\centering
\setlength{\droptitle}{-3cm}
{\Large \bfseries\textsc{\@title}}\par%
\textit{\@author \hfill \@date}\par%
\HRule%
% \par
}
\makeatother% resets the meaning of the at-sign (@)
\title{Statement of Purpose }
\author{\textcolor{blue}{ \textbf{Tim hammerberg \vspace{-2ex}}}}
\date{\textcolor{blue}{ \textbf{hammerberg.github.io}}}
\begin{document}
\maketitle% prints the title block
\vspace{0.8em}
Recent breakthroughs in natural language processing (NLP) have unlocked remarkable capabilities. However, there are still core limitations concerning efficiency.
\end{document}
输出