테이블 형식 환경에서 열 간의 기본 구분은 6pt
. 다음 코드에서 렌더링된 디스플레이에서는 이러한 열 간격이 약간 좁습니다. 이 기본값을 어떻게 사용 \hskip
하거나 3배로 늘리 나요 ? \tabcolsep
행 사이의 수직 간격을 어떻게 늘리나요 3pt
?
\documentclass{amsart}
\usepackage{mathtools,array}
\begin{document}
\noindent \textbf{8.) }Compute the following function values. \vskip1.25mm
\noindent \hphantom{\textbf{8.) }}\hspace*{1em}
\begin{tabular}{r@{\textbf{ }}lr@{\textbf{ }}l}
\textbf{a.)} & $\lfloor 1.1 \rfloor$ & \textbf{b.)} & $\lceil 1.1 \rceil$ \\
\textbf{c.)} & $\lfloor -0.1 \rfloor$ & \textbf{d.)} & $\lceil -0.1 \rceil$ \\
\textbf{e.)} & $\lceil 2.99 \rceil$ & \textbf{f.)} & $\lceil -2.99 \rceil$ \\
\textbf{g.)} & $\big\lfloor \frac{1}{2} + \lceil \frac{1}{2} \rceil \big\rfloor$
&
\textbf{h.)} & $\big\lceil \lfloor \frac{1}{2} \rfloor + \lceil \frac{1}{2} \rceil + \frac{1}{2} \big\rceil$
\end{tabular}
\end{document}
답변1
내 의견에서 언급했듯이 수평 부분의 경우 \tabcolsep=3\tabcolsep
. 수직 간격의 경우 패키지 \extrarowheight
에 소개된 것을 사용할 수 있습니다 array
.
\documentclass{amsart}
\usepackage{mathtools,array}
\begin{document}
\noindent \textbf{8.) }Compute the following function values. \vskip1.25mm
\noindent \hphantom{\textbf{8.) }}\hspace*{1em}
\bgroup\tabcolsep=3\tabcolsep
\extrarowheight=3pt
\begin{tabular}{r@{\textbf{ }}lr@{\textbf{ }}l}
\textbf{a.)} & $\lfloor 1.1 \rfloor$ & \textbf{b.)} & $\lceil 1.1 \rceil$ \\
\textbf{c.)} & $\lfloor -0.1 \rfloor$ & \textbf{d.)} & $\lceil -0.1 \rceil$ \\
\textbf{e.)} & $\lceil 2.99 \rceil$ & \textbf{f.)} & $\lceil -2.99 \rceil$ \\
\textbf{g.)} & $\big\lfloor \frac{1}{2} + \lceil \frac{1}{2} \rceil \big\rfloor$
&
\textbf{h.)} & $\big\lceil \lfloor \frac{1}{2} \rfloor + \lceil \frac{1}{2} \rceil + \frac{1}{2} \big\rceil$
\end{tabular}
\egroup
\end{document}
콘텐츠를 만드는 방법:
\documentclass{amsart}
\usepackage{mathtools,array}
\usepackage{enumitem}
\usepackage{multicol}
\multicolsep=1.25mm
\begin{document}
\begin{enumerate}[
,label=\textbf{\arabic*.)}
,itemsep=\bigskipamount
,align=left
,labelsep=1em
,labelwidth=1em
,labelindent=0pt
,leftmargin=!
]
\item Compute the following function values.
\begin{multicols}{2}
\begin{enumerate}[label=\textbf{\alph*)},itemsep=3pt]
\item $\lfloor 1.1 \rfloor$
\item $\lfloor -0.1 \rfloor$
\item $\lceil 2.99 \rceil$
\item $\big\lfloor \frac{1}{2} + \lceil \frac{1}{2} \rceil \big\rfloor$
\item $\lceil 1.1 \rceil$
\item $\lceil -0.1 \rceil$
\item $\lceil -2.99 \rceil$
\item $\big\lceil \lfloor \frac{1}{2} \rfloor + \lceil \frac{1}{2} \rceil + \frac{1}{2} \big\rceil$
\end{enumerate}
\end{multicols}
\item Draw a circle.
\item Rethink your choice to use a \texttt{tabular} environment.
\end{enumerate}
\end{document}
답변2
코드를 깔끔하게 정리하는 것이 중요한 목표입니다. 다음에서는 두 가지 새로운 열 유형이 정의됩니다. 하나는 자동 굵은 글꼴용이고 다른 하나는 자동 수학 모드용입니다. 그 결과 환경에서 훨씬 더 읽기 쉬운 코드가 탄생했습니다 tabular
.
\documentclass{amsart}
\usepackage{array} % for "\newcolumntype" macro
\newcolumntype{L}{>{$}l<{$}} % automatic math mode
\newcolumntype{B}{>{\bfseries}l} % automatic bold face
\begin{document}
\noindent
\textbf{8.)} Compute the following function values.
\par\smallskip\noindent%
\begingroup\renewcommand{\arraystretch}{1.33} % less cramped look
\hspace*{1cm}
\begin{tabular}{@{}BL@{\qquad}BL@{}}
a.) & \lfloor 1.1 \rfloor & b.) & \lceil 1.1 \rceil \\
c.) & \lfloor -0.1 \rfloor & d.) & \lceil -0.1 \rceil \\
e.) & \lceil 2.99 \rceil & f.) & \lceil-2.99 \rceil \\
g.) & \bigl\lfloor \frac{1}{2} + \lceil \frac{1}{2} \rceil \bigr\rfloor &
h.) & \bigl\lceil \lfloor \frac{1}{2} \rfloor + \lceil \frac{1}{2} \rceil
+ \frac{1}{2} \bigr\rceil \\
\end{tabular}
\endgroup
\end{document}
답변3
.enumerate
enumitem
tasks
tabular
이렇게 하면 모든 라벨이 자동으로 계산되고 형식이 지정되며 참조 가능해집니다.
또한 별표 버전에서 크기를 조정할 수 있는 a \Floor
및 a 명령을 정의했습니다. \Ceil
마지막 항목에서 직장에서 볼 수 있습니다.
\documentclass{amsart}
\usepackage[utf8]{inputenc}
\usepackage{showframe}
\usepackage{enumitem}
\renewcommand{\ShowFrameLinethickness}{0.3pt}
\usepackage{tasks}
\usepackage{mathtools,array}
\DeclarePairedDelimiter{\Floor}{\lfloor}{\rfloor}
\DeclarePairedDelimiter{\Ceil}{\lceil}{\rceil}
\begin{document}
\begin{enumerate}[label = \arabic*.), font = \bfseries, start = 8, wide = 0pt, widest=\textbf{0.)},leftmargin =* ]
\item Compute the following function values. \vskip1.25mm%\
\begin{tasks}[counter-format = tsk[a].), label-format = \bfseries, label-width = 1.5em](3)%{r@{\textbf{ }}lr@{\textbf{ }}l}
\task $\lfloor 1.1 \rfloor$
\task $\lceil 1.1 \rceil$
\task $\lfloor -0.1 \rfloor$
\task $\lceil -0.1 \rceil$
\task $\lceil 2.99 \rceil$
\task $\lceil -2.99 \rceil$
\task $\bigl\lfloor \frac{1}{2} + \lceil \frac{1}{2} \rceil \bigr\rfloor$
\task $\Ceil*{\Floor*{ \frac{1}{2}} + \Ceil*{\frac{1}{2}} + \frac{1}{2}}$
\end{tasks}
\end{enumerate}
\end{document}