Rocksolid Light

News from da outaworlds

mail  files  register  groups  login

Message-ID:  

Abandon the search for Truth; settle for a good fantasy.


comp / comp.text.tex / Re: How to read Web pages with funny backslashes?

SubjectAuthor
* How to read Web pages with funny backslashes?Stefan Ram
+* Re: How to read Web pages with funny backslashes?Stefan Ram
|+- Re: How to read Web pages with funny backslashes?Axel Berger
|+* Re: How to read Web pages with funny backslashes?Marc Olschok
||`- Re: How to read Web pages with funny backslashes?Stefan Ram
|`- Re: How to read Web pages with funny backslashes?Ulrich D i e z
`- Re: How to read Web pages with funny backslashes?Ulrich D i e z

1
Subject: How to read Web pages with funny backslashes?
From: Stefan Ram
Newsgroups: comp.text.tex
Organization: Stefan Ram
Date: Wed, 31 Jul 2024 13:36 UTC
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!fu-berlin.de!uni-berlin.de!not-for-mail
From: ram@zedat.fu-berlin.de (Stefan Ram)
Newsgroups: comp.text.tex
Subject: How to read Web pages with funny backslashes?
Date: 31 Jul 2024 13:36:19 GMT
Organization: Stefan Ram
Lines: 27
Expires: 1 Jul 2025 11:59:58 GMT
Message-ID: <webpage-20240731143147@ram.dialup.fu-berlin.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: news.uni-berlin.de Yu32hSt+KAZ1G81a4linpQcvD3OeXnA+Ow9c619Ly/dsMq
Cancel-Lock: sha1:zcPHsODe1EWPHuaEOxowJiqEJ70= sha256:UVEJz6l1FTCaVn+XK05ak8xJqtpqnYplszipM1GS8UU=
X-Copyright: (C) Copyright 2024 Stefan Ram. All rights reserved.
Distribution through any means other than regular usenet
channels is forbidden. It is forbidden to publish this
article in the Web, to change URIs of this article into links,
and to transfer the body without this notice, but quotations
of parts in other Usenet posts are allowed.
X-No-Archive: Yes
Archive: no
X-No-Archive-Readme: "X-No-Archive" is set, because this prevents some
services to mirror the article in the web. But the article may
be kept on a Usenet archive server with only NNTP access.
X-No-Html: yes
Content-Language: en-US
View all headers

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& . . .
| |?

.

Subject: Re: How to read Web pages with funny backslashes?
From: Stefan Ram
Newsgroups: comp.text.tex
Organization: Stefan Ram
Date: Wed, 31 Jul 2024 13:56 UTC
References: 1
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!fu-berlin.de!uni-berlin.de!not-for-mail
From: ram@zedat.fu-berlin.de (Stefan Ram)
Newsgroups: comp.text.tex
Subject: Re: How to read Web pages with funny backslashes?
Date: 31 Jul 2024 13:56:47 GMT
Organization: Stefan Ram
Lines: 28
Expires: 1 Jul 2025 11:59:58 GMT
Message-ID: <JavaScript-20240731145623@ram.dialup.fu-berlin.de>
References: <webpage-20240731143147@ram.dialup.fu-berlin.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: news.uni-berlin.de Uc8CaESii0SLt6Uoon9R2gfwbMBxdAevud/nfABOV8gTJy
Cancel-Lock: sha1:moPLNelwPYFx/EpUp4n2kqhHcY8= sha256:PwXPGKFGIa7d/Mn1jKXxTPU0CTPMXv9favWLQ2VBNN8=
X-Copyright: (C) Copyright 2024 Stefan Ram. All rights reserved.
Distribution through any means other than regular usenet
channels is forbidden. It is forbidden to publish this
article in the Web, to change URIs of this article into links,
and to transfer the body without this notice, but quotations
of parts in other Usenet posts are allowed.
X-No-Archive: Yes
Archive: no
X-No-Archive-Readme: "X-No-Archive" is set, because this prevents some
services to mirror the article in the web. But the article may
be kept on a Usenet archive server with only NNTP access.
X-No-Html: yes
Content-Language: en-US
View all headers

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!

Subject: Re: How to read Web pages with funny backslashes?
From: Axel Berger
Newsgroups: comp.text.tex
Date: Wed, 31 Jul 2024 13:59 UTC
References: 1 2
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: Spam@Berger-Odenthal.De (Axel Berger)
Newsgroups: comp.text.tex
Subject: Re: How to read Web pages with funny backslashes?
Date: Wed, 31 Jul 2024 15:59:12 +0200
Lines: 15
Message-ID: <66AA4330.BF2B0C8E@Berger-Odenthal.De>
References: <webpage-20240731143147@ram.dialup.fu-berlin.de> <JavaScript-20240731145623@ram.dialup.fu-berlin.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: individual.net q6YyPbWARimp6cbsjl/KsQfXQzE9VqmH7oW5izyfEcoJZGnYRi
Cancel-Lock: sha1:+teX4plWxhxuS1PDV2dYQEGZuEM= sha256:aXs5wFIl60A4lL/8b2N8eySPuNKIXMBV83lzJ8B0xUE=
X-Mailer: Mozilla 4.8 [en] (Win98; U)
X-Accept-Language: en,de,nl,es,fr
View all headers

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! --

Subject: Re: How to read Web pages with funny backslashes?
From: Marc Olschok
Newsgroups: comp.text.tex
Date: Wed, 31 Jul 2024 22:33 UTC
References: 1 2
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From: nobody@nowhere.invalid (Marc Olschok)
Newsgroups: comp.text.tex
Subject: Re: How to read Web pages with funny backslashes?
Date: Wed, 31 Jul 2024 22:33:21 -0000 (UTC)
Sender: <marc@darkstar.home.org>
Message-ID: <v8ee3h$k9gv$2@solani.org>
References: <webpage-20240731143147@ram.dialup.fu-berlin.de> <JavaScript-20240731145623@ram.dialup.fu-berlin.de>
Injection-Date: Wed, 31 Jul 2024 22:33:21 -0000 (UTC)
Injection-Info: solani.org;
logging-data="665119"; mail-complaints-to="abuse@news.solani.org"
User-Agent: tin/2.4.4-20191224 ("Millburn") (Linux/2.6.33.4 (i686))
Cancel-Lock: sha1:EniJFN5im8bMU/GMVaZXYcGcRTg=
X-User-ID: eJwFwYEBwCAIA7CXVlfacQ6i/H/CkngFtakQY2KcORfPqln7sDFdmy7RH5O3oOshjkF0q34mZBFh
View all headers

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.

Subject: Re: How to read Web pages with funny backslashes?
From: Stefan Ram
Newsgroups: comp.text.tex
Organization: Stefan Ram
Date: Wed, 31 Jul 2024 22:51 UTC
References: 1 2 3
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!fu-berlin.de!uni-berlin.de!not-for-mail
From: ram@zedat.fu-berlin.de (Stefan Ram)
Newsgroups: comp.text.tex
Subject: Re: How to read Web pages with funny backslashes?
Date: 31 Jul 2024 22:51:17 GMT
Organization: Stefan Ram
Lines: 15
Expires: 1 Jul 2025 11:59:58 GMT
Message-ID: <amsmath-20240731234952@ram.dialup.fu-berlin.de>
References: <webpage-20240731143147@ram.dialup.fu-berlin.de> <JavaScript-20240731145623@ram.dialup.fu-berlin.de> <v8ee3h$k9gv$2@solani.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: news.uni-berlin.de aOoXbUda125svNmvxBp6lwm//6DzAZIkXenXTtygiu13gB
Cancel-Lock: sha1:XRyHiLqnNFT0Eua9JZxoS1yodiY= sha256:g1f7685cDggowyelyO3OGpejlSavzagzZF9K8ZDjeU0=
X-Copyright: (C) Copyright 2024 Stefan Ram. All rights reserved.
Distribution through any means other than regular usenet
channels is forbidden. It is forbidden to publish this
article in the Web, to change URIs of this article into links,
and to transfer the body without this notice, but quotations
of parts in other Usenet posts are allowed.
X-No-Archive: Yes
Archive: no
X-No-Archive-Readme: "X-No-Archive" is set, because this prevents some
services to mirror the article in the web. But the article may
be kept on a Usenet archive server with only NNTP access.
X-No-Html: yes
Content-Language: en-US
View all headers

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}"!

Subject: Re: How to read Web pages with funny backslashes?
From: Ulrich D i e z
Newsgroups: comp.text.tex
Date: Thu, 1 Aug 2024 02:40 UTC
References: 1
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From: ud.usenetcorrespondence@web.de (Ulrich D i e z)
Newsgroups: comp.text.tex
Subject: Re: How to read Web pages with funny backslashes?
Date: Thu, 1 Aug 2024 04:40:30 +0200
Message-ID: <v8esiv$kigt$1@solani.org>
References: <webpage-20240731143147@ram.dialup.fu-berlin.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 1 Aug 2024 02:40:31 -0000 (UTC)
Injection-Info: solani.org;
logging-data="674333"; mail-complaints-to="abuse@news.solani.org"
User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:60.0) Gecko/20100101
Thunderbird/60.9.0
Cancel-Lock: sha1:G6t9eblBs3K842Y+V4ziHhRp6HA=
Content-Language: en-US
X-User-ID: eJwFwYEBwDAEBMCVkH90HET2H6F3PK4+AaeDjw9xnRkL1mxUFnGgX961ZcGoPe1dEt0iJj8YNRDx
In-Reply-To: <webpage-20240731143147@ram.dialup.fu-berlin.de>
View all headers

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

Subject: Re: How to read Web pages with funny backslashes?
From: Ulrich D i e z
Newsgroups: comp.text.tex
Date: Thu, 1 Aug 2024 03:07 UTC
References: 1 2
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From: ud.usenetcorrespondence@web.de (Ulrich D i e z)
Newsgroups: comp.text.tex
Subject: Re: How to read Web pages with funny backslashes?
Date: Thu, 1 Aug 2024 05:07:46 +0200
Message-ID: <v8eu64$kk16$1@solani.org>
References: <webpage-20240731143147@ram.dialup.fu-berlin.de>
<JavaScript-20240731145623@ram.dialup.fu-berlin.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 1 Aug 2024 03:07:48 -0000 (UTC)
Injection-Info: solani.org;
logging-data="675878"; mail-complaints-to="abuse@news.solani.org"
User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:60.0) Gecko/20100101
Thunderbird/60.9.0
Cancel-Lock: sha1:hYZ3bTGgX17wHgbqM+4v5VJfECU=
X-User-ID: eJwFwQkBwDAIA0BL0JJQ5PAM/xJ2h0tluxE0LPa4NNZ6o84wGirznvikMdsTJoaY0Bs1n9QPGTYRBA==
In-Reply-To: <JavaScript-20240731145623@ram.dialup.fu-berlin.de>
Content-Language: en-US
View all headers

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

1

rocksolid light 0.9.8
clearnet tor