I have defined a command as follows
\newsavebox{\textsix}
\newcommand{\bottomr}[1]{\sbox{\textsix}{\parbox{11cm}{\begin{flushright} #1
\end{flushright}}}}
which save the parameter (text) of the command \bottomr
to a \sbox
, That can be used with \usebox{\textsix}
I would like to convert it to an environment like
\newsavebox{\textsix}
\newenvironment{bottomr}{ }{ }
which capture the text inside bottomr
environment and save it to a \sbox
Approximate like this
\documentclass[a4paper{article}
\usepackage{lipsum}
\begin{document}
\newsavebox{\textsix}
\newenvironment{bottomr}{?}{?}
\begin{bottomr}
\lipsum[1]
\end{bottomr}
\usebox{\textsix}
\end{document}
environ
package should be able to do what you want.