Generalown environment inside environment: forgotten \endgroup.

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
talas
Posts: 1
Joined: Wed Jun 24, 2009 3:11 pm

own environment inside environment: forgotten \endgroup.

Post by talas »

Hi,

I try to create my own envrionement in LaTeX2e, where it want to have a envrionment inside environemnt (see the example).

Code: Select all

\documentclass{article}

\title{title}
\author{author}
\date{}

\newenvironment{Inside}[2]{%
  #1 & #2 &%
}{%
  \\%
}

\newenvironment{Outside}{
  \begin{tabular}[t]{lll}
    \textbf{1} & \textbf{2} & \textbf{3}  \\
}{
  \end{tabular}
}

\begin{document}

\begin{Outside}
\begin{Inside}{AAA}{BBB}
descriptive text...
\end{Inside}
\end{Outside}

\end{document}
But all I get is this error message:

Code: Select all

This is pdfTeX, Version 3.1415926-1.40.9 (MiKTeX 2.7)
entering extended mode
(test.tex
LaTeX2e <2005/12/01>
Babel <v3.8l> and hyphenation patterns for english, dumylang, nohyphenation, ge
rman, ngerman, german-x-2008-06-18, ngerman-x-2008-06-18, french, loaded.
("C:\Program Files\MiKTeX 2.7\tex\latex\base\article.cls"
Document Class: article 2005/09/16 v1.4f Standard LaTeX document class
("C:\Program Files\MiKTeX 2.7\tex\latex\base\size10.clo")) (test.aux)
! Extra }, or forgotten \endgroup.
<template> \unskip \hfil }
                          \hskip \tabcolsep \endtemplate
l.23 \begin{Inside}{AAA}{BBB}

Does some one know how I can fix this problem?

Thanks in advance.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Re: own environment inside environment: forgotten \endgroup.

Post by localghost »

If you would clarify what you are aiming at, we may be able to find an alternative solution.


Best regards and welcome to the board
Thorsten
Post Reply