我正在尝试写一份简历。我以前没有使用过 Latex。
这是我编写的 .cls 文件:
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{Arpon_cv}[2018/09/28 Arpon's custom CV class]
\LoadClass{article}
\RequirePackage{titlesec}
\newcommand{\datedsection}[2]{%
\section[#1]{#1 \hfill #2}%
}
\titleformat{\section}
{\Large\scshape\raggedright\ttfamily}
{}{0em}
{}
[\titlerule]
\newcommand{\datedsubsection}[2]{%
\subsection[#1]{#1 \hfill #2}%
}
\titleformat{\subsection}
{\large\scshape\raggedright\ttfamily}
{}{0em}
{}
\newcommand{\vugichugi}[2]{%
\subsubsection[#1]{#1 \hfill #2}%
}
\titleformat{\subsubsection}
{\normalsize\scshape\raggedright\ttfamily}
{}{0em}
{}
这是我的 .tex 文件:
\documentclass{Arpon_cv}
\begin{document}
\datedsection{Education}{}
\datedsubsection{Bachelor of Science}{2015-Now}
\vugichugi{University of Dhaka, Dhaka, Bangladesh}{}
\vugichugi{Current CGPA (Up to 6th Semester): 3.72}{}
\datedsubsection{Higher Secondary Certificate}{2014}
\vugichugi{St. Joseph Higher Secondary School, Dhaka, Bangladesh}{}
\vugichugi{GPA: 5.00 out of 5.00}{}
\datedsubsection{Secondary School Certificate}{2012}
\vugichugi{St. Joseph Higher Secondary School, Dhaka, Bangladesh}{}
\vugichugi{GPA: 5.00 out of 5.00}{}
\datedsection{Standardized Tests}{}
\datedsubsection{Graduate Record Examination (GRE)}{2018}
\vugichugi{Total- 329. Quantitative Reasoning: 170, Verbal Reasoning: 159 Analytical Writing Analysis: 5.0}{}
\datedsubsection{Test Of English as a Foreign Language (TOEFL)}{2018}
\vugichugi{Total: 111. Reading: 29, Listening: 29, Speaking: 27, Writing: 26}{}
\datedsection{Research Interests}{}
\datedsection{Research Experience}{}
\datedsubsection{Undergraduate Thesis}{Sept 2018-Now}
\vugichugi{Title: Computer code development for steady-state neutronics analysis of a novel reactor core.}{}
\vugichugi{Description: I am currently working on developing a computer code to numerically approximate the steady-state neutronics of a novel reactor core.}{}
\datedsubsection{Undergraduate Project}{Sept 2017-March 2018}
\vugichugi{Title: Demonstration of axial neutron flux distribution in a hypothetical reactor core employing control pellets (control material in pellet form).}{}
\vugichugi{Description: I demonstrated an evenly balanced axial flux distribution that can be generated if hypothetical control pellets (control material in pellet form) are used instead of regular single-piece control rods. Regular control rods generate uneven axial flux distribution when partially inserted.}{}
\datedsection{Industrial Attachment}{}
\datedsubsection{Institute of Electronics}{March 2018-April 2018}
\vugichugi{Atomic Energy Research Establishment (AERE), Savar, Dhaka, Bangladesh.}{}
\vugichugi{A facility of Bangladesh Atomic Energy Commission (BAEC)}{}
\datedsection{Prizes, Awards and Grants}{}
\datedsubsection{}{}
\datedsection{Work Experience}{}
\datedsubsection{Administrative Experience}{??}
\datedsubsection{Teaching Experience}{??}
\datedsection{Volunteer Work}{}
\datedsection{Computer and Programming Skills}{}
\end{document}
当我编译.tex 文件时,输出 pdf 的第一页是空白的。 “教育”标题从第二页开始。“工业实习”部分以下的内容均未打印。此后的所有部分均已丢失。 我在这里做错了什么?
答案1
我不会根据各种分段命令来定义您的简历/履历的各个部分。我只会创建您想要的内容划痕。分段命令中有很多您实际上不需要的内容,其中一部分就是给您带来问题的原因。
我已将您的三个主要命令重新定义如下:
\newcommand\datedsection[2]{%%
\addvspace{3ex}%%
\noindent\makebox[0pt][l]{\rule[-2pt]{\textwidth}{0.4pt}}%%
{\Large\scshape\ttfamily#1\hspace{\fill}#2}\par\addvspace{2ex}
}
\newcommand\datedsubsection[2]{%%
\addvspace{1ex}%%
\noindent{\large\scshape\ttfamily#1\hspace{\fill}#2}\par\addvspace{1ex}}
\newcommand\vugichugi[2]{%%
\noindent{\normalsize\scshape\ttfamily#1\hspace{\fill}#2}\par}
输出结果如下:
它与您的输出并不完全相同,但非常相似。
使用\addvspace
具有令人愉悦的效果,它仅插入所添加的多个垂直空间中的最大空间。
我建议定义某种标题和描述命令。类似这样的命令:
\makeatletter
\def\ae@title{\ttfamily\scshape Title:}%%
\newlength\ae@title@width
\newcommand\mytitle[1]{%%
%% set the length here in case there are formatting commands
%% that might effect the appearance of the 'TITLE'
\settowidth\ae@title@width{\ae@title}%% comment to avoid unwanted whitespace
\noindent
{\ae@title}%%
\hspace{\fill}%%
%% set width of parbox to remaining space on line minus `1em` of
%% space between title and the parbox itself
\parbox[t]{\dimexpr\columnwidth-\ae@title@width-1em}%%
{\raggedright\textit{#1}%%
%% calculate the proper depth of the box
\par\xdef\tpd{\the\prevdepth}}%%
\par%% switch to vmode to allow `\addvspace to do its magic
\addvspace{1ex}%%
\prevdepth\tpd}%% measure the depth to get interline spacing more properly adjusted
\newcommand\mydescription[1]{%%
\ttfamily{\scshape Description:} #1\par\addvspace{1ex}}
\makeatother
产生以下效果:
我在这里做的几件事可能会引起人们的兴趣。首先,\columnwidth
不一定\textwidth
是相同的。总的来说,我觉得\columnwidth
觉得更安全例如,如果您的文档可能有多个列。请注意,我确实使用了\textwidth
节标题\datedsection
。
接下来,我使用 来\parbox
获得一种特殊的效果来展示标题。您可能会喜欢或不喜欢这种风格。但是,如果您想保留它,那么了解发生了什么很有用\prevdepth
。本质上,我是纠正LaTeX 如何考虑minipage
或的深度\parbox
的深度。请参阅 egreg 对如何在使用 minipages (或 \parboxes) 时保持恒定的 baselineskip?这很好地解释了我正在使用的这个技巧。
最后,我不太确定用这么多大写字母来打击读者是否明智。