7
$\begingroup$

Problem

In the PSQ How to prove $\sqrt{6+2\sqrt{7+3\sqrt{8+\cdots}}}=4$?, I observe that the vertical separations above and below the middle square root sign are uneven.

\sqrt{6+2\sqrt{7+3\sqrt{8+\cdots}}}

error screenshot
Screenshot taken using Firefox 84.0.2 (64-bit) on Ubuntu 20.04

Is there a way to make the two vertical separations look even?

Effort

It seems fine in \displaystyle when it's rendered from editor preview.

$$\sqrt{6+2\sqrt{7+3\sqrt{8+\cdots}}}$$

screenshot including answer
Screenshot taken using same browser on same OS as above

$\endgroup$
7
  • 1
    $\begingroup$ As this has floated to the top again, I thought I should say: I dislike question titles which are all MathJax and no text. I tend to open questions by right-clicking on their titles, and this is not possible with all-MathJax titles. $\endgroup$ – user1729 Feb 16 at 13:42
  • 1
    $\begingroup$ @user1729 Thanks for feedback. Next time, I'd try "I have a $\sqrt{\text{Nested} \sqrt{\text{root} \sqrt{\text{problem}}}}$". $\endgroup$ – GNUSupporter 8964民主女神 地下教會 Feb 16 at 15:52
  • 2
    $\begingroup$ @user1729 On a related note, main site questions with any MathJax in the title are blocked by the HNQ algorithm, which has a very distorting affect on which Math SE questions end up appearing on the HNQ list. See meta.stackexchange.com/q/237475/334566 & meta.stackexchange.com/q/60756/334566 $\endgroup$ – PM 2Ring Feb 18 at 11:03
  • $\begingroup$ @user1729 Re my answer/response to your comment, even if you already knew this info, perhaps other mathSE reviewers did not. $\endgroup$ – user2661923 Feb 26 at 10:01
  • 1
    $\begingroup$ @user1729, relatable, I usually right-click on questions and hit Open in New Tab so that I can still browse through more questions while I have the questions I want to look at ready to look at $\endgroup$ – Some Guy Feb 26 at 21:46
  • $\begingroup$ I might be going off on a tangent here, but could someone help with writing code to approximate such expressions? $\endgroup$ – F.N. Feb 27 at 6:49
  • 1
    $\begingroup$ @F.N. on the main site, we have an approximation tag for questions about approximating a value. $\endgroup$ – GNUSupporter 8964民主女神 地下教會 Mar 1 at 8:04
10
$\begingroup$

Another option is to use \mathstrut, eg $\sqrt{ 6+2\sqrt{ 7+3\sqrt{\mathstrut 8+\cdots}}}$, which is produced from $\sqrt{ 6+2\sqrt{ 7+3\sqrt{\mathstrut 8+\cdots}}}$.

$\endgroup$
1
2
$\begingroup$

One-line solution $\sqrt{\vphantom{\bigcup} 6+2\sqrt{\vphantom{\bigcup} 7+3\sqrt{\vphantom{\bigcup} 8+\cdots}}}$ using \vphantom{\bigcup}:
$\sqrt{\vphantom{\bigcup} 6+2\sqrt{\vphantom{\bigcup} 7+3\sqrt{\vphantom{\bigcup} 8+\cdots}}}$

$\endgroup$
1
  • $\begingroup$ I might be going off on a tangent here, but could you help with writing code to approximate such expressions? $\endgroup$ – F.N. Feb 27 at 6:49
2
$\begingroup$

tl;dr Using \mathstrut or/and \displaystyle might help.


Comparisons:$$ \begin{array}{rcc} \textbf{Normal:} & \sqrt{6 + 2\sqrt{7 + 3\sqrt{8+\cdots}}} & \left(1\right) \\ \textbf{With}~\texttt{\mathstrut}\textbf{:} & \sqrt{6 + 2\sqrt{7 + 3\sqrt{\mathstrut 8 + \cdots}}} & \left(2\right) \\ \textbf{With}~\texttt{\displaystyle}\textbf{:} & {\displaystyle \sqrt{6 + 2 \sqrt{7 + 3\sqrt{8 + \cdots}}}} & \left(3\right) \\ \begin{array}{r}\textbf{With}~\texttt{\mathstrut} \\[-25px]\textbf{and}~\texttt{\displaystyle}\end{array}\textbf{:} & {\displaystyle \sqrt{6 + 2 \sqrt{7 + 3\sqrt{\mathstrut 8 + \cdots}}}} & \left(4\right) \end{array} _{.} $$

$\mathrm{\TeX} :$

  1. Normal:
    \sqrt{6 + 2\sqrt{7 + 3\sqrt{8+\cdots}}}

  2. With \mathstrut:
    \sqrt{6 + 2\sqrt{7 + 3\sqrt{\mathstrut 8 + \cdots}}}

  3. With \displaystyle:
    \displaystyle \sqrt{6 + 2 \sqrt{7 + 3\sqrt{8 + \cdots}}}

  4. With \mathstrut and \displaystyle:
    \displaystyle \sqrt{6 + 2 \sqrt{7 + 3\sqrt{\mathstrut 8 + \cdots}}}

