如何修改 deedy-resume 以獲得左刷新標題?

如何修改 deedy-resume 以獲得左刷新標題?

我想稍微修改一下deedy-resume。基本版本的標題居中

\newcommand{\namesection}[3]{
    \centering{
        \sffamily
        \fontspec{Helvetica Neue UltraLight}\fontsize{40pt}{10cm}\selectfont #1 
        \fontspec{Helvetica Neue Light}\selectfont #2
    } \\
    \vspace{5pt}
    \centering{ \color{headings}\fontspec{Heiti TC Medium}\fontsize{11pt}{14pt}\selectfont #3}
    \noindent\makebox[\linewidth]{\rule{\paperwidth}{0.4pt}}
    \vspace{-15pt}
}

當我剛剛刪除 \centering 時,排版工作正常,但輸出看起來很奇怪(基本上低於規則的所有內容都沒有顯示在 pdf 輸出中)。所以我嘗試了左齊平

\newcommand{\namesection}[3]{
    \begin{flushleft}
        \sffamily
        \fontspec{Helvetica Neue UltraLight}\fontsize{40pt}{10cm}\selectfont #1 
        \fontspec{Helvetica Neue Light}\selectfont #2

    \vspace{5pt}
    \color{headings}\fontspec{Heiti TC Medium}\fontsize{11pt}{14pt}\selectfont #3
    \end{flushleft}
    \noindent\makebox[\linewidth]{\rule{\paperwidth}{0.4pt}}
    \vspace{-15pt}
}

在某種程度上它是有效的,但現在文件中文字方塊的對齊方式已關閉(標題向左移動太多) 在此輸入影像描述

如何對齊文字?或者我如何正確“取消”標題居中?

TeX 檔案的 MWE(下面的 cls 檔案):

\documentclass[]{deedy-resume}
\usepackage{fancyhdr}

\pagestyle{fancy}
\fancyhf{}

\rfoot{Page \thepage \hspace{1pt}}
\begin{document}

\namesection{Debarghya}{Das}{ \urlstyle{same}\href{http://debarghyadas.com}{debarghyadas.com}| \href{http://fb.co/dd}{fb.co/dd}\\
\href{mailto:[email protected]}{[email protected]} | 607.379.5733 | \href{mailto:[email protected]}{[email protected]}
}

\begin{minipage}[t]{0.33\textwidth} 

\section{Skills}
\subsection{Programming}
\location{Over 5000 lines:}
Java \textbullet{}   Shell \textbullet{} Python \textbullet{} Javascript \\
OCaml \textbullet{} Matlab \textbullet{} Rails \textbullet{} \LaTeX\ \\ 
\location{Over 1000 lines:}
C \textbullet{} C++ \textbullet{} CSS \textbullet{} PHP \textbullet{} Assembly \\
\location{Familiar:}
AS3 \textbullet{} iOS \textbullet{} Android \textbullet{} MySQL
\sectionsep

\end{minipage} 
\hfill
\begin{minipage}[t]{0.66\textwidth} 

\section{Experience}
\runsubsection{Facebook}
\descript{| Software Engineer }
\location{Jan 2015 - Present | New York, NY}
\sectionsep


\end{minipage} 
\end{document}

這是對應的 cls 檔:

% Intro Options
\ProvidesClass{deedy-resume}[2014/04/30 CV class]
\NeedsTeXFormat{LaTeX2e}
\DeclareOption{print}{\def\@cv@print{}}
\DeclareOption*{
  \PassOptionsToClass{\CurrentOption}{article}%
}
\ProcessOptions\relax
\LoadClass{article}

% Package Imports
\usepackage[hmargin=1.25cm, vmargin=0.7cm]{geometry}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage[hidelinks]{hyperref}
\usepackage{titlesec}
\usepackage[absolute]{textpos}
\usepackage[UKenglish]{babel}
\usepackage[UKenglish]{isodate}
\usepackage{fontspec,xltxtra,xunicode}

% Cite publications
\usepackage{cite}
\renewcommand\refname{\vskip -1.5cm}

% Color definitions
%\definecolor{date}{HTML}{666666} 
%\definecolor{primary}{HTML}{2b2b2b} 
%\definecolor{headings}{HTML}{6A6A6A}
%\definecolor{subheadings}{HTML}{333333}
\definecolor{primary}{HTML}{000000} 
\definecolor{headings}{HTML}{000000} 
\definecolor{subheadings}{HTML}{000000}
\definecolor{date}{HTML}{000000}


% Set main fonts
\defaultfontfeatures{Mapping=tex-text}
\setmainfont[Color=primary]{Helvetica Light}
\setsansfont[Scale=MatchLowercase,Mapping=tex-text]{Helvetica Neue UltraLight}

% Date command
\setlength{\TPHorizModule}{1mm}
\setlength{\TPVertModule}{1mm}
\textblockorigin{0mm}{5mm} % start everyth
\newcommand{\lastupdated}{\begin{textblock}{60}(155,0)
\color{date}\fontspec{Helvetica Neue Light}\fontsize{8pt}{10pt}\selectfont 
Last Updated on
\today
\end{textblock}}

\newcommand{\leftdetails}[1]{\begin{textblock}{60}(170,5)
\color{date}\fontspec{Helvetica Neue Light}\fontsize{8pt}{10pt}\selectfont 
#1
\end{textblock}}


% Name command
\newcommand{\namesection}[3]{
    \begin{flushleft}
    %\centering{
        \sffamily
        \fontspec{Helvetica Neue UltraLight}\fontsize{40pt}{10cm}\selectfont #1 
        \fontspec{Helvetica Neue Light}\selectfont #2
    %} \\

    \vspace{5pt}
    %\centering{ \color{headings}\fontspec{Heiti TC Medium}\fontsize{11pt}{14pt}\selectfont #3}
    \color{headings}\fontspec{Heiti TC Medium}\fontsize{11pt}{14pt}\selectfont #3
    \end{flushleft}
    \noindent\makebox[\linewidth]{\rule{\paperwidth}{0.4pt}}
    \vspace{-15pt}
}
\titlespacing{\section}{0pt}{0pt}{0pt}

% Headings command
\titleformat{\section}{\color{headings}
\scshape\fontspec{Helvetica Light}\fontsize{16pt}{24pt}\selectfont \raggedright\uppercase}{} {0em}{}

% Subeadings command
\titleformat{\subsection}{\color{subheadings}
\fontspec{Helvetica}\fontsize{12pt}{12pt}\selectfont\bfseries\uppercase}{}{0em}{}
\titlespacing{\subsection}{0pt}{\parskip}{-\parskip}
\titlespacing{\subsubsection}{0pt}{\parskip}{-\parskip}
\newcommand{\runsubsection}[1]{\color{subheadings}
\fontspec{Helvetica}\fontsize{12pt}{12pt}\selectfont\bfseries\uppercase {#1} \normalfont}

% Descriptors command
\newcommand{\descript}[1]{\color{subheadings}\raggedright\scshape\fontspec{Heiti SC Medium}\fontsize{11pt}{13pt}\selectfont {#1 \\} \normalfont}

% Location command
\newcommand{\location}[1]{\color{headings}\raggedright\scshape\fontspec{Heiti TC Medium}\fontsize{10pt}{12pt}\selectfont {#1\\} \normalfont}

% Section seperators command
\newcommand{\sectionsep}[0]{\vspace{8pt}}

% Bullet Lists with fewer gaps command
\newenvironment{tightemize}{\vspace{-\topsep}\begin{itemize}\itemsep1pt \parskip0pt \parsep0pt}{\end{itemize}\vspace{-\topsep}}

所有文字檔案均取自Deedy-履歷表 GitHub 頁面

答案1

我認為將定義中所有出現的 替換\centering為就足以實現您想要的效果。\raggedright\namesection

由於您使用的是文件的修改版本,因此您可以在此處進行替換或在文件的序言中.cls進行替換。\renewcommand

相關內容