Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

PURGE COMPLETE.


computers / comp.text.tex / Typesetting long andcomplicated equations

SubjectAuthor
* Typesetting long andcomplicated equationsAthel Cornish-Bowden
`* Re: Typesetting long andcomplicated equationsDr Engelbert Buxbaum
 `- Re: Typesetting long andcomplicated equationsPeter Flynn

1
Typesetting long andcomplicated equations

<kut7tcFalqcU1@mid.individual.net>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=7894&group=comp.text.tex#7894

  copy link   Newsgroups: comp.text.tex
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: me@yahoo.com (Athel Cornish-Bowden)
Newsgroups: comp.text.tex
Subject: Typesetting long andcomplicated equations
Date: Mon, 25 Dec 2023 12:38:18 +0100
Lines: 57
Message-ID: <kut7tcFalqcU1@mid.individual.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: individual.net WjKLG+jrBk3k1dJ7ZdwSgAnNmV0nmeCQEqz0QbPaRyew2jp3wv
Cancel-Lock: sha1:jq0fKtJFZ1tNxFvV4dbapf342dI= sha256:PNE+z/wKdiTF9oVjdCldFZZax38ntowzRFUPGKvm+9w=
User-Agent: Unison/2.2
 by: Athel Cornish-Bowden - Mon, 25 Dec 2023 11:38 UTC

I tried to ask the following question at Stack Exchange, but for some
reason (not explained) the system didn't allow me to log in, so I'm
asking it here:

I am converting a long document in Word to LaTeX. As I’m not the
primary author I have only limited freedom to revise the text and
equations — correcting obvious errors, OK, but otherwise following what
the Word file has and not changing the symbols to I would have used. It
contains some very long and complicated equations, such as the
following:

\documentclass[12pt,a4paper]{article}
\usepackage{amsmath}
\begin{document}

\begin{align}
\nonumber \mu_j^{*0} \approx \frac{T}{298.15} \cdot \mu^0_j +
\left( 1 - \frac{T}{298.15} \right) \cdot h_j^0 + \hspace*{2cm}\\
\nonumber \mathrm{switch_{H^+}} \cdot \nu_{\mathrm{H}\varepsilon j}
\cdot R \cdot T \cdot
\ln(10) \cdot \mathrm{pH}_c\hspace*{2cm}\\
\nonumber - \mathrm{switch _{Mg}}\cdot \nu_{\mathrm{Mg} \varepsilon j}
\left[
\frac{T}{298.15} \cdot \mu^0_\mathrm{Mg^{2+}} - R \cdot T \cdot
\ln{10} \cdot \mathrm{pMg}_c \right.\\
\nonumber - \left. \left( 1 - \frac{T}{298.15}
\right) \cdot h^0_\mathrm{Mg^{2+}}
\right]
\mathrm{switch}_I \cdot g_\mathrm{DH}(I,T) \cdot \hspace*{2cm}\\
\nonumber \left[
z_i^2 - \mathrm{switch_\mathrm{H^+}} \cdot \nu_{\mathrm{H} \varepsilon j} -
\mathrm{Mg} \cdot 4\cdot \nu_{\mathrm{Mg}\varepsilon j}
\right]x\hspace*{2cm}\\
\mathrm{switch_{mM}}\cdot R \cdot T \cdot \ln\left(
\frac{c^\mathrm{standard}}{c^\mathrm{physchemstandard}}
\right)\hspace*{1cm}
\end{align}

\end{document}

This produces more or less what I want: specifically, only the last
line has an equation number, and the lines are approximately centred.
However, it seems a very clunky solution and raises two questions:

1. \nonumber before every line except the last is OK, but is there a
way to get the same result with a general command without repeating
\nonumber five times.

2. Using \hspace* to centre the lines requires a lot of fiddling about
to put the right arguments. Is there a better way? (I’ve tried obvious
things like putting each line in \begin {center} …. \end{center}.)

--
Athel cb
LaTeX user, but far from expert

Re: Typesetting long andcomplicated equations

<MPG.3ff4afdd28d92762989695@news.eternal-september.org>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=7898&group=comp.text.tex#7898

  copy link   Newsgroups: comp.text.tex
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: engelbert_buxbaum@hotmail.com (Dr Engelbert Buxbaum)
Newsgroups: comp.text.tex
Subject: Re: Typesetting long andcomplicated equations
Date: Tue, 26 Dec 2023 09:40:41 +0100
Organization: private
Lines: 51
Message-ID: <MPG.3ff4afdd28d92762989695@news.eternal-september.org>
References: <kut7tcFalqcU1@mid.individual.net>
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-15"
Content-Transfer-Encoding: 8bit
Injection-Info: dont-email.me; posting-host="00ba6ae39bdf65e1d70794d9ead47758";
logging-data="3607018"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/3vd1Tr1Q5VUxfAe0wbGMAlSRrbZMPnzU="
User-Agent: MicroPlanet-Gravity/3.0.4
Cancel-Lock: sha1:aRAZFHk/HJHxxUjXl2or0hOKFwQ=
 by: Dr Engelbert Buxbaum - Tue, 26 Dec 2023 08:40 UTC