$\endgroup$
1
  • $\begingroup$ Just in case anyone else was curious what they looked like side-by-side. $\endgroup$ – Nat Feb 16 at 13:17
1
$\begingroup$

tl;dr This answer plays with spacing just for fun.


@PM2Ring's answer suggested \mathstrut, then @GNUSupporter8964民主女神地下教會's answer tried constructing a similar mechanism through \vphantom{\bigcup}.

So, in that spirit and just for fun, trying \vphantom with differing heights, mostly just to see what they look like: $$ {\def\Spacing#1{\vphantom{\rule{0em}{#1em}}}} {\def\Example#1#2{ {#2{\sqrt{6 + 2 \sqrt{7 + 3\sqrt{\Spacing{#1} 8 + \cdots}}}}}}} {\def\Row#1{\\ \text{#1} & \Example{#1}{} & \Example{#1}{\displaystyle}}} \begin{array}{lcc} \begin{array}{c}\textbf{Height} \\[-25px] \left(\texttt{em}\right)\end{array} & \begin{array}{c}\textbf{Rendering, without} \\[-25px] \texttt{\displaystyle} \end{array} & \begin{array}{c}\textbf{Rendering, with} \\[-25px] \texttt{\displaystyle} \end{array} \Row{0} \Row{0.5} \Row{0.75} \Row{0.9} \Row{1} \Row{1.1} \Row{1.25} \Row{1.5} \Row{2} \end{array} _{.} $$

Each line is $$ \boxed{ \begin{array}{l} \color{blue}{\overbrace{\texttt{\displaystyle}}^{\text{with or without}}} ~\texttt{\{\sqrt\{6 + 2 \\sqrt\{7 + 3} \\[0.5em] \texttt{\\sqrt\{} \color{red}{\texttt{\\vphantom\{\\rule\{0em\}}} \color{red}{\underbrace{\texttt{\{}x~\texttt{em\}}}_{\begin{array}{c}\text{height} \\[-25px] \text{value}\end{array}} \texttt{\}}} ~\texttt{8 + \\cdots\}\}\}\}\}} \end{array} }_{,} $$ with the coloring for the $\color{blue}{\texttt{\\displaystyle}}$ and ${\color{red}{\textbf{height}}}$ parts.

$\endgroup$
5
  • 1
    $\begingroup$ This is maybe the fifth most silly, pointless thing I've done with $\mathrm{\TeX}$ on StackExchange so far. $\endgroup$ – Nat Feb 16 at 14:28
  • $\begingroup$ Just a little suggestion for the future: using markdown table would be better as every browser knows that its a table. $\endgroup$ – GNUSupporter 8964民主女神 地下教會 Feb 16 at 15:04
  • $\begingroup$ @GNUSupporter8964民主女神地下教會: I'm glad that they finally added support for $\text{non-}\mathrm{\TeX}$ tables! And I can see the potential advantage in using a simpler markup for a common presentation format like a table, perhaps making it easier for stuff like screen-readers. That said, would there be a potential advantage in a case like this? The content would seem fairly inaccessible to a screen-reader, with-or-without the table structure being a recognizable thing. $\endgroup$ – Nat Feb 16 at 15:10
  • $\begingroup$ Note: I'm of the position that semantic AI-assistants will be a near-term technology, rendering programmer-compliance irrelevant in the foreseeable future. So I'm generally skeptical of the idea that we should reach too far to make this stuff work, as an AI-assisted reader should view the content and redescribe to the reader as they prefer (including with respect to their preferred language and conceptual skillset), without need for content-providers to specify how this process should be done. (Sorta like an improved Word Lens.) $\endgroup$ – Nat Feb 16 at 15:14
  • $\begingroup$ Thx for response. I see your point. Let machines do mechanical stuff. In general, I observe a "syntactic simplicity–control over display" trade off. In this case, using a Markdown table gives no advantage to human readers (using assistive technologies or not), and the syntax doesn't seem easier: each column is seperated by one character. The syntactic complexity of the LaTeX code in each cell dominates that of the Markdown table. $\endgroup$ – GNUSupporter 8964民主女神 地下教會 Feb 16 at 15:59
1
$\begingroup$

Info too long-winded for a comment:

I dislike question titles which are all MathJax and no text. I tend to open questions by right-clicking on their titles, and this is not possible with all-MathJax titles.

Firefox browser remedy
(may work with other browsers)

  1. Locate mouse just to the right of the query

  2. right-click and choose inspect element from the pop-up menu

  3. At this point, I have always had the inspection windows open up, with the (lower left pane) having the focus specifically on a compressed portion of the html code

  4. Assuming you have the same experience, you can leave the mouse-focus as is, right-click the mouse, and then choose expand all

  5. In the expanded area, one or two lines after the line that now has the mouse focus, you should see ...href="...".

  6. Place the mouse focus inside the link, mouse-right-click, and then choose Copy Link Address.

  7. Then close the Developer Tool Panes, manually go to a blank webpage, and then paste in the copied Link.

$\endgroup$
1

You must log in to answer this question.

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