• Re: How to read Web pages with funny backslashes?

    From Stefan Ram@21:1/5 to Stefan Ram on Wed Jul 31 13:56:47 2024
    ram@zedat.fu-berlin.de (Stefan Ram) wrote or quoted:
    |\[ \eta_{\mu\nu}=\begin{pmatrix}-1&0&0&0\\0&1&0&0\\0&0&1&0 . . .

    Now I see that it seems to be required to activate JavaScript
    in the browser as the source code of the HTML web page is:

    |<p><script type="text/x-mathjax-config">
    | MathJax.Hub.Config({
    | extensions: ["tex2jax.js"],
    | jax: ["input/TeX","output/HTML-css"],
    | tex2jax: {inlineMath: [["$","$"],["\\(","\\)"]]}
    | });
    |</script>
    |<script type="text/javascript" src="/mathjax/MathJax.js"></script>
    |
    |Here's something that caused me undue confusion over the
    |years as I was learning about tensors.</p>
    |
    |<p>Many textbooks, for instance, will tell you that the
    |metric tensor of special relativity takes a form like</p>
    |
    |<p>\[
    |\eta_{\mu\nu}=\begin{pmatrix}-1&amp;0&amp;0&amp;0\\0&amp;1&amp;0 . . .
    |\]</p>

    . Still, it would be interesting if anyone could comment
    on what "dialect" of TeX/LaTeX is used there and how one
    could format it using an implementation of TeX or LaTeX!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stefan Ram@21:1/5 to across this webpage that on Wed Jul 31 13:36:19 2024
    I'm totally out of the loop with what the young'uns are up
    to on the interwebs these days. The other day I stumbled
    across this webpage that said:

    |Many textbooks, for instance, will tell you that the metric
    |tensor of special relativity takes a form like
    |
    |\[ \eta_{\mu\nu}=\begin{pmatrix}-1&0&0&0\\0&1&0&0\\0&0&1&0 . . .

    How am I supposed to make heads or tails of this? I figured
    it was meant to be LaTeX, so I tried to copy it into LaTeX as,

    |\documentclass[a4paper]{article}
    |\begin{document}
    |Here's something that caused me undue confusion over the years . . .
    |Many textbooks, for instance, will tell you that the metric . . .
    |\[ \eta_{\mu\nu}=\begin{pmatrix}-1&0&0&0\\0&1&0&0\\0&0&1&0\\ . . .

    , but I got hit with:

    |! Misplaced alignment tab character &.
    |l.12 \[ \eta_{\mu\nu}=\begin{pmatrix}-1&
    | 0&0&0\\0&1&0&0\\0&0&1&0\\0& . . .
    |
    |?

    .

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stefan Ram@21:1/5 to Marc Olschok on Wed Jul 31 22:51:17 2024
    nobody@nowhere.invalid (Marc Olschok) wrote or quoted:
    It is ordinary LaTeX inside the \[ ... \] marks (if you happen to use >math.stackechange or mathoverflow ore the nlab etc. you probably have
    already seen this). The strange thing is that the & inside the matrix
    are replaced by the &amp; , so they will display as & but of course not >compile. I do not know if this is meant to be this way or an error on
    the web page.

    Oh, that only happened because I showed the HTML source code
    of the webpage in my second post. But the problem still exists
    even if you replace "&amp;" with "&".

    In the meantime, I asked my buddy, the chatbot, to convert it
    into acceptable LaTeX for me, and he nailed it! His trick? He
    added a "\usepackage{amsmath}"!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marc Olschok@21:1/5 to All on Wed Jul 31 22:33:21 2024
    On Wed, 31 Jul 2024 15:56:47 Stefan Ram wrote:
    ram@zedat.fu-berlin.de (Stefan Ram) wrote or quoted:
    |\[ \eta_{\mu\nu}=\begin{pmatrix}-1&0&0&0\\0&1&0&0\\0&0&1&0 . . .

    Now I see that it seems to be required to activate JavaScript
    in the browser as the source code of the HTML web page is:

    |<p><script type="text/x-mathjax-config">
    | MathJax.Hub.Config({
    | extensions: ["tex2jax.js"],
    | jax: ["input/TeX","output/HTML-css"],
    | tex2jax: {inlineMath: [["$","$"],["\\(","\\)"]]}
    | });
    |</script>
    |<script type="text/javascript" src="/mathjax/MathJax.js"></script>
    |
    |Here's something that caused me undue confusion over the
    |years as I was learning about tensors.</p>
    |
    |<p>Many textbooks, for instance, will tell you that the
    |metric tensor of special relativity takes a form like</p>
    |
    |<p>\[
    |\eta_{\mu\nu}=\begin{pmatrix}-1&amp;0&amp;0&amp;0\\0&amp;1&amp;0 . . . |\]</p>

    . Still, it would be interesting if anyone could comment
    on what "dialect" of TeX/LaTeX is used there and how one
    could format it using an implementation of TeX or LaTeX!

    It is ordinary LaTeX inside the \[ ... \] marks (if you happen to use math.stackechange or mathoverflow ore the nlab etc. you probably have
    already seen this). The strange thing is that the & inside the matrix
    are replaced by the &amp; , so they will display as & but of course not compile. I do not know if this is meant to be this way or an error on
    the web page.

    --
    M.O.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ulrich D i e z@21:1/5 to Stefan Ram on Thu Aug 1 04:40:30 2024
    Stefan Ram schrieb:

    I'm totally out of the loop with what the young'uns are up
    to on the interwebs these days. The other day I stumbled
    across this webpage that said:

    |Many textbooks, for instance, will tell you that the metric
    |tensor of special relativity takes a form like
    |
    |\[ \eta_{\mu\nu}=\begin{pmatrix}-1&0&0&0\\0&1&0&0\\0&0&1&0 . . .

    If this is mathjax and you copy paste to a text file to compile with a
    real LaTeX engine, then in the text file holding he LaTeX code you need
    to load packages so that all environments and commands are defined.

    E.g., https://de.overleaf.com/learn/latex/Matrices says that the
    environment pmatrix is defined by the package amsmath, so in the
    preamble of your LaTeX code you need to load that package, e.g., via \usepackage{amsmath}


    How am I supposed to make heads or tails of this? I figured
    it was meant to be LaTeX, so I tried to copy it into LaTeX as,

    |\documentclass[a4paper]{article}
    |\begin{document}
    |Here's something that caused me undue confusion over the years . . .
    |Many textbooks, for instance, will tell you that the metric . . .
    |\[ \eta_{\mu\nu}=\begin{pmatrix}-1&0&0&0\\0&1&0&0\\0&0&1&0\\ . . .

    , but I got hit with:

    |! Misplaced alignment tab character &.
    |l.12 \[ \eta_{\mu\nu}=\begin{pmatrix}-1&
    | 0&0&0\\0&1&0&0\\0&0&1&0\\0& . . .
    |
    |?

    .

    Is this the only error message you get?

    Sincerely

    Ulrich

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ulrich D i e z@21:1/5 to Stefan Ram on Thu Aug 1 05:07:46 2024
    Stefan Ram schrieb:

    ram@zedat.fu-berlin.de (Stefan Ram) wrote or quoted:
    |\[ \eta_{\mu\nu}=\begin{pmatrix}-1&0&0&0\\0&1&0&0\\0&0&1&0 . . .

    Now I see that it seems to be required to activate JavaScript
    in the browser as the source code of the HTML web page is:

    |<p><script type="text/x-mathjax-config">
    | MathJax.Hub.Config({
    | extensions: ["tex2jax.js"],
    | jax: ["input/TeX","output/HTML-css"],
    | tex2jax: {inlineMath: [["$","$"],["\\(","\\)"]]}
    | });
    |</script>
    |<script type="text/javascript" src="/mathjax/MathJax.js"></script>
    |
    |Here's something that caused me undue confusion over the
    |years as I was learning about tensors.</p>
    |
    |<p>Many textbooks, for instance, will tell you that the
    |metric tensor of special relativity takes a form like</p>
    |
    |<p>\[
    |\eta_{\mu\nu}=\begin{pmatrix}-1&amp;0&amp;0&amp;0\\0&amp;1&amp;0 . . . |\]</p>

    . Still, it would be interesting if anyone could comment
    on what "dialect" of TeX/LaTeX is used there and how one
    could format it using an implementation of TeX or LaTeX!

    That is a conglomerate of commands that are frequently seen in the
    source code for documents that are to be compiled by a LaTeX compiler
    like latex or lualatex or xelatex or pdflatex and that are defined in
    the LaTeX 2ε-kernel or in some packages for LaTeX 2ε.

    But, actually, this is not LaTeX 2ε code or code for whatsoever flavor
    of TeX or LaTeX at all. This is code for MathJax.

    MathJax is a JavaScript display engine for LaTeX, MathML, and AsciiMath notation. Unlike TeX, which is a print layout engine, MathJax renders
    web content that is to be displayed on some display device.

    More information about MathJax can be found at
    https://www.mathjax.org/
    https://docs.mathjax.org/en/latest/basic/mathjax.html https://docs.mathjax.org/en/latest/input/tex/index.html


    Sincerely

    Ulrich

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Axel Berger@21:1/5 to Stefan Ram on Wed Jul 31 15:59:12 2024
    Stefan Ram wrote:
    . Still, it would be interesting if anyone could comment
    on what "dialect" of TeX/LaTeX is used there and how one
    could format it using an implementation of TeX or LaTeX!

    Simple. Those look like lines inside a table. You have to provide the table(-like) environment around them.


    --
    /¯\ No | Dipl.-Ing. F. Axel Berger Tel: +49/ 221/ 7771 8067
    \ / HTML | Roald-Amundsen-Straße 2a Fax: +49/ 221/ 7771 8069
     X in | D-50829 Köln-Ossendorf http://berger-odenthal.de
    / \ Mail | -- No unannounced, large, binary attachments, please! --

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)