![为什么小页面在左侧缩进?](https://linux22.com/image/281882/%E4%B8%BA%E4%BB%80%E4%B9%88%E5%B0%8F%E9%A1%B5%E9%9D%A2%E5%9C%A8%E5%B7%A6%E4%BE%A7%E7%BC%A9%E8%BF%9B%EF%BC%9F.png)
我正在尝试创建一份简历,对于标题信息,我使用一个小页面来显示我的姓名和履历,其中包含我的联系信息的较小文本。
代码运行良好,但我不明白为什么小页面的左边缘比其下方的部分标题和文本缩进得更远。
任何想法和帮助都将非常感激。
以下是代码:
%-------------------------------------------------------------------
% PACKAGES AND OTHER DOCUMENT CONFIGURATIONS
%-------------------------------------------------------------------
\documentclass[10pt]{article}
\usepackage{array, xcolor, lipsum, bibentry}
\usepackage[
paper=letterpaper,
includefoot, % Uncomment to put page number above margin
marginparwidth=1in, % Length of section titles
marginparsep=.05in, % Space between titles and text
margin=1in, % 1 inch margins
]{geometry}
\usepackage{showframe}
% Shrink spacing around section headings
\usepackage{titlesec}
\titleformat*{\section}{\large\bfseries}
\titlespacing\section{0pt}{12pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}
% Break tables across pages
\usepackage{supertabular}
% Set column sizes and color
\definecolor{lightgray}{gray}{0.8}
\newcolumntype{L}{>{\raggedleft}p{0.1225\textwidth}}
\newcolumntype{R}{p{0.81\textwidth}}
\newcolumntype{X}{>{\raggedleft}p{0.05\textwidth}}
\newcolumntype{Y}{p{0.9\textwidth}}
% Commands to simplify starting a table
\newcommand\VRule{\color{lightgray}\vrule width 0.5pt}
\newcommand\smalltab{\begin{supertabular}{L!{\VRule}R}}
\newcommand\medtab{\begin{supertabular}{X!{\VRule}Y}}
\newcommand\longtab{\begin{supertabular}{L!{\VRule}R}}
\begin{document}
%-------------------------------------------------------------------
% NAME AND CONTACT INFO
%-------------------------------------------------------------------
\begin{minipage}[b]{0.65\textwidth}
\begin{flushleft}
\Huge{\textsc{Here is my name\\}}
\Large{Curriculum Vitae}
\end{flushleft}
\end{minipage}
\begin{minipage}[b]{0.35\textwidth}
\small{Street Address\\
City, State 12345\\
[email protected]\\
www.website.com\\
1-555-555-5551}
\end{minipage}
%-------------------------------------------------------------------
% EDUCATION
%-------------------------------------------------------------------
\section*{Education}
\smalltab
2011--present & PhD in Stuff, Very Awesome School.\\[2.5pt]
2009--2011 & Masters in Stuff, Just OK School.\\[2.5pt]
2004--2008 & Bachelors in Things, Relatively Awesome School.\\
\end{supertabular}
\end{document}
答案1
我认为这可以避免这个问题:
%-------------------------------------------------------------------
% PACKAGES AND OTHER DOCUMENT CONFIGURATIONS
%-------------------------------------------------------------------
\documentclass[10pt]{article}
\usepackage{array, xcolor, lipsum, bibentry}
\usepackage[
paper=letterpaper,
includefoot, % Uncomment to put page number above margin
marginparwidth=1in, % Length of section titles
marginparsep=.05in, % Space between titles and text
margin=1in, % 1 inch margins
]{geometry}
\usepackage{showframe}
% Shrink spacing around section headings
\usepackage{titlesec}
\titleformat*{\section}{\large\bfseries}
\titlespacing\section{0pt}{12pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}
% Break tables across pages
\usepackage{supertabular}
% Set column sizes and color
\definecolor{lightgray}{gray}{0.8}
\newcolumntype{L}{>{\raggedleft}p{0.1225\textwidth}}
\newcolumntype{R}{p{0.81\textwidth}}
\newcolumntype{X}{>{\raggedleft}p{0.05\textwidth}}
\newcolumntype{Y}{p{0.9\textwidth}}
% Commands to simplify starting a table
\newcommand\VRule{\color{lightgray}\vrule width 0.5pt}
\newcommand\smalltab{\begin{supertabular}{L!{\VRule}R}}
\newcommand\medtab{\begin{supertabular}{X!{\VRule}Y}}
\newcommand\longtab{\begin{supertabular}{L!{\VRule}R}}
\begin{document}
%-------------------------------------------------------------------
% NAME AND CONTACT INFO
%-------------------------------------------------------------------
\hspace*{-\parindent}%
\begin{minipage}[b]{0.65\textwidth}
\begin{flushleft}
\Huge{\textsc{Here is my name\\}}
\Large{Curriculum Vitae}
\end{flushleft}
\end{minipage}%
\begin{minipage}[b]{0.35\textwidth}
\small{Street Address\\
City, State 12345\\
[email protected]\\
www.website.com\\
1-555-555-5551}
\end{minipage}
%-------------------------------------------------------------------
% EDUCATION
%-------------------------------------------------------------------
\section*{Education}
\smalltab
2011--present & PhD in Stuff, Very Awesome School.\\[2.5pt]
2009--2011 & Masters in Stuff, Just OK School.\\[2.5pt]
2004--2008 & Bachelors in Things, Relatively Awesome School.\\
\end{supertabular}
\end{document}
基本上,TeX 将第一个小页面视为段落的开头,并相应地缩进。放入与段落缩进相等的负空间可以解决问题: