I don't know if this is possible but what I would like to do is to pass as an argument the content of an input'ed .tex file.
My example:
I have a tex file named model.tex which only contains:
512
In my main tex file, I've created a newcommand which is the following:
Code: Select all
\newcommand{\pixel}[1]
{
\ifthenelse{\equal{#1}{128}}{128 x 128; 24${\mu}$${}^{2}$ pixel area; 3.1mm${}^{2}$ effective area}{}
\ifthenelse{\equal{#1}{512}}{512 x 512; 16${\mu}$${}^{2}$ pixel area; 8.19mm${}^{2}$ effective area}{}
\ifthenelse{\equal{#1}{1024}}{1024 x 1024; 13${\mu}$${}^{2}$ pixel area; 13.3mm${}^{2}$ effective area}{}
}
\pixel{\input{model.tex}}\\
Use of an \@@array doesn't match its definition, and other things after that...
When I simply write
Code: Select all
\input{model.tex}
Code: Select all
\pixel{128}\\
\newcommand
.Both functions work individually as I want them to but when I try to give the result of my input in my
\newcommand
, it doesn't work. Does anybody have a trick that could allow me to do that.Thanks community!