6

I'm writing the conclusion to a thesis and would like to repeat some the research questions I have formulated in the introduction. I wrapped each of the questions in a quote environment.

My question is: How can I repeat this quote (including formatting) on in the conclusion, without repeating myself (and introducing a window for error)?

I have found How to render some macro content twice? and How do I repeat a theorem number?, which seem to be variations on the same theme, but do not answer my question.

Note that I'm not particularly attached to the quote environment and am open to alternatives if that makes it easier to solve the question.

Sagi
  • 65
  • 3
    You could just put the content in a macro and place the macro in the intro and the conclusion. See also http://tex.stackexchange.com/questions/21394/best-way-to-avoid-repeating-expressions – N.N. Feb 21 '12 at 09:41

1 Answers1

9

You can include the content you want to repeat in macros by \newcommand and also make a macro for the formatting of the repeated content.

The following is an example of such an approach. Note that you can define \researchquestionformat in another way if you want to use something other than the quote environment for the formatting. Also note that individual formatting in questions such as the emphasize in the first question is preserved.

\documentclass{article}

\newcommand\researchquestionformat[1]{\begin{quote}#1\end{quote}}

\newcommand\firstresearchquestion{\researchquestionformat{%
    Research question 1 with some \emph{emphasized text}%
  }}

\newcommand\secondresearchquestion{\researchquestionformat{%
    Research question 2%
  }}

\begin{document}

\section{Introduction}

I will address the following questions:
\firstresearchquestion
\secondresearchquestion

\section{Conclusion}

The answer to
\firstresearchquestion
is\dots

The answer to
\secondresearchquestion
is\dots

\end{document}

Output of example

N.N.
  • 36,163