* Latex superscripts, subscripts and curly braces
@ 2022-12-30 13:23 Hans Lonsdale
2022-12-31 20:54 ` Emanuel Berg
2023-01-04 11:06 ` Michael Heerdegen
0 siblings, 2 replies; 13+ messages in thread
From: Hans Lonsdale @ 2022-12-30 13:23 UTC (permalink / raw)
To: Help Gnu Emacs
I am using latex-mode, which is able to shift superscripts upwards, and subscripts downwards, using a smaller font.
For simple cases the shifting works well. But for industrial applications where terms get to be quite long, it basic
idea does not work well. The problem becomes significant when grouping terms using curly braces "{}".
The superscript, subscript, and braces signs ( i.e. ^ _ {} ) are retained.
a^{11} a_{21}
I would very much like to have the additional capability of removing the symbols ^ _ {} when displaying, to get
a11 a21
where only the shift and font decrease are shown.
--
Sent with https://mailfence.com
Secure and private email
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Latex superscripts, subscripts and curly braces
2022-12-30 13:23 Latex superscripts, subscripts and curly braces Hans Lonsdale
@ 2022-12-31 20:54 ` Emanuel Berg
2022-12-31 21:57 ` Hans Lonsdale
2022-12-31 22:41 ` Hans Lonsdale
2023-01-04 11:06 ` Michael Heerdegen
1 sibling, 2 replies; 13+ messages in thread
From: Emanuel Berg @ 2022-12-31 20:54 UTC (permalink / raw)
To: help-gnu-emacs
Hans Lonsdale wrote:
> I am using latex-mode, which is able to shift superscripts
> upwards, and subscripts downwards, using a smaller font.
> For simple cases the shifting works well.
Are we talking when you edit the source?
What do you input then, exactly?
> But for industrial applications ...
... :)
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Latex superscripts, subscripts and curly braces
2022-12-31 20:54 ` Emanuel Berg
@ 2022-12-31 21:57 ` Hans Lonsdale
2023-01-02 19:01 ` Emanuel Berg
2022-12-31 22:41 ` Hans Lonsdale
1 sibling, 1 reply; 13+ messages in thread
From: Hans Lonsdale @ 2022-12-31 21:57 UTC (permalink / raw)
To: Emanuel Berg, help-gnu-emacs
> ----------------------------------------
> From: Emanuel Berg <incal@dataswamp.org>
> Sent: Sat Dec 31 21:54:16 CET 2022
> To: <help-gnu-emacs@gnu.org>
> Subject: Re: Latex superscripts, subscripts and curly braces
>
>
> Hans Lonsdale wrote:
>
> > I am using latex-mode, which is able to shift superscripts
> > upwards, and subscripts downwards, using a smaller font.
> > For simple cases the shifting works well.
>
> Are we talking when you edit the source?
Yes. After editing the source I would like to see a hint of how things would look like, and also
to make it easy for me to follow the latex code itself. I also use it in conjunction with prettify-symbols.
> What do you input then, exactly?
For instance, consider
{\begin{aligned}
\langle \psi _{{jk}},\psi _{{lm}}\rangle
&= \int _{{-\infty }}^{\infty }\psi _{{jk}}(x)\overline {\psi _{{lm}}(x)}dx\\
&= \delta _{{jl}}\delta _{{km}}
\end{aligned}}
I would not like to have the _ and {} showing in the expression \psi_{jk}
> > But for industrial applications ...
In industrial applications, equations are customarily very terse' with lot of spaces wasted printing _ ^ { }
Where the font change and height placement make it obvious whether something is superscript or subscript,
and what things are being grouped together with {}.
> ... :)
>
> --
> underground experts united
> https://dataswamp.org/~incal
>
>
--
Sent with https://mailfence.com
Secure and private email
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Latex superscripts, subscripts and curly braces
2022-12-31 20:54 ` Emanuel Berg
2022-12-31 21:57 ` Hans Lonsdale
@ 2022-12-31 22:41 ` Hans Lonsdale
2023-01-03 14:09 ` Thibaut Verron
1 sibling, 1 reply; 13+ messages in thread
From: Hans Lonsdale @ 2022-12-31 22:41 UTC (permalink / raw)
To: Emanuel Berg, help-gnu-emacs
> ----------------------------------------
> From: Emanuel Berg <incal@dataswamp.org>
> Sent: Sat Dec 31 21:54:16 CET 2022
> To: <help-gnu-emacs@gnu.org>
> Subject: Re: Latex superscripts, subscripts and curly braces
>
>
> Hans Lonsdale wrote:
>
> > I am using latex-mode, which is able to shift superscripts
> > upwards, and subscripts downwards, using a smaller font.
> > For simple cases the shifting works well.
>
> Are we talking when you edit the source?
Perhaps there can be two levels, one showing _^ {} and a setting to show things without them.
> What do you input then, exactly?
>
> > But for industrial applications ...
>
> ... :)
>
> --
> underground experts united
> https://dataswamp.org/~incal
>
>
--
Sent with https://mailfence.com
Secure and private email
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Latex superscripts, subscripts and curly braces
2022-12-31 21:57 ` Hans Lonsdale
@ 2023-01-02 19:01 ` Emanuel Berg
2023-01-02 23:02 ` Hans Lonsdale
2023-01-03 13:18 ` Jean Louis
0 siblings, 2 replies; 13+ messages in thread
From: Emanuel Berg @ 2023-01-02 19:01 UTC (permalink / raw)
To: help-gnu-emacs
Hans Lonsdale wrote:
>> Are we talking when you edit the source?
>
> Yes. After editing the source I would like to see a hint of
> how things would look like, and also to make it easy for me
> to follow the latex code itself. I also use it in
> conjunction with prettify-symbols.
But that's the whole point, you have one language to express
what should be shown and then a compiler to produce a document
according to what you express in that language. There is no
bridging those to in an Emacs buffer to any extent that will
ever matter, sorry.
But you can have a layer in between, some WYSIWYG editor that
can also produce LaTeX which in turn is compiled, but then you
loose the only edge there really is to LaTeX, namely the
ability to get it exactly the way you want it down to the
tiniest detail - so if you let that go, you are better of with
something else anyway - I don't know - Markdown, Org-mode etc?
>> What do you input then, exactly?
>
> For instance, consider
>
> {\begin{aligned}
> \langle \psi _{{jk}},\psi _{{lm}}\rangle
> &= \int _{{-\infty }}^{\infty }\psi _{{jk}}(x)\overline {\psi _{{lm}}(x)}dx\\
> &= \delta _{{jl}}\delta _{{km}}
> \end{aligned}}
>
> I would not like to have the _ and {} showing in the
> expression \psi_{jk}
It's possible but I don't believe it this whole idea or
attitude, it is such an uphill battle it is insane, you need
to let that go or approach it in another way.
> But for industrial applications [...] In industrial
> applications, equations are customarily very terse with lot
> of spaces wasted printing _ ^ { }
I don't think there are industrial applications of LaTeX that
differ in this sense from any one else's applications, sorry.
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Latex superscripts, subscripts and curly braces
2023-01-02 19:01 ` Emanuel Berg
@ 2023-01-02 23:02 ` Hans Lonsdale
2023-01-03 0:53 ` Emanuel Berg
2023-01-03 13:18 ` Jean Louis
1 sibling, 1 reply; 13+ messages in thread
From: Hans Lonsdale @ 2023-01-02 23:02 UTC (permalink / raw)
To: Emanuel Berg, help-gnu-emacs
> ----------------------------------------
> From: Emanuel Berg <incal@dataswamp.org>
> Sent: Mon Jan 02 20:01:29 CET 2023
> To: <help-gnu-emacs@gnu.org>
> Subject: Re: Latex superscripts, subscripts and curly braces
>
>
> Hans Lonsdale wrote:
>
> >> Are we talking when you edit the source?
> >
> > Yes. After editing the source I would like to see a hint of
> > how things would look like, and also to make it easy for me
> > to follow the latex code itself. I also use it in
> > conjunction with prettify-symbols.
>
> But that's the whole point, you have one language to express
> what should be shown and then a compiler to produce a document
> according to what you express in that language. There is no
> bridging those to in an Emacs buffer to any extent that will
> ever matter, sorry.
>
> But you can have a layer in between, some WYSIWYG editor that
> can also produce LaTeX which in turn is compiled, but then you
> loose the only edge there really is to LaTeX, namely the
> ability to get it exactly the way you want it down to the
> tiniest detail - so if you let that go, you are better of with
> something else anyway - I don't know - Markdown, Org-mode etc?
The scope is to hove some form of simple structure even on the latex
source code. This facility already exists and can improved a little bit more.
> >> What do you input then, exactly?
> >
> > For instance, consider
> >
> > {\begin{aligned}
> > \langle \psi _{{jk}},\psi _{{lm}}\rangle
> > &= \int _{{-\infty }}^{\infty }\psi _{{jk}}(x)\overline {\psi _{{lm}}(x)}dx\\
> > &= \delta _{{jl}}\delta _{{km}}
> > \end{aligned}}
> >
> > I would not like to have the _ and {} showing in the
> > expression \psi_{jk}
>
> It's possible but I don't believe it this whole idea or
> attitude, it is such an uphill battle it is insane, you need
> to let that go or approach it in another way.
>
> > But for industrial applications [...] In industrial
> > applications, equations are customarily very terse with lot
> > of spaces wasted printing _ ^ { }
>
> I don't think there are industrial applications of LaTeX that
> differ in this sense from any one else's applications, sorry.
Not industrial application of latex. But industrial applications involve more
complicated equation frameworks. The ability to show some identifying
structure in the source code would be something separate from the final
result.
> underground experts united
> https://dataswamp.org/~incal
>
>
--
Sent with https://mailfence.com
Secure and private email
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Latex superscripts, subscripts and curly braces
2023-01-02 23:02 ` Hans Lonsdale
@ 2023-01-03 0:53 ` Emanuel Berg
2023-01-03 14:12 ` Hans Lonsdale
0 siblings, 1 reply; 13+ messages in thread
From: Emanuel Berg @ 2023-01-03 0:53 UTC (permalink / raw)
To: help-gnu-emacs
Hans Lonsdale wrote:
> Not industrial application of latex. But industrial
> applications involve more complicated equation frameworks.
Fork LaTeX into induLaTeX to cope with the very special needs
implied by industrial applications?
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Latex superscripts, subscripts and curly braces
2023-01-02 19:01 ` Emanuel Berg
2023-01-02 23:02 ` Hans Lonsdale
@ 2023-01-03 13:18 ` Jean Louis
2023-01-03 14:13 ` Hans Lonsdale
1 sibling, 1 reply; 13+ messages in thread
From: Jean Louis @ 2023-01-03 13:18 UTC (permalink / raw)
To: help-gnu-emacs
* Emanuel Berg <incal@dataswamp.org> [2023-01-03 00:14]:
> But you can have a layer in between, some WYSIWYG editor that
> can also produce LaTeX which in turn is compiled, but then you
> loose the only edge there really is to LaTeX, namely the
> ability to get it exactly the way you want it down to the
> tiniest detail - so if you let that go, you are better of with
> something else anyway - I don't know - Markdown, Org-mode etc?
There is LyX and TeXmacs, excellent tools.
LyX | LyX – The Document Processor:
https://www.lyx.org/
Welcome to GNU TeXmacs (FSF GNU project):
https://www.texmacs.org/tmweb/home/welcome.en.html
--
Jean
Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns
In support of Richard M. Stallman
https://stallmansupport.org/
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Latex superscripts, subscripts and curly braces
2022-12-31 22:41 ` Hans Lonsdale
@ 2023-01-03 14:09 ` Thibaut Verron
2023-01-03 14:17 ` Hans Lonsdale
0 siblings, 1 reply; 13+ messages in thread
From: Thibaut Verron @ 2023-01-03 14:09 UTC (permalink / raw)
To: Hans Lonsdale, Emanuel Berg, help-gnu-emacs
From: Emanuel Berg <incal@dataswamp.org>
>> Sent: Sat Dec 31 21:54:16 CET 2022
>> To: <help-gnu-emacs@gnu.org>
>> Subject: Re: Latex superscripts, subscripts and curly braces
>>
>>
>> Hans Lonsdale wrote:
>>
>>> I am using latex-mode, which is able to shift superscripts
>>> upwards, and subscripts downwards, using a smaller font.
>>> For simple cases the shifting works well.
>> Are we talking when you edit the source?
> Perhaps there can be two levels, one showing _^ {} and a setting to show things without them.
Hi,
org-mode can do it with (setq org-pretty-entities t) and (setq
org-pretty-entities-include-sub-superscripts).
I cannot find any setting to do the same thing with latex buffers, but
it should certainly be possible to at least reproduce org's implementation.
For that it's worth, I usually *disable* such things, because they make
it very awkward to edit subscripts and superscripts. The effect is that
the ^ _ and the braces are hidden, but they can still be input and
deleted, and in my experience it's very easy to end up in broken
configurations with that.
Instead, I use a proportional font, which makes the braces thin enough
to not be annoying. And the scripts are only shifted up or down without
changing their size -- that may come from my theme, I can't find
anything in my config for that. All together, even long scripts are very
easy to visualize and edit.
Best wishes,
Thibaut
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Latex superscripts, subscripts and curly braces
2023-01-03 0:53 ` Emanuel Berg
@ 2023-01-03 14:12 ` Hans Lonsdale
0 siblings, 0 replies; 13+ messages in thread
From: Hans Lonsdale @ 2023-01-03 14:12 UTC (permalink / raw)
To: Emanuel Berg, help-gnu-emacs
> ----------------------------------------
> From: Emanuel Berg <incal@dataswamp.org>
> Sent: Tue Jan 03 01:53:44 CET 2023
> To: <help-gnu-emacs@gnu.org>
> Subject: Re: Latex superscripts, subscripts and curly braces
>
>
> Hans Lonsdale wrote:
>
> > Not industrial application of latex. But industrial
> > applications involve more complicated equation frameworks.
>
> Fork LaTeX into induLaTeX to cope with the very special needs
> implied by industrial applications?
This is about a feature in latex-mode
> underground experts united
> https://dataswamp.org/~incal
>
>
--
Sent with https://mailfence.com
Secure and private email
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Latex superscripts, subscripts and curly braces
2023-01-03 13:18 ` Jean Louis
@ 2023-01-03 14:13 ` Hans Lonsdale
0 siblings, 0 replies; 13+ messages in thread
From: Hans Lonsdale @ 2023-01-03 14:13 UTC (permalink / raw)
To: Jean Louis, help-gnu-emacs
> ----------------------------------------
> From: Jean Louis <bugs@gnu.support>
> Sent: Tue Jan 03 14:18:26 CET 2023
> To: <help-gnu-emacs@gnu.org>
> Subject: Re: Latex superscripts, subscripts and curly braces
>
>
> * Emanuel Berg <incal@dataswamp.org> [2023-01-03 00:14]:
> > But you can have a layer in between, some WYSIWYG editor that
> > can also produce LaTeX which in turn is compiled, but then you
> > loose the only edge there really is to LaTeX, namely the
> > ability to get it exactly the way you want it down to the
> > tiniest detail - so if you let that go, you are better of with
> > something else anyway - I don't know - Markdown, Org-mode etc?
>
> There is LyX and TeXmacs, excellent tools.
This is about working with latex-mode in emacs.
> LyX | LyX – The Document Processor:
> https://www.lyx.org/
>
> Welcome to GNU TeXmacs (FSF GNU project):
> https://www.texmacs.org/tmweb/home/welcome.en.html
>
> --
> Jean
>
> Take action in Free Software Foundation campaigns:
> https://www.fsf.org/campaigns
>
> In support of Richard M. Stallman
> https://stallmansupport.org/
>
--
Sent with https://mailfence.com
Secure and private email
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Latex superscripts, subscripts and curly braces
2023-01-03 14:09 ` Thibaut Verron
@ 2023-01-03 14:17 ` Hans Lonsdale
0 siblings, 0 replies; 13+ messages in thread
From: Hans Lonsdale @ 2023-01-03 14:17 UTC (permalink / raw)
To: Thibaut Verron, Emanuel Berg, help-gnu-emacs
> ----------------------------------------
> From: Thibaut Verron <thibaut.verron@gmail.com>
> Sent: Tue Jan 03 15:09:24 CET 2023
> To: Hans Lonsdale <hanslonsdale@mailfence.com>, Emanuel Berg <incal@dataswamp.org>, <help-gnu-emacs@gnu.org>
> Subject: Re: Latex superscripts, subscripts and curly braces
>
>
> From: Emanuel Berg <incal@dataswamp.org>
> >> Sent: Sat Dec 31 21:54:16 CET 2022
> >> To: <help-gnu-emacs@gnu.org>
> >> Subject: Re: Latex superscripts, subscripts and curly braces
> >>
> >>
> >> Hans Lonsdale wrote:
> >>
> >>> I am using latex-mode, which is able to shift superscripts
> >>> upwards, and subscripts downwards, using a smaller font.
> >>> For simple cases the shifting works well.
> >> Are we talking when you edit the source?
> > Perhaps there can be two levels, one showing _^ {} and a setting to show things without them.
>
> Hi,
>
> org-mode can do it with (setq org-pretty-entities t) and (setq
> org-pretty-entities-include-sub-superscripts).
>
> I cannot find any setting to do the same thing with latex buffers, but
> it should certainly be possible to at least reproduce org's implementation.
My intention is to also have that in tex-mode and latex-mode as well.
> For that it's worth, I usually *disable* such things, because they make
> it very awkward to edit subscripts and superscripts. The effect is that
> the ^ _ and the braces are hidden, but they can still be input and
> deleted, and in my experience it's very easy to end up in broken
> configurations with that.
My intention is to have a key binding to change the visualisation. I usually
make changes to the code rather than to the prettified version.
> Instead, I use a proportional font, which makes the braces thin enough
> to not be annoying. And the scripts are only shifted up or down without
> changing their size -- that may come from my theme, I can't find
> anything in my config for that. All together, even long scripts are very
> easy to visualize and edit.
>
> Best wishes,
>
> Thibaut
>
--
Sent with https://mailfence.com
Secure and private email
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Latex superscripts, subscripts and curly braces
2022-12-30 13:23 Latex superscripts, subscripts and curly braces Hans Lonsdale
2022-12-31 20:54 ` Emanuel Berg
@ 2023-01-04 11:06 ` Michael Heerdegen
1 sibling, 0 replies; 13+ messages in thread
From: Michael Heerdegen @ 2023-01-04 11:06 UTC (permalink / raw)
To: Hans Lonsdale; +Cc: Help Gnu Emacs
Hans Lonsdale <hanslonsdale@mailfence.com> writes:
> I would very much like to have the additional capability of removing
> the symbols ^ _ {} when displaying, to get
>
> a11 a21
>
> where only the shift and font decrease are shown.
You won't get this unless you go low level (modify the font-lock
keywords of latex-mode "by hand" and reimplement the according
fontification functions).
Michael.
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2023-01-04 11:06 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-30 13:23 Latex superscripts, subscripts and curly braces Hans Lonsdale
2022-12-31 20:54 ` Emanuel Berg
2022-12-31 21:57 ` Hans Lonsdale
2023-01-02 19:01 ` Emanuel Berg
2023-01-02 23:02 ` Hans Lonsdale
2023-01-03 0:53 ` Emanuel Berg
2023-01-03 14:12 ` Hans Lonsdale
2023-01-03 13:18 ` Jean Louis
2023-01-03 14:13 ` Hans Lonsdale
2022-12-31 22:41 ` Hans Lonsdale
2023-01-03 14:09 ` Thibaut Verron
2023-01-03 14:17 ` Hans Lonsdale
2023-01-04 11:06 ` Michael Heerdegen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).