
비머 프레젠테이션에 타임라인을 포함하고 싶습니다. 이를 위해 나는 다음 코드를 작성했습니다.
\documentclass{article}
\usepackage{chronosys}
\usepackage{xcolor}
\definecolor{first-period}{HTML}{b3e2cd}
\definecolor{second-period}{HTML}{fdcdac}
\definecolor{third-period}{HTML}{cbd5e8}
\begin{document}
\fontfamily{cmss}\selectfont
\definechronoevent{MySmallerEvent}[textstyle=\footnotesize,datestyle=\footnotesize]
\startchronology[startyear=1980,
stopyear=2020,
dates=false,
color=third-period,
height=7ex]
\chronoperiode[color=first-period, dates=false]{1980}{2000}{}
\chronoperiode[color=second-period, dates=false]{2000}{2010}{}
\chronoperiode[color=third-period, dates=false]{2010}{2020}{}
\chronoMySmallerEvent[textwidth=5ex]{1990}{First event}
\chronoMySmallerEvent[textwidth=8ex]{2005}{Second event}
\chronoMySmallerEvent[textwidth=5ex]{2015}{Third event}
\stopchronology
\end{document}
산출
\includegraphics[width=0.8\textwidth, keepaspectratio, trim = 45mm 210mm 45mm 40mm, clip]{timeline.pdf}
이 접근 방식의 문제점은 트림 값을 수동으로 조정해야 하므로 시간이 많이 걸린다는 것입니다.
standalone
대신 을 사용하여 타임라인을 생성하면 그림을 다듬을 필요가 없다고 생각했지만 article
이것이 내가 얻은 것입니다.
! Missing \endgroup inserted.
<inserted text>
\endgroup
l.29 \stopchronology
?
! Missing \endgroup inserted.
<inserted text>
\endgroup
l.29 \stopchronology
?
! Missing } inserted.
<inserted text>
}
l.29 \stopchronology
?
! Extra \endgroup.
<recently read> \endgroup
l.29 \stopchronology
?
! Extra \endgroup.
\color@endgroup ->\endgraf \endgroup
l.31 \end{document}
?
! Too many }'s.
\endsa@boxit ...dvarwidth \color@endgroup \egroup
l.31 \end{document}
?
이 문제를 해결하는 방법에 대한 아이디어가 있습니까?
답변1
먼저, 연대순이 의 타임라인에 맞는 것 같아서 \textwidth
미니페이지 안에 넣어야 합니다. 둘째, 경계 상자를 생성하지 않으므로 독립 실행형은 오른쪽 부분을 잘라냅니다. 그래서 \hrule
높이를 변경하지 않고 너비를 변경하기 위해 an을 사용했습니다 ( \rule
빈 줄을 추가합니다).
\documentclass{standalone}
\usepackage{chronosys}
\usepackage{xcolor}
\definecolor{first-period}{HTML}{b3e2cd}
\definecolor{second-period}{HTML}{fdcdac}
\definecolor{third-period}{HTML}{cbd5e8}
\begin{document}
\begin{minipage}[t][1in][s]{4in}% set height to 1 in, width to 4 in
\hrule width\textwidth height0pt%bounding box?
\fontfamily{cmss}\selectfont
\definechronoevent{MySmallerEvent}[textstyle=\footnotesize,datestyle=\footnotesize]
%
\startchronology[startyear=1980,
stopyear=2020,
dates=false,
color=third-period,
height=7ex]
%
\chronoperiode[color=first-period, dates=false]{1980}{2000}{}
\chronoperiode[color=second-period, dates=false]{2000}{2010}{}
\chronoperiode[color=third-period, dates=false]{2010}{2020}{}
%
\chronoMySmallerEvent[textwidth=5ex]{1990}{First event}
\chronoMySmallerEvent[textwidth=8ex]{2005}{Second event}
\chronoMySmallerEvent[textwidth=5ex]{2015}{Third event}
%
\stopchronology
\vss% shrink bottom
\end{minipage}
\end{document}