Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have the following question:

I have heard that you can use $\xymatrix@1...$, if you want to put diagrams not into a separate line, but into the line you are writing text at the very moment.

This does work, but unfortunately not in the following example...

The problem is that I get error messages because of the \rotatebox command, when I put the lines below in the form $\xymatrix@1...$...

...but it works, if I use the \begin{xy}... environment, as I did it below. Unfortunately, then my triangle is placed in the middle of a new separate line.

Does anybody have an idea, how to prevent this?

\documentclass[a4paper]{scrartcl}
\usepackage{ucs}
\usepackage[ngerman]{babel}
\usepackage[latin1]{inputenc}
\usepackage{dsfont}
\usepackage{rotating}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage[mathscr]{eucal}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{extpfeil}
\usepackage{textcomp}
\usepackage{graphicx}
\usepackage[pdftex]{color}
\usepackage{paralist}
\usepackage{hyperref}
\usepackage[arrow, matrix, curve]{xy}
\renewcommand{\ttdefault}{pzc}


\deffootnotemark{[\thefootnotemark]}
\deffootnote{1.5em}{1em}{\textsuperscript{[\thefootnotemark]}}

\begin{document}

\noindent Ist $\xymatrix@1{{A\ \ } \ar@{{>}->}[r]^f &  B }$ ein Monomorphismus, so erhalten wir: 

$$
\begin{xy}

\xymatrix@1{{A\ \ } \ar@{{>}->}[rr]^f \ar@{->}[rd]_{\rotatebox{330}{$\sim$}} &  &  B \\ &  Im f \ar@{^{(}->}[ru]^n & }

\end{xy}
$$


\end{document}
share|improve this question

closed as too localized by Joseph Wright Feb 14 '13 at 20:03

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! A tip: If you indent lines by 4 spaces, they'll be marked as a code sample. You can also highlight the code and click the "code" button (with "{}" on it). –  egreg Feb 14 '13 at 17:54
    
I get no error when using the $\xymatrix@1...$ form, with \rotatebox. The xy environment is not necessary; use \[...\] rather than $$...$$ in LaTeX and never leave a blank line before a displayed math formula. –  egreg Feb 14 '13 at 18:00
add comment

1 Answer

up vote 2 down vote accepted

I get no error on your code as posted or changed as below which is how I think you described changing it. Please edit your question to make an example that generates the error and say exactly what error you get. You may also consider making your example more minimal by removuing most of the packages if they are not needed to show the error.

\documentclass[a4paper]{scrartcl}
\usepackage{ucs}
\usepackage[ngerman]{babel}
\usepackage[latin1]{inputenc}
\usepackage{dsfont}
\usepackage{rotating}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage[mathscr]{eucal}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{extpfeil}
\usepackage{textcomp}
\usepackage{graphicx}
\usepackage[pdftex]{color}
\usepackage{paralist}
\usepackage{hyperref}
\usepackage[arrow, matrix, curve]{xy}
\renewcommand{\ttdefault}{pzc}


\deffootnotemark{[\thefootnotemark]}
\deffootnote{1.5em}{1em}{\textsuperscript{[\thefootnotemark]}}

\begin{document}

\noindent Ist $\xymatrix@1{{A\ \ } \ar@{{>}->}[r]^f &  B }$ ein Monomorphismus, so erhalten wir: 

$
%$$\begin{xy}
\xymatrix@1{{A\ \ } \ar@{{>}->}[rr]^f \ar@{->}[rd]_{\rotatebox{330}{$\sim$}} &  &  B \\ &  Im f \ar@{^{(}->}[ru]^n & }
%\end{xy}$$
$

\end{document}
share|improve this answer
    
Thank you for your answer. It works now. I think it did not work the way I typed it, because I made a few typing mistakes, but copying and pasting your code works perfectly. Thanks! –  Bernhard Boehmler Feb 14 '13 at 18:38
    
@BernhardBoehmler On that basis, I've closed the question as 'too localized'. –  Joseph Wright Feb 14 '13 at 20:03
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.