%-----------------------------
\documentclass{article}
\usepackage{array}
\usepackage{tabularx}
\usepackage{color}
\usepackage{float}
\newenvironment{Details}%
{%
\minipage[t]{0.5\textwidth}%
\table[H]%
\centering%
\tabularx{1.0\linewidth}{|p{0.5\linewidth}X|}%
\hline
}%
{%
\hline\endtabularx
\endtable
\minipage%
}%
\begin{document}
\mbox{}
\begin{Details}
Laser & TiSA, 100\,fs, 25\,MHz, 5nJ \tabularnewline
\end{Details}
\end{document}
%-----------------------------
tritt der folgende Fehler auf:
%-----------------------------
! Misplaced \noalign.
\hline ->\noalign
{\ifnum 0=`}\fi \let \hskip \vskip \let \vrule \hrule
\let...
l.64 \end{Details}
I expect to see \noalign only after the \cr of
an alignment. Proceed, and I'll ignore this case.
%-----------------------------
Lösung?
Matthias
"\table" weg. Wozu soll das gut sein?
...Rolf
Matthias
> \hline\endtabularx
tabularx-Anleitung nicht gelesen?
The scanner now looks for the end of the current environment (foo in this
example.) There are some restrictions on this usage, the principal one
being that \endtabularx is the first token of the `end code' of the
environment.
Du musst also das \hline in den `begin code' verschieben, beispielsweise per
(ungetestet!):
\let\Details@saved@endtabular\endtabular
\def\endtabular{\hline\Details@saved@endtabular}%
Gruß
Markus
--
Gruppenhinweise (auch Minimalbeispiel) --> http://www.latex-einfuehrung.de
Fragen zu LaTeX? --> http://www.dante.de/faq/de-tex-faq/
Fragen zu KOMA-Script? --> Anleitung z. B. auf CTAN (--> FAQ);
--> http://www.komascript.de
> Lösung?
\documentclass{article}
\usepackage{calc}
\newsavebox\TBox
\newenvironment{Details}{%
\centering
\begin{lrbox}{\TBox}
\tabular{|p{0.25\linewidth}p{0.25\linewidth-4\tabcolsep}|}\hline
}{%
\hline\endtabular
\end{lrbox}\usebox\TBox\par}%
\begin{document}
\begin{Details}
Laser & TiSA, 100\,fs, 25\,MHz, 5nJ \tabularnewline
\end{Details}
\medskip
\centering
\rule{0.5\linewidth}{1pt}
\end{document}
Herbert
--
http://PSTricks.tug.org
http://www.dante.de/CTAN/info/math/voss/
\documentclass[draft]{article}
\usepackage{array}
\usepackage{tabularx,framed,calc}
\usepackage{color}
\newenvironment{Details}%
{%
\noindent\framed
\tabularx{\linewidth-2\fboxsep-2\fboxrule}{XX}%
}%
{\endtabularx\endframed}%
\begin{document}
\mbox{}
\begin{Details}
Laser & TiSA, 100\,fs, 25\,MHz, 5nJ \tabularnewline
\end{Details}
\end{document}
%-----------------------------
...Rolf