
Мне необходимо указать входные и выходные данные каждого шага в моем расписании.
Текущий шаблон предоставляет мне что-то вроде этого:
Мне нужно иметь несколько дополнительных полей до и после задачи, чтобы добавлять входные и выходные рабочие продукты, например:
Вот соответствующее MWE
:
\documentclass[•]{article}
\usepackage{amsfonts}
\usepackage{booktabs}
\usepackage{amsmath}
\usepackage{indentfirst}
\usepackage{mathtools}
\usepackage{siunitx}
\usepackage[doublespacing]{setspace}
\usepackage{fourier}
\usepackage{sectsty}
\allsectionsfont{\centering \normalfont\scshape}
\usepackage
[
letterpaper,% other options: a3paper, a5paper, etc
left=2cm,
right=2cm,
top=3cm,
bottom=4cm,
vmargin=2cm,
% use vmargin=2cm to make vertical margins equal to 2cm.
% us hmargin=3cm to make horizontal margins equal to 3cm.
% use margin=3cm to make all margins equal to 3cm.
]
{geometry}
%for timetable
\usepackage{xcolor}
\newcommand\ytl[2]{
\parbox[b]{8em}{\hfill{\color{cyan}\bfseries\sffamily #1}~$\cdots\cdots$~}\makebox[0pt][c]{$\bullet$}\vrule\quad \parbox[c]{7.5cm}{\vspace{7pt}\color{red!40!black!80}\raggedright\sffamily #2.\\[7pt]}\\[-3pt]}
%
\begin{document}
\begin{table}
\caption{My timetable}
\centering
\begin{minipage}[t]{.7\linewidth}
\color{gray}
\rule{\linewidth}{1pt}
\ytl{1947}{Composing the thesis draft}
\ytl{1968}{Reviewing the thesis draft by the supervisor}
\ytl{1971}{Analyzing and applying the supervisor's comments}
\ytl{1973}{Sending the thesis to the referees}
\ytl{1978}{Preparing presentation slides}
\ytl{1968}{Reviewing the presentation slides by the supervisor}
\ytl{1971}{Analyzing and applying the supervisor's comments}
\ytl{1981}{Defense}
\bigskip
\rule{\linewidth}{1pt}%
\end{minipage}%
\end{table}
\end{document}
Как отредактировать \ytl
команду, чтобы она отражала нужный формат?
решение1
\documentclass{article}
\usepackage{amsfonts}
\usepackage{booktabs}
\usepackage{amsmath}
\usepackage{indentfirst}
\usepackage{mathtools}
\usepackage{siunitx}
\usepackage[doublespacing]{setspace}
\usepackage{fourier}
\usepackage{sectsty}
\allsectionsfont{\centering \normalfont\scshape}
\usepackage
[
letterpaper,% other options: a3paper, a5paper, etc
left=2cm,
right=2cm,
top=3cm,
bottom=4cm,
vmargin=2cm,
% use vmargin=2cm to make vertical margins equal to 2cm.
% us hmargin=3cm to make horizontal margins equal to 3cm.
% use margin=3cm to make all margins equal to 3cm.
]
{geometry}
%for timetable
\usepackage{xcolor}
\newcommand{\ytlformat}{\color{red!40!black!80}\sffamily}
\newcommand\ytl[4]{%
\color{cyan}\bfseries\sffamily #1%
& \ytlformat #2
& \ytlformat #3
& \ytlformat #4
\\[7pt]
}
%
\begin{document}
\begin{table}
\centering
\caption{My timetable}
\smallskip
\begin{tabular}{l !{~$\cdots\cdots$~\makebox[0pt][l]{$\bullet$}}| lll}%
\toprule
\multicolumn{1}{l}{} & \ytlformat input & \ytlformat task & \ytlformat output \\
\midrule
\addlinespace[0pt]%
\rule{0pt}{1.8em}%
\ytl{1947}{draft}{revery}{comments}
\ytl{1948}{draft}{revery}{comments}
\ytl{1949}{draft}{revery}{comments}
\ytl{1950}{draft}{revery}{comments}
\addlinespace[0pt]%
\bottomrule
\end{tabular}%
\end{table}
\end{document}
«Также \addlinespace
может использоваться до, после или между правилами, если вы хотите контролировать точный объем вставляемого пространства». (документация по booktabsстр. 5)
\addlinespace[0pt]
необходимо для того, чтобы избежать пробела между правилами.