TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am nesting an \xygraph in an \xymatrix like so:


\input xy




\textbf{Reduktion von CI auf C}\\
\ar[r] & _{c_k}\bullet \ar@{-->}[r] \ar@{.>}[r] & \cdots \ar@{-->}[r] & \bullet \ar@{-->}[r] & _{s_k}
!{(0,0) }*+{\bullet}="a"
!{(3,0) }*+{(M_k,s_k)}
!{(4,1) }*+{}="b"
!{(4,-1) }*+{}="c"
"a"-"b" "a"-"c" "b"-"c"
\end{xy} \\



Additionally I use a global shorthandoff{"} to circumvent an error caused by using the ngerman babel package. This displays fine in a \documentclass{article}, but everything goes haywire in a \documentclass{beamer}. I get errors about missing }'s and missing \end{xy}'s

What do I have to do to make this nesting work in the beamer class as well?

share|improve this question

closed as too localized by percusse, lockstep, Paul Gaborit, diabonas, egreg Sep 28 '12 at 15:06

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Welcome to TeX.SX! It is always better to provide a minimal working example (mwe) such that it is possible to compile immediately your code and tell you which could be your problem. – Claudio Fiandrino Jun 7 '12 at 11:50
I get an error only if the \shorthandoff{"} declaration is inside the frame. Use \begin{frame}[fragile] or make that declaration before \begin{frame}. Please, turn your code into a complete example that can be run through LaTeX. – egreg Jun 7 '12 at 11:53
I did use \shorthandoff{"} outside of a frame environment and have already tried to use [fragile] with no luck. I now updated the code in the original post to be a fully working example - it works now in this single-frame document, but in my main presentation the same errors appear. If I remove this frame from my main presentation, the entire thing compiles without error though. – MartinB Jun 7 '12 at 12:43
As it stands, I don't see how we can answer this. What has to happen to alter the example to give an error: as you say this compiles fine. – Joseph Wright Aug 11 '12 at 14:22