작성 중인 체크리스트 항목의 텍스트 배치에 약간의 어려움이 있습니다. 다음은 난이도를 보여주는 이미지입니다(마지막 두 번째 체크리스트 항목 참조).
이 문제를 해결하는 방법에 대한 제안 사항이 있습니까? 가장 먼저 살펴봐야 할 것은 새로운 명령 checklistAStart의 생성일 것입니다.
예제 코드는 다음과 같습니다:
\documentclass[american]{article}
% set page size and page margin
\usepackage[a5paper, margin=1.5 mm]{geometry}
% tables
% set table width
\usepackage{tabularx}
% tabularx alignment
\newcolumntype{R}{>{\raggedleft\arraybackslash}X}
\newcolumntype{C}{>{\centering\arraybackslash}X}
% multi-spanned columns and rows in tables
\usepackage{multirow}
% date
\usepackage{babel}
\usepackage[iso, inputamerican]{isodate}
% lists
% description itemized list format
\usepackage{enumitem}
% border around pages
\usepackage{pgf}
\usepackage{pgfpages}
\pgfpagesdeclarelayout{boxed}{
\edef\pgfpageoptionborder{0pt}
}{
\pgfpagesphysicalpageoptions{%
logical pages=1,%
}
\pgfpageslogicalpageoptions{1}{
border code=\pgfsetlinewidth{2pt}\pgfstroke,%
border shrink=\pgfpageoptionborder,%
resized width=.98\pgfphysicalwidth,%
resized height=.98\pgfphysicalheight,%
center=\pgfpoint{.5\pgfphysicalwidth}{.5\pgfphysicalheight}%
}%
}
\pgfpagesuselayout{boxed}
\begin{document}
\isodate
% tab
\newcommand{\tab}{\hspace*{2em}}
% commands for description itemised lists
% commands for dimensions in description itemised lists
% left position of item
\newcommand{\leftMarginDistance}{8.5 cm}
% #?
\newcommand{\itemIndentDistance}{2 cm}
% vertical separation
\newcommand{\itemSeparationDistance}{-4 pt}
% leftmost position of item denoter
\newcommand{\labelIndentDistance}{0.2 cm}
% commands for starting and ending description itemised lists
\newcommand{
\checklistAStart
}
{
\begin{description}[
style=multiline,
itemsep=\itemSeparationDistance,
leftmargin=\leftMarginDistance,
itemindent=\itemIndentDistance,
labelindent=\labelIndentDistance,
font=\normalfont]
}
\newcommand{
\checklistAEnd
}
{
\end{description}
}
% commands for description itemised list items
\newcommand{\checklistAitem}[2]{\item[#1 \dotfill]#2}
\newcommand{\checklistAitemEmph}[2]{\item[\emph{#1}\dotfill]\emph{#2}}
\newcommand{\checklistAtitle}[1]{\item[#1]}
\newcommand{\checklistAsubitem}[2]{\item[\hspace{\labelIndentDistance}#1 \dotfill]#2}
% commands for titles
% command for main titles
\newcommand{\titleA}[1]{\noindent\large\textbf{#1}\normalsize\\}
% command for subtitles
\newcommand{\titleB}[1]{\noindent\textbf{#1}\normalsize}
% commands for headings
% command for main headings
\newcommand{\headingA}{
\begin{center}
\begin{tabularx}{145 mm}{|lR|}
\hline
&\\
NORMAL AND EMERGENCY PROCEDURES CHECKLIST & MODEL \today-1\\
FOR CESSNA 172S INCLUDING G1000 AVIONICS&\\
&\\
\hline
\end{tabularx}
\end{center}}
\headingA
% left position of item
\renewcommand{\leftMarginDistance}{6.5 cm}
\titleA{PRE-FLIGHT INSPECTION: INTERNAL}
\titleB{COCKPIT}
\checklistAStart
\checklistAitem{aircraft position}{check obstructions}
\checklistAitem{parking break}{set}
\checklistAitem{control wheel lock}{remove and stow}
\checklistAitem{ignition switch}{off, key removed}
\checklistAitem{avionics switch (BUS 1 and BUS 2)}{off}
\checklistAitem{static pressure alternate source value}{off}
\checklistAitem{fuel selector}{both}
\checklistAitem{fuel shutoff valve}{on (push fully in)}
\checklistAitem{elevator trim}{check, set neutral (check full movement up and down)}
\checklistAitem{master switch}{on}
\checklistAEnd
\end{document}
답변1
parbox
한 가지 방법은 텍스트의 오른쪽에 a를 사용하는 것입니다 .
\newcommand{\checklistAitem}[2]{\item[#1 \dotfill]\parbox[t]{5.50cm}{#2\unskip\strut}}
결과는 다음과 같습니다.
노트:
- Barbara Beeton의 제안에
\unskip\strut
따라\parbox
.