有没有办法保存并重新使用一些内容

有没有办法保存并重新使用一些内容
%% 19 Feb 2020
\documentclass[12pt,a4paper,UTF8]{report}
%%
%%
\usepackage{amsmath,amssymb}
\usepackage{graphicx}
\usepackage[flushleft]{paralist}[2013/06/09]
\usepackage{hyperref}
\usepackage{lipsum}
\usepackage{currfile}
\renewcommand{\familydefault}{\sfdefault} %% changes font to sans-serif

%% length
\setlength{\parskip}{10pt}
\setlength{\parindent}{0pt}
\newlength{\qspace}
\setlength{\qspace}{20pt}
\newcounter{qnumber}
\setcounter{qnumber}{0}
%%
%%
\newcommand{\fakesubsection}[1]{%
    \addcontentsline{toc}{subsection}{#1}% Add section to ToC
}
%%
%%
\newenvironment{question}%
{\vspace{\qspace}
    \begin{enumerate}[\bfseries Q1\quad][10]%
    \setcounter{enumi}{\value{qnumber}}%
    \item%
    \fakesubsection{\currfilebase-Q\theenumi}% \currfilename VS \jobname
    \label{ques:Q\theenumi}
}{
    \end{enumerate}
    \filbreak
    \stepcounter{qnumber}
}
%%
%%
\begin{document}
%%
%%%%%%%%%%%%%%%%%%%%%%% Q1
\begin{question}
If $\theta+\phi+\psi=\tfrac{1}{2}\pi,$ show that 
\[
\sin^{2}\theta+\sin^{2}\phi+\sin^{2}\psi+2\sin\theta\sin\phi\sin\psi=1.
\]
By taking $\theta=\phi=\tfrac{1}{5}\pi$ in this equation, or otherwise,
show that $\sin\tfrac{1}{10}\pi$ satisfies the equation 
\[
8x^{3}+8x^{2}-1=0.
\]
\end{question}
%%
%%
%%%%%%%%%%%%%%%%%%%%%%% Q2
\begin{question}
\[
8x^{3}+8x^{2}-1=0.
\]
\[
8x^{3}+8x^{2}-1=0.
\]
\[
8x^{3}+8x^{2}-1=0.
\]
\end{question}
%%
%%
%%%%%%%%%%%%%%%%%%%%%%% Q3
\begin{question}
\lipsum[3]
\end{question}
%%
%%
%%%%%%%%%%%%%%%%%%%%%%% Q4
\begin{question}
\[
\sin^{2}\theta+\sin^{2}\phi+\sin^{2}\psi+2\sin\theta\sin\phi\sin\psi=1.
\]
\[
\sin^{2}\theta+\sin^{2}\phi+\sin^{2}\psi+2\sin\theta\sin\phi\sin\psi=1.
\]
\[
\sin^{2}\theta+\sin^{2}\phi+\sin^{2}\psi+2\sin\theta\sin\phi\sin\psi=1.
\]
\end{question}
%%
%%
%%%%%%%%%%%%%%%%%%%%%%% Q5
\begin{question}
\lipsum[9]
\end{question}
%%
%%
\section{prime numbered questions}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% So here, how can I reuse these questions?
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\ref{ques:Q2}
\ref{ques:Q3}
\ref{ques:Q5}

\end{document}

那么在后面的部分中,我如何才能再次重用(打印)这些问题?无需更改任何内容,只需再次显示它们在原始路径中的位置即可。有没有一种通过修改环境来快速实现此目的的方法question

谢谢。

相关内容