In article <kut7tcFalqcU1@mid.individual.net>, me@yahoo.com says...
>
> I tried to ask the following question at Stack Exchange, but for some
> reason (not explained) the system didn't allow me to log in, so I'm
> asking it here:
>
> I am converting a long document in Word to LaTeX. As I?m not the
> primary author I have only limited freedom to revise the text and
> equations ? correcting obvious errors, OK, but otherwise following what
> the Word file has and not changing the symbols to I would have used. It
> contains some very long and complicated equations
>
> 1. \nonumber before every line except the last is OK, but is there a
> way to get the same result with a general command without repeating
> \nonumber five times.
>
> 2. Using \hspace* to centre the lines requires a lot of fiddling about

The align-environment can do much of the work for you, if you use the &
to align the beginning of each line. The equations won't be centered,
but the operation signs at the beginning of each line will align just
right of the \approx, making it clear that all lines belong to the same
equation:

\begin{align}
\nonumber \mu_j^{*0} \approx & \frac{T}{298.15} \cdot \mu^0_j + \left
( 1 - \frac{T}{298.15} \right) \cdot h_j^0 \\
\nonumber & + \mathrm{switch_{H^+}} \cdot \nu_
{\mathrm{H}\varepsilon j} \cdot R \cdot T \cdot \ln(10) \cdot \mathrm
{pH}_c \\
\nonumber & - \mathrm{switch _{Mg}}\cdot \nu_
{\mathrm{Mg} \varepsilon j} \left[ \frac{T}{298.15} \cdot \mu^0_\mathrm
{Mg^{2+}} - R \cdot T \cdot
\ln{10} \cdot \mathrm{pMg}_c \right.\\
\nonumber & - \left. \left( 1 - \frac{T}{298.15}
\right) \cdot h^0_\mathrm{Mg^{2+}}
\right] \mathrm{switch}_I \cdot g_\mathrm{DH}(I,T) \\
\nonumber & \cdot \left[z_i^2 - \mathrm{switch_
\mathrm{H^+}} \cdot \nu_{\mathrm{H} \varepsilon j} - \mathrm{Mg} \cdot 4
\cdot \nu_{\mathrm{Mg}\varepsilon j} \right]x \\
& \cdot \mathrm{switch_{mM}}\cdot R
\cdot T \cdot \ln\left( \frac{c^\mathrm{standard}}{c^\mathrm
{physchemstandard}} \right)
\end{align}

(at the beginning of the last line I added a \cdot so it, too, starts
with an operation). Optionally, you may replace all \cdot by the more
common \times.

Hope that helps
Engelbert

Re: Typesetting long andcomplicated equations

<kv0oekF5jbU1@mid.individual.net>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=7899&group=comp.text.tex#7899

  copy link   Newsgroups: comp.text.tex
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: peter@silmaril.ie (Peter Flynn)
Newsgroups: comp.text.tex
Subject: Re: Typesetting long andcomplicated equations
Date: Tue, 26 Dec 2023 19:39:00 +0000
Lines: 16
Message-ID: <kv0oekF5jbU1@mid.individual.net>
References: <kut7tcFalqcU1@mid.individual.net>
<MPG.3ff4afdd28d92762989695@news.eternal-september.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net JfZXxeBRcVMgViqLgO2StAGx8fgV9xIC3WwqZRl2g5S1G8TIKK
Cancel-Lock: sha1:p6KSHQ2biZ48wGhvaRy7WLF2b5s= sha256:MnXGzz+kdFYP3P8Hqr7zLbc1PAgJDkhfksPJ37KJW/8=
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Content-Language: en-US
In-Reply-To: <MPG.3ff4afdd28d92762989695@news.eternal-september.org>
 by: Peter Flynn - Tue, 26 Dec 2023 19:39 UTC

On 26/12/2023 08:40, Dr Engelbert Buxbaum wrote:
> In article <kut7tcFalqcU1@mid.individual.net>, me@yahoo.com says...
>> [snip]

IANAM :-) but...

> Optionally, you may replace all \cdot by the more common \times.

I would definitely do that, because it makes the LH side of each line
align better. The only manual adjustment I would make is to move the
large open parenthesis at the start of line 4 slightly leftwards to
improve the optical alignment.

\nonumber&-\kern-2pt\left.\left(1-\frac{T}{298.15}\right)...

Peter

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor