2

I’m currently trying to write down the structure of contractions in higher order expansions. In doing so, I need multiple contractions ending/starting at the same variable. E.g., I would like to have a contraction of the type \wick{\c1 A \c1 \c2 B \c2 C} as one should be able to write in the simpler-wick package. Unfortunately, it cannot compiled like that. I even need multiple contractions of an object with itself, in the spirit of \wick{\c1 \c2 \c2 \c1 A}. Does someone have a simple solution to this? Thank you in advance.

Sandy G
  • 42,558

1 Answers1

1

Here is a partial solution.

enter image description here

I defined a command \self that can be used inside a \wick command. The command \self takes two arguments. The first is a number as you would use inside a \wick. It should be distinct from other wick numbers. The second argument is the character to be self-contracted.

The image above is created with the code

\wick{\c1B\self{2}{A}\c1B}\quad\wick{\c2B\self{1}{A}\c2B}

First the Bs are contracted by \c1 and the A is self-contracted with the 2. Then the reverse numbering is used.

Here is the complete code:

\documentclass{article}

\usepackage{simpler-wick}

\newlength{\wdth}
\newcommand{\self}[2]{\settowidth{\wdth}{#2}#2\hspace{-.5\wdth}\c#1{\vphantom{#2}}\c#1{\vphantom{#2}}\hspace{.5\wdth}}

\begin{document}

\begin{equation}
 \wick{\c1B\self{2}{A}\c1B}\quad\wick{\c2B\self{1}{A}\c2B}
\end{equation}

\end{document}

Basically, \self backspaces half the width of the character, makes the contraction on a \vphantom of the character (which has the same height as the character but no width) and then forward-spaces half the width again.

Note, you cannot nest \self with itself. So this solution will not allow multiple self contractions.

Sandy G
  • 42,558
  • Thank you so much! vphantom is exactly what I’m looking for. It allows to create as many copies of the character. It solves all my problems, I think. – michael hott Jun 06 '20 at 16:01
  • Sorry, how do you use vphantom to get multiple contractions on the same variable? I am getting a tikz error? – Andrew Hardy Jul 08 '22 at 15:23