5

I am working on converting some old documents at work into LaTeX. I realize that some of the things I need to do do not conform to the LaTeX typesetting standards but that is where I am. I have most of the text formatting handled but as a part of our on the job training documents there are boxes for trainers to "sign off" on training. Attempting to replicate these has been a major headache. Any help would be appreciated.

Here is an image of the OJT

I have tried several different packages and none have done exactly what I need.

\documentclass{article} \renewcommand\thepart{\arabic{part}:} \usepackage{titlesec} \titleformat{\part}[block]{\centering\bfseries\huge}{Part \thepart}{10pt}{}[\setcounter{section}{0}] \usepackage{enumitem} \setitemize[0]{itemindent=2.5cm} %Item Prefix - \so signoff \newcommand{\so}{\item[\underline{\hspace{0.85cm}}]} \usepackage{lipsum} \begin{document} \part{Personnel Introduction} \lipsum[1] \section{Division Personnel} \subsection{Headquarters} You have had the opportunity to be introduced to Headquarters personnel, including: \begin{itemize} \so Name Name \so Name Name \end{itemize} \subsection{Production Department} You have had the opportunity to be introduced to some Production personnel, including: \begin{itemize} \so Name Name GROUP \#1 \so Name Name \so Name Name \so Name Name GROUP \#2 \so Name Name \so Name Name \end{itemize} \end{document} 

My code far. I have seen something like below but it obviously doesn't work.

\newcommand{\trainer}{ \fbox{ \resizebox{3cm}{2cm}{ \rule{2.75cm}{.4pt} Trainer\hspace{.7cm}Date } } } \begin{document} \part{Personnel Introduction} \lipsum[1] \section{Division Personnel} \trainer\subsection{Headquarters} You have had the opportunity to be introduced to Headquarters personnel, including: \begin{itemize} \so Name Name \so Name Name \end{itemize} \subsection{Production Department} You have had the opportunity to be introduced to some Production personnel, including: \begin{itemize} \so Name Name GROUP \#1 \so Name Name \so Name Name \so Name Name GROUP \#2 \so Name Name \so Name Name \end{itemize} \end{document} 

Thanks in advance

1

2 Answers 2

5

Here's some option:

\documentclass[a4paper]{article} \usepackage[explicit,pagestyles]{titlesec} \usepackage{enumitem} \usepackage{changepage} \usepackage{lastpage} \usepackage{lipsum}% just to generate text for the example \newlength\TIndent \setlength\TIndent{3cm} \makeatletter \@addtoreset{section}{part} \makeatother \renewcommand\thepart{\arabic{part}} \renewcommand\thesection{\thepart.\arabic{section}} \renewcommand\thesubsection{\arabic{subsection}} \newcommand\TBox{% \fbox{\footnotesize% \begin{tabular}{cc} \\[1.3ex] \hline \\[-1.7ex] Trainee & Date \end{tabular}}% } \titleformat{\part}[block] {\normalfont\LARGE\bfseries\filcenter}{\partname\ \thepart:}{0.5em}{#1} \titleformat{\section} {\normalfont\Large\bfseries}{}{\TIndent}{\llap{\makebox[0.5\TIndent][l]{\thesection}\hfill}#1} \titleformat{\subsection} {\normalfont\large\bfseries}{}{0em}{\llap{\smash{\makebox[\TIndent][l]{\normalfont\TBox}}}\thesubsection. #1} \titlespacing*{\section} {0pt}{3.5ex plus 1ex minus .2ex}{.3ex plus .2ex} \newlist{Titemize}{itemize}{1} \setlist[Titemize]{label={\rule{1cm}{0.4pt}},leftmargin=*} \newpagestyle{Tstyle}{ \headrule\footrule \sethead{Left}{Center}{Right} \setfoot{\small 7.1.2013}{\small Introductory Training}{\small Page~\thepage of~\pageref{LastPage}} } \pagestyle{Tstyle} \newcommand\Text{% just to generate text for the example Nam dui ligula, fringilla a, euismod sodales, sollicitudin vel, wisi. Morbi auctor lorem non justo.} \begin{document} \part{Personnel Introduction} \lipsum[4] \section{Division Personnel} \begin{adjustwidth}{3cm}{0pt} \leavevmode\subsection{Headquarters} \begin{Titemize} \item \Text \item \Text \item \Text \end{Titemize} \subsection{Production Department} \begin{Titemize} \item \Text \item \Text \item \Text \item \Text \item \Text \end{Titemize} \end{adjustwidth} \end{document} 

enter image description here

Packages used:

titlesec to customize the sectional unit headings, and to define the page style (thorough the pagestyles option).

changepage to change the indentation inside sections.

enumitem to define a list with horizontal rules as labels.

laspage to have acces to the last page number for the footer.

3
  • Thanks for the quick response! This is exactly what I need. Commented Jul 24, 2013 at 3:34
  • I have found that the titlesec \titleformat{\section} is breaking my table of contents. Any tips on that? Commented Jul 24, 2013 at 19:53
  • @Beaunus move the \titleformat{\section}.... part after the table of contents. Commented Jul 24, 2013 at 20:06
0

While I know you've already accepted a solution, here's a different approach.

I generally follow what @GonzaloMedina did with regard to defining \part and \section. But I took a very different approach with the remainder. Instead of working with a redefinition of \subsection, I decided to create two list environments that could be nested within each other. The primary reason to consider this approach is that you may actually have some other use for \subsection in your document that you don't want to tinker with.

Here's a MWE:

which produces

\documentclass{article} %% create the trainee signature and date box \newsavebox{\traineesignaturebox} \savebox{\traineesignaturebox} {\setlength{\fboxsep}{0pt}% \renewcommand{\arraystretch}{1.25}% \fbox{% \begin{tabular}{cc} \rule{0pt}{3ex}\\\hline Trainee & Date \end{tabular}}} %% you don't want this box interfering with and width, hence %% the use of `\llap`. Also, you don't want it interfering %% with vertical spacing, hence `\smash`. \newcommand{\traineesignature}{\llap{\smash{\usebox{\traineesignaturebox}}}} %% Instead of redefining subsection (since you might want those for %% another purpose in your document, create two lists to be nest. %%----------------------------------------------------------------- %% Here we create various lengths for structuring the outer most list. %% These lengths are probably not necessary. But, originally, I thought %% you might want access to their values from within the inner list. \newlength{\checklistlabelsep} \newlength{\checklistlabelwidth} \newlength{\checklistitemindent} \newlength{\checklistleftmargin} %% setting the lengths \setlength{\checklistlabelsep}{1em} \setlength{\checklistitemindent}{2em} \setlength{\checklistlabelwidth}{2em} \setlength{\checklistleftmargin} {\dimexpr\checklistitemindent +\checklistlabelwidth -\checklistlabelsep +\wd\traineesignaturebox -\checklistitemindent} %% The outer list should work like an `enumerate` environment %% so I created a counter. \newcounter{traineeCheckListCounter} \newenvironment{traineeCheckList} {\begin{list} {\traineesignature\rule{0pt}{4ex}% \makebox[\checklistlabelwidth][r]{\large\bfseries\upshape\arabic{traineeCheckListCounter}.}} {\usecounter{traineeCheckListCounter} \setlength{\labelsep}{\checklistlabelsep} \setlength{\itemindent}{\checklistitemindent} \setlength{\labelwidth}{\checklistlabelwidth} \setlength{\leftmargin}{\checklistleftmargin} \setlength{\itemsep}{\baselineskip} \setlength{\topsep}{\baselineskip} } } {% \end{list} } \newcommand{\divisionalCategory}[1]{\item {\large\bfseries\upshape #1}} \newcommand{\intermediaryCategory}[1]{\vspace{1ex}\par\hspace*{3em}{\bfseries\upshape #1}\par} %% This is the inner list. %% This list should behave more like an `itemize` list. \newenvironment{traineeAccomplishmentList} {\begin{list} {} { \setlength{\labelwidth}{1cm} \setlength{\labelsep}{1em} \setlength{\leftmargin}{\dimexpr1cm+1em} \setlength{\itemindent}{0pt} } } {\end{list}} %% From the inner list you want to create some spaces %% for checking things off. `\item` is not happy with %% a `\rule` being passed through its optional argument %% so I save this rule to a box to get around this issue. \newsavebox{\checkoffBox} \savebox{\checkoffBox}{\rule[-0.4pt]{1cm}{0.4pt}} \newcommand{\accomplishment}{\item[\usebox{\checkoffBox}]} %%-------------------------------------------------------------------------------- %% You still need a means of creating your `part` and `subparts` %%-------------------------------------------------------------------------------- \usepackage[explicit]{titlesec} \titleformat{\part} {\normalfont\LARGE\bfseries\filcenter} {\partname \ \arabic{part}:} {0.5em} {#1} \titleformat{\section} {\normalfont\Large\bfseries} {} {0.5\wd\traineesignaturebox} {\arabic{part}.\thesection\hspace*{1em}#1} %%-------------------------------------------------------------------------------- %% You need header and footers %%-------------------------------------------------------------------------------- \usepackage{lastpage} \usepackage{fancyhdr} \pagestyle{fancy} \renewcommand{\headrulewidth}{0.4pt} \renewcommand{\footrulewidth}{0.4pt} \lhead{} \chead{} \rhead{} \lfoot{7.1.2013} \cfoot{Introductory Training} \rfoot{Page \thepage\ of \pageref{LastPage}} %% These next two lines are here just for development purposes. %% \usepackage{showframe} \usepackage{lipsum} \begin{document} \part{Personnel Introduction} \lipsum[1] \section{Division Personnel} \begin{traineeCheckList} \divisionalCategory{Headquarters}\par A brief description of what this is about followed by a list of accomplishments to be named. \begin{traineeAccomplishmentList} \accomplishment first \accomplishment second \intermediaryCategory{Headquarters Administration} \accomplishment another \accomplishment and more \end{traineeAccomplishmentList} \divisionalCategory{Production Department} \begin{traineeAccomplishmentList} \accomplishment A \accomplishment B \accomplishment Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris. Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna. Donec vehicula augue eu neque. \accomplishment C \accomplishment D \end{traineeAccomplishmentList} \end{traineeCheckList} \end{document} 

enter image description here

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.