我想\smartdiagram
在一些描述流程的开头添加一个。图表应包含与此流程某些部分所标标题相对应的文本。想法是只修改部分标题,以便自动更新图表文本。
%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode
\documentclass{report}
\usepackage{smartdiagram}
\begin{document}
\section{titlesection1}\label{tit:titlesection1}
Lorem ipsum dolor sit amet...
\section{titlesection2}\label{tit:titlesection2}
Lorem ipsum dolor sit amet...
\section{titlesection3}\label{tit:titlesection3}
Lorem ipsum dolor sit amet...
\smartdiagram[circular diagram:clockwise]{...,...,...} %<<--this should be the clockwise diagram with section names
\end{document}
答案1
您可以使用nameref
:
\documentclass{report}
\usepackage{smartdiagram}
\usepackage{nameref}
\begin{document}
\section{titlesection1}\label{tit:titlesection1}
Lorem ipsum dolor sit amet...
\section{titlesection2}\label{tit:titlesection2}
Lorem ipsum dolor sit amet...
\section{titlesection3}\label{tit:titlesection3}
Lorem ipsum dolor sit amet...
\begin{center}
\smartdiagramset{text width=3cm}
\smartdiagram[circular diagram:clockwise]{%
\nameref{tit:titlesection1},
\nameref{tit:titlesection2},
\nameref{tit:titlesection3}
}
\end{center}
\end{document}