存储数据并在稍后调用 - 简单的方法

存储数据并在稍后调用 - 简单的方法

我需要重复放置文本,所以我想存储它并重复使用它。但是,我无法为其定义宏。请提供任何指导。

\documentclass{article}
\usepackage[margin=1in]{geometry}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{pifont }
\begin{document}

\storedata \mydata{\ding{172} \ding{173} \ding{174} \ding{175} \ding{176} \ding{177} \ding{178} \ding{179} \ding{180} \ding{181}}

\begin{table}[]
\begin{tabular} {p{.08\textwidth}p{.5\textwidth}p{.25\textwidth}}  \multicolumn{3}{l}{Policy Dimension D1: Raw materials} \\ \hline
Code & Element & Rating (Severity 0 to 10) \\ \hline
D1E1 & This is a string of text for the statement & \getdata \mydata  \\
D1E2 & This is a string of text for the statement & \getdata \mydata  \\
D1E3 & This is a string of text for the statement & \getdata \mydata  \\
D1E4 & This is a string of text for the statement & \getdata \mydata  \\ \hline
\end{tabular}
\end{table}
\end{document}

相关内容