4

I tried

\newcommand{\pathint}{\mathrel{\int\!\!\!\!\!\!\!\sim}}

It looks Ok, but it does not hold integration limits right.

3
  • 1
    Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}.
    – cfr
    Jan 1, 2015 at 3:16
  • Does this question help?
    – cfr
    Jan 1, 2015 at 3:17
  • Also, there's a closed path integral \oint, and other integration symbols from other packages given in the Comprehensive LaTeX Symbol List linked from cfr's comment. Jan 1, 2015 at 3:22

1 Answer 1

7

I assume you're looking for a version of the Principal Value Integral symbol, but with the centered "dash" symbol replaced with a "tilde" or \sim. Building on some code given in an earlier answer, you could define a macro called \simint using the code given below.

enter image description here

\documentclass{article}
\def\Yint#1{\mathchoice
    {\YYint\displaystyle\textstyle{#1}}%
    {\YYint\textstyle\scriptstyle{#1}}%
    {\YYint\scriptstyle\scriptscriptstyle{#1}}%
    {\YYint\scriptscriptstyle\scriptscriptstyle{#1}}%
      \!\int}
\def\YYint#1#2#3{{\setbox0=\hbox{$#1{#2#3}{\int}$}
    \vcenter{\hbox{$#2#3$}}\kern-.52\wd0}}

\def\simint{\Yint\sim}

\begin{document}
$
 \displaystyle 
 \simint_a^b f \quad
 \simint\limits_a^b f \quad
 \textstyle 
 \simint_a^b f
$
\end{document}
2
  • Mico: Thank you so much! This piece of code is simply beautiful. I really enjoyed reading it. And it works great in my LyX! I only finetuned it a bit by changing -.52 to -.50. Thanks again and Happy New Year!
    – MirOdin
    Jan 1, 2015 at 9:56
  • @VladimirVolodin - Glad to know the code is useful. :-) By the way, if you want to reduce slightly the size of the \sim symbol that crosses the \int symbol, you could change \textstyle{#1} to \scriptstyle{#1}, and \scriptstyle{#1} to \scriptscriptstyle{#1}, in the definition of the \Yint macro.
    – Mico
    Jan 1, 2015 at 12:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .