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.

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

How do I typeset that little symbol which indicates that a commutative square is a pushout or pullback square? I usually draw my diagrams in XY-pic, so I'd be most interested in how to do it there.

Added: The desired effect is a diagram like


Edit: The problem is in typesetting the actual symbol, the XY-pic user's guide says how to place it.

share|improve this question
Could you please add what that symbol looks like. – Caramdir Aug 5 '10 at 14:48
@Caramdir: take a look at my answer to see what it looks like. – Loop Space Aug 5 '10 at 15:06
To clarify: do you want to know what the symbol is, or how to place it correctly in the diagram? (I must admit that I wouldn't regard this as a symbol in the same way that I wouldn't regard an arrow as a symbol.) – Loop Space Aug 5 '10 at 15:29
@Caramdir: I didn't want to add the diagram until K.J.Moi had enough reputation to add a diagram as (from other experience) that might limit K.J.Moi's ability to edit the question. – Loop Space Aug 5 '10 at 15:34
Sorry. How much reputation is needed to add a picture? – Caramdir Aug 5 '10 at 15:37

Use the Comprehensive LaTeX Symbol List to find it or use the Detexify tool.

You may use the symbols \lrcorner, \ulcorner, \llcorner or \urcorner of the amssymb package.

A dot might be put into the corner for instance by $\rlap{$\cdot$}\lrcorner$. Or use \mathrlap as suggested in the comments.

Here's a possible definition for that symbol:


Insert small spacing if you would like to adjust the position of the dot within the corner symbol.

Here's a complete minimal example producing a complete matrix:

  \ar @{} [dr] | \corner A \ar[r] \ar[d] &B \ar[d] \\
  C \ar[r] & D

alt text

share|improve this answer
I suspect that the problem is less in defining the symbol itself as to placing it in the correct place in the diagram. See my answer for what it should look like (but my answer uses TikZ and the questioner asked for xy so the question itself is still open!). – Loop Space Aug 5 '10 at 15:07
I understood it as how to typeset the symbol, not how to place it. Though xy commands would be able to place it somewhere. I added symbols of amssymb. – Stefan Kottwitz Aug 5 '10 at 15:16
I guess that needs clarifying - I'll comment on the original question. – Loop Space Aug 5 '10 at 15:28
Those corner commands look good. There is still the problem of placing the dot in the middle. On page 98 of the comprehensive symbol list the symbol {\pigpenfont J} is pretty much what I want. I've seen this symbol used a lot, so I'd be surprised if there isn't some easier way. – K.J. Moi Aug 5 '10 at 16:04
There is a problem with using \rlap in math mode but <a href="math.arizona.edu/~aprl/publications/mathclap/…; is a way around it. Using the new macros on p.4 the code \xymatrix{\ar @{} [dr] |{\text{\LARGE{$\mathrlap{\cdot}\lrcorner$}}} A \ar[r] \ar[d] &B \ar[d] \C \ar[r] & D} gives decent output. The input however is far from decent, so I really hope someone knows of a better way. – K.J. Moi Aug 5 '10 at 16:34

I'm posting this more so that people know what K.J. Moi is talking about! Here's how to do it in TikZ:


\node (w) at (0,0) {\(W\)};
\node (x) at (0,-2) {\(X\)};
\node (y) at (2,0) {\(Y\)};
\node (z) at (2,-2) {\(Z\)};
\draw[->] (w) -- (y);
\draw[->] (w) -- (x);
\draw[->] (x) -- (z);
\draw[->] (y) -- (z);
\draw +(-.5,0) -- +(0,0)  -- +(0,.5);
\fill +(-.25,.25) circle (.05);

And here's the output:


(pdf, and this is not to be confused with these instructions for opening a door)

So strictly speaking, it's not a symbol itself but a couple of lines set into the diagram. I don't know how to do this in XY as I'm a die-hard practitioner of TikZ, but hopefully seeing the picture will help others figure it out for you!

(Note that there are probably slicker ways of doing it in TikZ as well, I was going for speed here as I guessed not everyone would know what a pullback diagram is!)

(Edited to add the dot and to shift the symbol a bit closer towards the Z; I'm not sure exactly how far it should be shifted, but the .5 in the expression ($(w)!.5!(z)$) controls how far between the W and Z the point of the symbol lies; bigger numbers shift it to towards Z.)

share|improve this answer
I guess there are different ways of doing this but I'm used to seeing the "corner" you put in closer to the Z in the diagram and a dot placed in the middle of the "corner". – K.J. Moi Aug 5 '10 at 15:24
@K.J. Moi: Right, I've added the dot and shifted it towards the Z. If it still isn't right, you'll have to give me an example! – Loop Space Aug 5 '10 at 17:35
Andrew - +1 for the door opening instructions alone! – David Roberts Dec 14 '10 at 6:26
@David: did you not see that when I first posted it? – Loop Space Dec 14 '10 at 21:04
Little late to tell you so, but no. – David Roberts Jan 5 '11 at 11:37

Put these guys in your preamble:

\newcommand{\po}{\ar@{}[dr]|{\text{\pigpenfont R}}}
\newcommand{\pb}{\ar@{}[dr]|{\text{\pigpenfont J}}}

This uses the package pigpen for the symbols in the middle. The \ar@{} specifies an invisible arrow, and |{-} smacks some text in the middle of it. Whenever you want a pushout (or pullback) you put \po (or \pb) in the upper left of your square. Here is some sample code:

\xymatrix{X\ar[r]\ar[d]_{i_0}\po &\ast\ar[d]\\
    X\times I\ar[r]&CX}

and here is the picture:

share|improve this answer
Good answer. I think you should say that these commands should be in the preamble instead of header, though. Header sounds more like the top of a page. – Matthew Leingang Apr 29 '11 at 16:33
Thank you! Fixed it. – Eivind Dahl Apr 29 '11 at 17:58

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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