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.

Right now, I have two macros, \intersects and \union, that simply point back to \cap and \cup respectively. Unfortunately, to have nice typesetting in display-like environments, I need to use \bigcap and \bigcup, right? Is there any way I can define \union one way for standard use (no particular environment) and another way for anything else?

share|improve this question
6  
Not really \cup is designed for infix use (like +) \bigcup is already defined to have large/small variants and be used as a prefix operator like \sum so they have different usage not directly related to inline/display. –  David Carlisle Sep 11 '12 at 16:32
1  
David is right, but if you really want something like that, \mathpalette should be useful (AFAIR): \def\union{\mathpalette{\bigcup}{\cup}{\cup}{\cup}}. –  mbork Sep 11 '12 at 16:50
1  
@mbork But nobody would want that. –  Stephan Lehmke Sep 11 '12 at 18:04
    
I suppose that's fair. So maybe just \def something like \iunion or \iintersects for the iterative variants (\bigcup/\bigcap)? –  Sean Allred Sep 11 '12 at 20:17
    
@vermiculus: True to your question about conditional typesetting: You can test for the current environment name (stored in \@currenvir). However, this requires you to use \begin{<env>}...\end{<env>}, otherwise \[...\] might cause problems. The last example can be alleviated when using amsmath since it equates the macro to the environment. –  Werner Sep 12 '12 at 1:41

1 Answer 1

up vote 2 down vote accepted

Since no other answer has been proffered I'll extend my comment as an answer:

\cup is designed for infix use (like +) \bigcup is already defined to have large/small variants and be used as a prefix operator like \sum so they have different usage not directly related to inline/display.

Examples of usage:

enter image description here

\documentclass{article}

\textwidth.2\textwidth
\parindent0pt
\parskip\baselineskip
\begin{document}

inline cup:\\
$ a \cup b \cup c$

display cup
\[ a \cup b \cup c\]

inline bigcup\\
$\bigcup_{i=0}^3a_i$

display bigcup
\[\bigcup_{i=0}^3a_i\]

\end{document}
share|improve this answer

Your Answer

 
discard

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.