# Math Mode Pipe around Fractions

**URL:** <https://forum.obsidian.md/t/math-mode-pipe-around-fractions/53632>\
**Category:** Help\
**Tags:** math\
**Created:** [February 2, 2023, 3:37pm UTC](https://forum.obsidian.md/t/math-mode-pipe-around-fractions/53632 "2023-02-02T15:37:03Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![bencc](https://forum.obsidian.md/user_avatar/forum.obsidian.md/bencc/32/35864_2.png) [@bencc](https://forum.obsidian.md/u/bencc)\
**Post date:** [February 2, 2023, 3:37pm UTC](https://forum.obsidian.md/t/math-mode-pipe-around-fractions/53632/1 "2023-02-02T15:37:03Z")

</div>

### Things I have tried

Hi, I’ve had a look on this forum and elsewhere but i can’t seem to find anything related to this.

### What I’m trying to do

I am trying to display two pipes around a fraction in math mode. This of course works normally using just:

```auto
$ |\dfrac{a}{b}| $

```

 ![image](https://forum.obsidian.md/uploads/default/original/3X/c/9/c95a00d28755dd8204b5895fe5dede702c8469e3.png)

The problem is when i try to use `\left` and `\right`, the pipes dissappear instead of getting taller.

 ![image](https://forum.obsidian.md/uploads/default/original/3X/c/0/c003bd4eaaf9bf2257fe9a971cdee67ec6d1d63a.png)  
The same happens when using `\vert` instead of just the pipe character.

I’m not sure if this is a rendering bug with mathjax or latex but I couldn’t find anything on google about this happening to anyone else.

The weird thing is the pipe is taking up space because I can see the block getting taller in live preview. Same happens with using `\bigg{|}` which works with other characters like `[` and `(` but just not pipes.

Thanks in advance if anyone has any suggestions.

---

<div class="post-metadata">

**Author:** ![TheMathGuyd](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/t/f1d935/32.png) [@TheMathGuyd](https://forum.obsidian.md/u/TheMathGuyd)\
**Post date:** [February 2, 2023, 8:53pm UTC](https://forum.obsidian.md/t/math-mode-pipe-around-fractions/53632/2 "2023-02-02T20:53:08Z")

</div>

> [@bencc](#):
>
> `$ |\dfrac{a}{b}| $`

Best to use this. It uses `\vert` in `\left` and `\right` pair, to adjust height to be appropriate for the fraction, like you want.

`$\left\vert\dfrac{a}{b}\right\vert$`

Here is a photo of the result:  
 ![Screenshot 2023-02-02 at 1.53.45 PM](https://forum.obsidian.md/uploads/default/original/3X/5/6/56072015a63f8c104e0d62b157dc2b132df39b51.png)

---

<div class="post-metadata">

**Author:** ![bencc](https://forum.obsidian.md/user_avatar/forum.obsidian.md/bencc/32/35864_2.png) [@bencc](https://forum.obsidian.md/u/bencc)\
**Post date:** [February 2, 2023, 11:12pm UTC](https://forum.obsidian.md/t/math-mode-pipe-around-fractions/53632/3 "2023-02-02T23:12:14Z")

</div>

Thanks for the reply, that’s one of the things I tried. The pipes don’t display for me.

 ![image](https://forum.obsidian.md/uploads/default/original/3X/1/5/1527060ac4eca5fd282559b655c2cc1d8f963fb7.png)  
I just double checked it in the sandbox vault and it’s not displaying there either.  
There must be a bug with obsidian on my laptop cause its actually displaying fine on my phone.  
Strange!

---

<div class="post-metadata">

**Author:** ![bencc](https://forum.obsidian.md/user_avatar/forum.obsidian.md/bencc/32/35864_2.png) [@bencc](https://forum.obsidian.md/u/bencc)\
**Post date:** [February 2, 2023, 11:41pm UTC](https://forum.obsidian.md/t/math-mode-pipe-around-fractions/53632/4 "2023-02-02T23:41:25Z")

</div>

Okay so I’ve done some tinkering and created a css snippet that seems to fix it.

```css
.MathJax mjx-stretchy-v > mjx-ext {
	overflow: visible overlay;
}

```

Inspecting the default css shows that this was originally:

```css
.MathJax mjx-stretchy-v > mjx-ext {
	overflow: visible clip;
}

```

I still have no idea how this is only happing to me and not @TheMathGuyd

---

<div class="post-metadata">

**Author:** ![saf-dmitry](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/s/b5e925/32.png) [@saf-dmitry](https://forum.obsidian.md/u/saf-dmitry)\
**Post date:** [February 3, 2023, 2:27pm UTC](https://forum.obsidian.md/t/math-mode-pipe-around-fractions/53632/5 "2023-02-03T14:27:25Z")

</div>

Related topic:

> [@Math Latex symbols not rendered/invisible at some zoom level](https://forum.obsidian.md/t/math-latex-symbols-not-rendered-invisible-at-some-zoom-level/32880):
>
> At some zoom level, some subscript/superscript or underline/overline are invisible. This is known upstream bug of mathjax, likely to be an upstream bug in the browser.

---

<div class="post-metadata">

**Author:** ![TheMathGuyd](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/t/f1d935/32.png) [@TheMathGuyd](https://forum.obsidian.md/u/TheMathGuyd)\
**Post date:** [February 3, 2023, 7:50pm UTC](https://forum.obsidian.md/t/math-mode-pipe-around-fractions/53632/7 "2023-02-03T19:50:16Z")

</div>

I’m sorry you are having this issue. I cannot recreate it on my machine (MacOS Ventura)

Is it perhaps OS specific?

---

<div class="post-metadata">

**Author:** ![bencc](https://forum.obsidian.md/user_avatar/forum.obsidian.md/bencc/32/35864_2.png) [@bencc](https://forum.obsidian.md/u/bencc)\
**Post date:** [February 4, 2023, 3:22pm UTC](https://forum.obsidian.md/t/math-mode-pipe-around-fractions/53632/8 "2023-02-04T15:22:56Z")

</div>

Thanks for linking this, its definitely the same problem. Increasing the font weight for the pipes fixes it.

```css
mjx-stretchy-v > mjx-ext {
  font-weight: 800
}

```

The other snippet i posted added tiny scroll bars to the pipes so wasn’t ideal.  
I’ll close this now. Thanks everyone.

---

<div class="post-metadata">

**Author:** ![system](https://forum.obsidian.md/uploads/default/original/3X/b/e/bec35fbd23ab28909bb6bfe62cb32eb82dd34019.png) [@system](https://forum.obsidian.md/u/system)\
**Post date:** [February 11, 2023, 3:23pm UTC](https://forum.obsidian.md/t/math-mode-pipe-around-fractions/53632/9 "2023-02-11T15:23:30Z")

</div>

Closed on February 11, 2023, 3:23pm UTC

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
