is there a way to embed an text in several environments (or structures, \chapter, \section etc.) in one file and "copy"/insert the content of single environment items in other files? i've noticed the clipboard and extract packages and had the thought about \def and \newcommand. but those aren't satisfying, mostly because it seems unaesthetic to me; I just want ordinary environments.
The extract package just places the content into a new file, which is what I seek to avoid. Consider an huge collection of aphorisms, quotes or equations (and others, so the solution should be abstract enough to handle different content, I guess environments would fit well). I just don't want a file for each single item, it would be far too many.
So something like "I want to use the environment x, this x shall be named x1, that x2 the other x3", as I would do with the extract package would be pleasant, just I need now access to these x1, x2 and x3 instead of a file. Something like "here I want to place a copy of x1, there of x2, here of x1 again, there of x3".
So as example I want something like:
quotesFile.tex:
\begin{myquote} % any environment
\contentName{quote1} % define some kind of identifier
% for this environments content
This is a quote
\end{myquote}
\begin{myquote}
\contentName{quote2}
lorem ipsum dolor sit amet
\end{myquote}
\begin{myquote}
\contentName{quote3}
foo bar baz foobar foobaz
\end{myquote}
and in otherfile.tex: \include{quotesFile}
\placeContent{quote2} % I want something as simple
% as this to insert the content
% of the environment, here with
% the identifier "quote2"
\placeContent{quote3}
so the output should be:
lorem ipsum dolor sit amet
foo bar baz foobar foobaz
I do not want something like
\newcommand{\quote1}[]{This is a quote}
for several reasons. Well, it kinda would solve the problem but it just doesn't seem aesthetical to me (blame me). I prefer to keep things clear and tidy and all the brackets and commands which are actually just simple text don't seem tidy to me but rather confusing. According to my opinion and understanding commands/macros shall serve to avoid repetition of code but aren't to be used for ordinary text content.
\x1
,\x2
, ... (with different names/codes) and then using these macros (which might expand into environments) doesn't solve your problem.