I want to align Some text
with Lead Programmer
like this:
But the leftrulebox
(a tcolorbox
) inside the description environment doesn't align properly. The following code gives this:
The code:
\documentclass{article}
\usepackage[left=60pt,top=60pt,right=60pt,bottom=60pt]{geometry}
\usepackage{kantlipsum}
\usepackage{xcolor}
\usepackage{enumitem}
\setitemize{nolistsep,labelsep=1ex,leftmargin=*}
%% colors---
\definecolor{lightgray}{gray}{0.8}
%%items--
\newlist{items}{description}{1}
\setlist[items]{align=right,font=\normalfont, leftmargin=1.8in,style=nextline,labelsep=1em,}
%% leftrulebox---
\usepackage[many]{tcolorbox}
\tcbuselibrary{skins,breakable}
\newtcolorbox{leftrulebox}{
colback=white,
left=0.5ex,
top=0pt,
arc=0pt,
outer arc=0pt,
leftrule=1pt,
rightrule=0pt,
toprule=0pt,
bottomrule=0pt,
breakable,
enhanced jigsaw
}
%
%
\begin{document}
\begin{items}
\item[Some text]%
\begin{leftrulebox}
\par
\textbf{Lead Programmer}, Social Networks Inc \par
Some text \par some text
\begin{itemize}
\item Reengineered multiple systems that fueled improvements to productivity, eficiency, uptime and accuracy for global business operations. Developed code, system design and test/QA plans for all solutions and often coordinated the national or international rollout.
\item Led, architected and participated in the design, testing and deployment of client/server, multi-tier applications, ActiveX and related components.
\item Developed new procedures for requirements gathering, needs analysis, testing, scripting and documentation to strengthen quality and functionality of business-critical applications.
\end{itemize}
\kant[1-5]
\end{leftrulebox}
\end{items}
\end{document}
Question
- What causes this downward shift of
Some text
? - How to align
Some text
withLead Programmer...
Caveat
- I can't use any form of
tabular
(includinglongtable
) as I need the rule to continue at a page break.longtable
too won't break across pages inside a row.
Edit:
As noted by Gonzalo, using \leavevmode
and some negative vskip
works for same kind of contents in the box. But for the code below, I had to give different vskip
s for different boxes:
\documentclass{article}
\usepackage[left=60pt,top=60pt,right=60pt,bottom=60pt]{geometry}
\usepackage{xcolor}
\usepackage{enumitem}
\setitemize{nolistsep,labelsep=1ex,leftmargin=*}
%% colors---
\definecolor{lightgray}{gray}{0.8}
%%items--
\newlist{items}{description}{1}
\setlist[items]{align=right,font=\normalfont, leftmargin=1.8in,style=nextline,labelsep=1em,}
%% leftrulebox---
\usepackage[many]{tcolorbox}
\tcbuselibrary{skins,breakable}
\newtcolorbox{leftrulebox}{
colback=white,
left=0.5ex,
top=0pt,
arc=0pt,
outer arc=0pt,
leftrule=1pt,
rightrule=0pt,
toprule=0pt,
bottomrule=0pt,
breakable,
nobeforeafter,
enhanced jigsaw,
before=\vskip-16.5pt %% I want to define this here globally
}
%
%
\begin{document}
\section*{Objective}
\begin{items}
\item[Objective]%
\leavevmode
\begin{leftrulebox}
\kant[1]
\end{leftrulebox}
\end{items}
\section*{Positions}
\begin{items}
\item[\raggedleft 1/2010 -- 2/2012]%
\leavevmode
\begin{leftrulebox}
\textbf{Lead Programmer}, Social Networks Inc \par
Some text \par some text\par
\begin{itemize}%[labelsep=1ex]
\item Reengineered multiple systems that fueled improvements to productivity, eficiency, uptime and accuracy for global business operations. Developed code, system design and test/QA plans for all solutions and often coordinated the national or international rollout.
\item Led, architected and participated in the design, testing and deployment of client/server, multi-tier applications, ActiveX and related components.
\item Developed new procedures for requirements gathering, needs analysis, testing, scripting and documentation to strengthen quality and functionality of business-critical applications.
\end{itemize}
\end{leftrulebox}
\end{items}
\begin{items}
\item[1/2009 -- 2/2010]%
\leavevmode
\begin{leftrulebox}
\textbf{Programmer I}, The Coolest Search Engine \par
\begin{itemize}%[labelsep=1ex]
\item Led solutions engineering that involved process automation, macro conversion and functionality enhancement. Replaced time-consuming, error prone manual processes with elegant, automated solutions.
\item Developed and implemented cross-platform, Java-based POS system. Completed project under budget and three weeks ahead of deadline.
\item Coded new solutions that increased availability and scalability by 45\% and 75\%, respectively.
\end{itemize}
\end{leftrulebox}
\end{items}
\section*{Skills}
\begin{items}
\item[\textbf{Systems}]%
\leavevmode
\begin{leftrulebox}
\kant[1-2]
\end{leftrulebox}
\end{items}
\begin{items}
\item[\textbf{Others}]%
\leavevmode
\begin{leftrulebox}
some short text here
\end{leftrulebox}
\end{items}
\begin{items}
\item[\textbf{Databases}]%
\leavevmode
\begin{leftrulebox}
some short text here
\end{leftrulebox}
\end{items}
\end{document}
The alignment of items under Objective and Positions are satisfactory while with Systems, Others and Databases it is not. This happens because I have given a global vskip
(which I want to give).
The amount by which the boxes move vertically depends on the content (AAArgh) and I can't define a global vskip
.
Since, unfortunately, this script will be used in an automatic way where, I don't have control over the content, I can't determine the amount of vskip
for different items. Hence, I can't define it globally. How to over come this?