1

I have defined a graph operation which is somehow related to the graph union operation. I want the operation to look like in the figure below. figure

I will use the operation several times so I would like to be able to put different characters inside the union symbol. I have tried to produce the result by manipulating the code given by the user named egreg in this post but I was not successful. Any ideas on how could I produce such an operation?

  • What if the index is j? What should be in the middle of the union symbol? – egreg Mar 25 '20 at 16:17
  • @egreg The indices of the graphs on which the operation is performed may or may not depend on what is in the middle of the union symbol. What you see in the picture happens to be what I might need in one of the theorems. For example, at some point I will need something where the operation is performed on two graphs which do not have index and the letter in the middle of the union operation is 2. – Kristina Dedndreaj Mar 25 '20 at 16:24

1 Answers1

2

Based on my answer at Combine two symbols to one fully scalable, I provide \cuplet[] and \bigcuplet[], where the optional argument (default i) is the embedded variable. To get limits, I just append \limits... to the usage.

\documentclass[a4paper,10pt]{article}
\usepackage{stackengine,scalerel}
\newcommand{\bigcuplet}[1][i]{\mathop{\ThisStyle{%
  \ensurestackMath{\stackinset{c}{}{c}{+.3\LMex}{#1}{\SavedStyle\bigcup}}}}}
\newcommand{\cuplet}[1][i]{\mathop{\ThisStyle{%
  \ensurestackMath{\stackinset{c}{.3\LMpt}{c}{0\LMpt}{\SavedStyle^{#1}}{\SavedStyle\cup}}}}}
\begin{document}

\[
G_i \bigcuplet\limits_{i=1}^n G_{i+1}\hspace{20pt}
\scriptstyle G_j \bigcuplet[j]\limits_{j=1}^n G_{j+1}\hspace{20pt}
\scriptscriptstyle G_k \bigcuplet[k]\limits_{k=1}^n G_{k+1}
\]

\[
G_i \cuplet\limits_{i=1}^n G_{i+1}\hspace{20pt}
\scriptstyle G_j \cuplet[j]\limits_{j=1}^n G_{j+1}\hspace{20pt}
\scriptscriptstyle G_k \cuplet[k]\limits_{k=1}^n G_{k+1}
\]
\end{document}

enter image description here

  • Is there any way to define an operation where the symbol within the union symbol can be given at each use? For example, something like \cuplet[2] which means that the symbol within the union symbol will be two. As I said in the post, this operation will be used many times and I would not like to have to define a new operation each time I use it. – Kristina Dedndreaj Mar 25 '20 at 16:44
  • @KristinaDedndreaj It does what you already suggested: \cuplet[2] puts a 2 inside the cup. If you prefer making the argument mandatory (to be used with curly rather than square braces), just remove the [i] from the definitions optional specification. – Steven B. Segletes Mar 25 '20 at 16:51
  • Oh, I should have checked that before commenting. One last thing, is it possible to make the union symbol at \cuplet a little bigger so that the letter inside it does not fit tightly? – Kristina Dedndreaj Mar 25 '20 at 17:06
  • @KristinaDedndreaj It is not easy to make \cuplet bigger (other than going to \bigcuplet). On could with some ease make the embedded letter smaller (via \scalebox for example). Recall though, the middle and right side of my image are using \scriptstyle and \scriptscriptstyle, which is certainly not the norm you will be dealing with. The left hand images are really the reference images. – Steven B. Segletes Mar 25 '20 at 17:09
  • @KristinaDedndreaj Actually, you can scale the cup, as well. Try this: \newcommand{\cuplet}[1][i]{\mathop{\ThisStyle{\ensurestackMath{\stackinset{c}{.3\LMpt}{c}{0\LMpt}{\SavedStyle^{#1}}{\scaleobj{1.2}{\cup}}}}}} – Steven B. Segletes Mar 25 '20 at 17:11
  • 1
    Thank you, it is perfect! Unfortunately I do not have enough reputation to upvote your answer. – Kristina Dedndreaj Mar 25 '20 at 17:16
  • @KristinaDedndreaj That's OK. Glad I could be of assistance. – Steven B. Segletes Mar 25 '20 at 17:43
  • @KristinaDedndreaj I vote for Steven instead of you :-) – Sebastiano Mar 25 '20 at 22:17
  • As always, thank you @Sebastiano. – Steven B. Segletes Mar 25 '20 at 22:57
  • @StevenB.Segletes aahahah...no thank you...please...because what I've always done comes from my heart and not from my head. – Sebastiano Mar 25 '20 at 22:59
  • @Sebastiano Thank you! – Kristina Dedndreaj Mar 26 '20 at 21:12
  • @KristinaDedndreaj Also you have received my upvoted :-)...here we are a great and solid group!!! – Sebastiano Mar 26 '20 at 22:40
  • @Sebastiano It is great when those who have greater knowledge share it with us. – Kristina Dedndreaj Mar 30 '20 at 19:32