1

In the provided latex code snippet below, there is excessive vertical space between the Chinese name "张三" and the top margin. As a result, my resume now extends to the second page. I am curious about how I can reduce this space to ensure that my resume fits onto one page. Thank you!

%%%%%%%%%%%%%%%%%%%%%%%%%%%%  Random Stuff %%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[letterpaper,11pt]{article}

\usepackage[UTF8]{ctex}

\usepackage{latexsym} \usepackage[empty]{fullpage} \usepackage{titlesec} \usepackage{marvosym} \usepackage[usenames,dvipsnames]{color} \usepackage{verbatim} \usepackage{enumitem} \usepackage[hidelinks]{hyperref} \usepackage{fancyhdr} \usepackage[english]{babel} \usepackage{tabularx} \usepackage{fontawesome} \usepackage{multicol} \setlength{\multicolsep}{-3.0pt} \setlength{\columnsep}{-1pt} \pagestyle{fancy} \fancyhf{} % clear all header and footer fields \fancyfoot{} \renewcommand{\headrulewidth}{0pt} \renewcommand{\footrulewidth}{0pt} % Adjust margins \addtolength{\oddsidemargin}{-0.6in} \addtolength{\evensidemargin}{-0.5in} \addtolength{\textwidth}{1in} \addtolength{\topmargin}{-.5in} \addtolength{\textheight}{1in} \urlstyle{same} \raggedbottom \raggedright \setlength{\tabcolsep}{0in} % Sections formatting \titleformat{\section}{ \vspace{-5pt}\scshape\raggedright\large\bfseries }{}{0em}{}[\color{black}\titlerule \vspace{0pt}] % Ensure that generate pdf is machine readable/ATS parsable

%%%%%%%%%%%%%%%%%%%%%%%%%%%% Commands %%%%%%%%%%%%%%%%%%%%%%%%%%%% \newcommand{\resumeItem}[1]{ \item\small{ {#1 \vspace{-5pt}} } } \newcommand{\resumeSubheading}[4]{ \vspace{-3pt}\item \begin{tabular}{1.0\textwidth}[t]{l@{\extracolsep{\fill}}r} \textbf{#1} & \textbf{\small #2} \ \textit{\small#3} & \textit{\small #4} \ \end{tabular}\vspace{-8pt} } \newcommand{\resumeSubheadingContinue}[2]{ \vspace{-3pt} \begin{tabular}{1.0\textwidth}[t]{l@{\extracolsep{\fill}}r} \textit{\small#1} & \textit{\small #2} \ \end{tabular}\vspace{-8pt} } \newcommand{\resumeProjectHeading}[2]{ \vspace{-3pt}\item \begin{tabular}{1.0\textwidth}[t]{l@{\extracolsep{\fill}}r} \textbf{#1} & \textbf{\small #2} \ \end{tabular}\vspace{-8pt} } \newcommand{\resumeSubItem}[1]{\resumeItem{#1}\vspace{0pt}} \renewcommand\labelitemi{$\vcenter{\hbox{\tiny$\bullet$}}$} \renewcommand\labelitemii{$\vcenter{\hbox{\tiny$\bullet$}}$} \newcommand{\resumeSubHeadingListStart}{\begin{itemize}[leftmargin=0.0in, label={}]} \newcommand{\resumeSubHeadingListEnd}{\end{itemize}} \newcommand{\resumeItemListStart}{\begin{itemize}} \newcommand{\resumeItemListEnd}{\end{itemize}\vspace{0pt}}

%------------------------------------------- %%%%%% CV STARTS HERE %%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{document} \begin{center} % NAME {\huge 张三} % SUBHEADING \ \vspace{0.15cm} {\raisebox{-0.2\height}{\faPhone} {}} \vline ~ % EMAIL \href{}{\raisebox{-0.2\height}{\faEnvelope} \underline{}} \vline ~ % LINKEDIN \href{} {\raisebox{-0.2\height}\faLinkedin\ \underline{LinkedIn}} \vline ~ % GITHUB \href{}{\raisebox{-0.2\height}\faGithub\ \underline{GitHub}} \end{center}

MS-SPO
  • 11,519
  • 1
    Welcome. // Hm, where does your documkent end? This way it can't compile. Please add what's missing for this purpose. // Also, please remove packages, \newcommands etc. which are not needed to show your problem. Thank you // For some more guidance on MWEs you may want to have a look at https://tex.meta.stackexchange.com/a/10137/245790 and the surrounding answers. – MS-SPO Dec 17 '23 at 17:09
  • There is no need for \usepackage[empty]{fullpage} followed by \usepackage{fancyhdr} and then setting the headers/footers to be empty. fancyhdr is not needed, as the empty option with fullpage already sets \pagestyle{empty} (which seems to be what you're looking for). – Werner Dec 17 '23 at 17:39
  • size commands do not take an argument. \small{ just adds a space it doesn't limit the scope of \small – David Carlisle Dec 17 '23 at 19:36

1 Answers1

1

If you add the showframe package to your preamble, it will draw a frame around the text block that holds all of your text/CV. You'll note that the name is at the top of the frame, so for moving it up you have a couple of options:

  1. Adjust the top margin of your text block to be higher on the page (reduce the top margin.

    Instead of using the fullpage package with subsequent adjustments to margins, use geometry and set margin = 0.5in (say), and then tweak top as needed (for example, top=0.25in). If you follow this approach, also add \pagestyle{empty} to your preamble to remove any headers/footers.

    geometry also offers the showframe package option that draws a frame around the text block to showcase the margins. Now it should be easy to adjust the margins to suit your needs.

  2. Insert a negative vertical space before setting your title; this should push it up/above the text block top margin.

    For this use \vspace*{<negative length>}, as suggested here, since the space needs to be added (actually subtracted) at the top of the page.

Here is a minimal example showing option 1:

enter image description here

\documentclass{article}

\usepackage[margin = 0.25in,showframe]{geometry} \usepackage{fontawesome}

\begin{document}

\begin{center} % NAME {\huge Name}

\medskip

% SUBHEADING \faPhone ~ \vline ~ % EMAIL \faEnvelope ~ \vline ~ % LINKEDIN \faLinkedin\ \underline{LinkedIn} \vline ~ % GITHUB \faGithub\ \underline{GitHub} \end{center}

\end{document}

Werner
  • 603,163
  • Thanks for your response.

    It's still not working. I used the exact same packages/layouts for both of my Chinese and English resumes, but the top margin of the Chinese version is much higher than the English one. Even if it draws a frame that you said, it still extends to the second page by at least 1/3 of the page (two sections).

    Changing the top margin doesn't really do anything and sometimes half a page just disappears if the value is large.

    If you don't mind, I can send you both resumes with tex files (without meaning texts) by email and take a look from there. Thanks in advance!

    – HackBear Dec 18 '23 at 13:18
  • @Louis: Paste each to PasteBin.com. Remember, I may not have the fonts that you have, so provide code that doesn't rely on local changes (like fonts) yet still reproduces the issue. I can't see how the exact same code would produce different layouts. – Werner Dec 18 '23 at 17:44