我正在写简历,使用 时出现间距问题longtable
。我注意到使用\justifying
而不是 可以\justify
在正文和标题之间提供更好的间距,但这似乎不适用于longtable
。我确实找到了另一个问题关于这个问题,但他们的答案确实解决了我的问题。也许我做错了,或者根本就不是那样?
\documentclass[a4paper,10.5pt]{article}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{garamondx}
\usepackage{ragged2e}
\usepackage{blindtext}
%tabular
\usepackage{longtable}
\ProvidesPackage{longtable}
[2004/02/01 v4.11 Multi-page Table package (DPC) + strut fix]
%reverse row count
\usepackage{adjustbox}
\newcounter{rowcount}
\setcounter{rowcount}{0}
\usepackage[framemethod=tikz]{mdframed}
\usepackage{array}
\usepackage{refcount}
\makeatletter
\newcommand{\fakelabel}[1]{%
\protected@xdef\@currentlabel{#1}%
}
\makeatother
\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{N}[2]{>{\raggedleft\refstepcounter{rowcount}\fakelabel{\therowcount}\makebox[3em][r]{\color{black}\the\numexpr\getrefnumber{#1}+1 - \value{rowcount}.)}\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#2}}
\begin{document}
\subsubsection*{Compendium}
{\setlength{\extrarowheight}{5pt}%
\begin{longtable}{ N{compendium}{1cm} L{15.5cm}}
& \justifying Etch Protocols for UW-Stout’s Plasma Reactor, Original Research, UW-Stout, Menomonie, WI. Advances in printed circuit board technology reduce footprint and increase computing power. A greater number of electrical connections between more layers of printed circuit board (PCB) creates complexity, particularly during plasma etching for circuits with high aspect ratios. This research has determined the effects of radio frequency, reactant ratios, and temperature on the etching of pre-impregnated epoxy resins using UW Stout's plasma reactors. Engineering concept design was incorporated to retrofit the plasma reactor to allow for three gases over two. Advanced Physics Capstone. Advisor: Dr. Marlann Patterson. Research, June 2016 – May 2017.
\tabularnewline
& \justifying Electro-Optical Composite Synthesis for Volume Holography, Assigned Research, UW-Stout, Menomonie, WI. Process improvement (development) of a nanostructure material capable of being synthesized utilizing at UW-Stout. Synthesis of the photorefractive polymer 2,5-dimethyl-4-(p-nitrophenylazo) benzyl ether required a revise synthesis and stoichiometric analysis to derive starting materials and quotients. The purpose of this project was for the student to dive into an unfamiliar concept and bring it as far as the semester allowed. Advisor: Dr. Marlann Patterson. Project, Spring 2017.
%\caption{Academics Table} % needs to go inside longtable environment
\label{tab:myfirstlongtable}
\end{longtable}
\ref{tab:myfirstlongtable}
\label{compendium}}
\end{document}
答案1
您的代码有几个问题。
- 例如,不使用
10.5pt
in line 。您可以使用,或...\documentclass[a4paper,10.5pt]{article}
10pt
11pt
12pt
当前版本
longtable
是longtable.sty 2014/10/28 v4.11 Multi-page Table package (DPC)
,所以你不需要你的线路\ProvidesPackage{longtable} %[2004/02/01 v4.11 Multi-page Table package (DPC) + strut fix]
在您的代码中。顺便说一句,您的序言中这一行是错误的。只需将其删除即可。
我使用包
showframe
来可视化打字区域和边距。我更改了表中第二列的长度,如下所示:
\begin{longtable}{ N{compendium}{1cm} L{10.5cm}} % L{15.5cm} <==========
为了使命令文本
\subsubsection*{Compendium}
和长表之间的距离更小,可以使用\vspace{-\baselineskip}
如下命令:\subsubsection*{Compendium} \vspace{-\baselineskip} % <=============================================
拥有完整的 MWE
\documentclass[%
a4paper,
% 10.5pt % <============================================================
]{article}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
%\usepackage{garamondx}
\usepackage{ragged2e}
\usepackage{blindtext}
\usepackage{showframe} % <==============================================
%tabular
\usepackage{longtable}
%\ProvidesPackage{longtable}
%[2004/02/01 v4.11 Multi-page Table package (DPC) + strut fix]
%reverse row count
\usepackage{adjustbox}
\newcounter{rowcount}
\setcounter{rowcount}{0}
\usepackage[framemethod=tikz]{mdframed}
\usepackage{array}
\usepackage{refcount}
\makeatletter
\newcommand{\fakelabel}[1]{%
\protected@xdef\@currentlabel{#1}%
}
\makeatother
\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{N}[2]{>{\raggedleft\refstepcounter{rowcount}\fakelabel{\therowcount}\makebox[3em][r]{\color{black}\the\numexpr\getrefnumber{#1}+1 - \value{rowcount}.)}\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#2}}
\begin{document}
\subsubsection*{Compendium}
\vspace{-\baselineskip} % <=============================================
{\setlength{\extrarowheight}{5pt}%
\begin{longtable}{ N{compendium}{1cm} L{10.5cm}} % L{15.5cm} <==========
& \justifying Etch Protocols for UW-Stout’s Plasma Reactor, Original
Research, UW-Stout, Menomonie, WI. Advances in printed circuit board
technology reduce footprint and increase computing power. A greater
number of electrical connections between more layers of printed
circuit board (PCB) creates complexity, particularly during plasma
etching for circuits with high aspect ratios. This research has
determined the effects of radio frequency, reactant ratios, and
temperature on the etching of pre-impregnated epoxy resins using UW
Stout's plasma reactors. Engineering concept design was incorporated
to retrofit the plasma reactor to allow for three gases over two.
Advanced Physics Capstone. Advisor: Dr. Marlann Patterson. Research,
June 2016 -– May 2017.
\tabularnewline
& \justifying Electro-Optical Composite Synthesis for Volume Holography, Assigned Research, UW-Stout, Menomonie, WI. Process improvement (development) of a nanostructure material capable of being synthesized utilizing at UW-Stout. Synthesis of the photorefractive polymer 2,5-dimethyl-4-(p-nitrophenylazo) benzyl ether required a revise synthesis and stoichiometric analysis to derive starting materials and quotients. The purpose of this project was for the student to dive into an unfamiliar concept and bring it as far as the semester allowed. Advisor: Dr. Marlann Patterson. Project, Spring 2017.
%\caption{Academics Table} % needs to go inside longtable environment
\label{tab:myfirstlongtable}
\end{longtable}
text \ref{tab:myfirstlongtable} text
\label{compendium}%
}
text \ref{tab:myfirstlongtable} text
text \ref{compendium} text
\end{document}
得到结果: