How to include contraction symbols in LaTeX

In summary, Stefan says that the CTAN package simplewick.sty provides a way to draw contraction symbols, but he ran into trouble when he tried to compile the document.
  • #1
nrqed
Science Advisor
Homework Helper
Gold Member
3,766
297
I apologize, I know this is not a QM question per se but I think I am more likely to find someone who could answer this here.

I'd like to know (or rather, be reminded of) how to draw contraction symbols in LaTeX (or TeX). I mean the symbol we use to show how two fields are "paired up" when we do perturbation theory in QFT. You know what I mean: a line that goes a bit down (or up) from a field, runs across horizontally to the second field and then goes up again (or down again).
I used to have a way to do that but when my work computer was upgraded I lost those files.

Thanks in advance.

Patrick
 
Physics news on Phys.org
  • #4
I also have the same doubt, but when I tried the way it is given in the CTAN package, and tried to compile the latex document I got the error
! Undefined control sequence.
l.27 \contraction
[2ex]{}{\phi_1}{\phi_2\phi_3}{\phi_4}
?
! Undefined control sequence.
l.28 \contraction
{\phi_1}{\phi_2}{}{\phi_3}
?

I also used their instruction generated the simplewick.sty file by latex simplewick.ins and placed it in the same directory as my original .tex fle but still the error persisted.
Is there anything else also I need to do like putting in some macros?
Please help?
 
  • #5
\contraction works fine for me with simplewick.sty, placing the style file in the same same directory should work. Perhaps you forgot \usepackage. This example is compilable:

Code:
\documentclass{article}
\usepackage{simplewick}
\begin{document}
\[
  \contraction[2ex]{}{\phi_1}{\phi_2\phi_3}{\phi_4}
\]
\end{document}

Stefan
 

1. How do I include contractions in LaTeX?

In order to include contractions in LaTeX, you can use the apostrophe symbol (') followed by the letter "s" to create the contraction. For example, "don't" would be written as "don't" in LaTeX.

2. Can I use other symbols for contractions in LaTeX?

Yes, you can use other symbols such as the backtick (`) or the tilde (~) to create contractions in LaTeX. However, it is recommended to use the apostrophe symbol for consistency.

3. How do I include contractions with accent marks in LaTeX?

To include contractions with accent marks in LaTeX, you can use the backslash (\) followed by the accent mark and then the letter "s". For example, "c'est" would be written as "c\'{e}s" in LaTeX.

4. How do I make sure the spacing is correct when using contractions in LaTeX?

To ensure proper spacing when using contractions in LaTeX, it is recommended to use the \xspace command after the contraction. This will automatically add the appropriate spacing after the contraction.

5. Can I use contractions in math mode in LaTeX?

Yes, contractions can be used in math mode in LaTeX. However, it is important to use the appropriate math symbols and not the apostrophe symbol. For example, "don't" would be written as "don \cdot t" in math mode.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
13
Views
369
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
Replies
10
Views
636
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
4K
Replies
17
Views
2K
  • Linear and Abstract Algebra
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
3K
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
6K
Replies
63
Views
3K
Back
Top