我正在从头开始设计自己的简历模板。我想将文本分成两列,如下所示:
到目前为止我尝试通过以下方式实现:
\documentclass[letterpaper, 13pt]{article}
\usepackage{hyperref}
\usepackage[margin=0.4in,footskip= 3 in]{geometry}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{titling}
\pagenumbering{gobble}
\date{\vspace{0ex}}
\usepackage{cite}
\usepackage{hyperref}
\usepackage{parskip}
\usepackage{multicol}
\usepackage{ragged2e}
\usepackage{lipsum}
\setcounter{secnumdepth}{0}
\setlength{\droptitle}{-4.5em} % con esto se mueve el titulo
\title{\textbf{{\fontsize{60}{70}\selectfont John Doe}}}
\begin{document}
\begin{multicols}{2}
\maketitle
\section{A Section}
\lipsum[1]
\end{multicols}
\end{document}
但是,它不起作用。因为我得到了这个输出:
如何从标题空间中删除文本,并将其分成两列?
答案1
\maketitle
只需向前移动即可multicol
。
请参阅以下 MWE(请参阅我移至hyperref
最后调用的包):
\documentclass[letterpaper, 13pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[margin=0.4in,footskip= 3 in]{geometry}
\usepackage{titling}
\pagenumbering{gobble}
\date{\vspace{0ex}}
\usepackage{cite}
\usepackage{parskip}
\usepackage{multicol}
\usepackage{ragged2e}
\usepackage{lipsum}
\usepackage{hyperref}
\setcounter{secnumdepth}{0}
\setlength{\droptitle}{-4.5em} % con esto se mueve el titulo
\title{\textbf{{\fontsize{60}{70}\selectfont John Doe}}}
\begin{document}
\maketitle % <==========================================================
\begin{multicols}{2}
%\maketitle % <=========================================================
\section{A Section}
\lipsum[1]
\end{multicols}
\end{document}
结果:
要使名称从左侧开始,您需要删除命令中的居中\@maketitle
:
\makeatletter
\def\@maketitle{%
\newpage
\null
\vskip 2em%
% \begin{center}% <=====================================================
\let \footnote \thanks
{\LARGE \@title \par}%
\vskip 1.5em%
{\large
\lineskip .5em%
\begin{tabular}[t]{c}%
\@author
\end{tabular}\par}%
\vskip 1em%
{\large \@date}%
% \end{center}% <=======================================================
\par
\vskip 1.5em}
\makeatother
将此代码添加到序言中(\makeatother
并且\makeatletter
是命令中需要的@
):
\documentclass[letterpaper, 13pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[margin=0.4in,footskip= 3 in]{geometry}
\usepackage{titling}
\pagenumbering{gobble}
\date{\vspace{0ex}}
\usepackage{cite}
\usepackage{parskip}
\usepackage{multicol}
\usepackage{ragged2e}
\usepackage{lipsum}
\usepackage{hyperref}
\setcounter{secnumdepth}{0}
\setlength{\droptitle}{-4.5em} % con esto se mueve el titulo
\title{\textbf{{\fontsize{60}{70}\selectfont John Doe John Doe John Doe}}}
\makeatletter
\def\@maketitle{%
\newpage
\null
\vskip 2em%
% \begin{center}% <=====================================================
\let \footnote \thanks
{\LARGE \@title \par}%
\vskip 1.5em%
{\large
\lineskip .5em%
\begin{tabular}[t]{c}%
\@author
\end{tabular}\par}%
\vskip 1em%
{\large \@date}%
% \end{center}% <=======================================================
\par
\vskip 1.5em}
\makeatother
\begin{document}
\maketitle % <==========================================================
\begin{multicols}{2}
%\maketitle % <=========================================================
\section{A Section}
\lipsum[1]
\end{multicols}
\end{document}
结果如下: