all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#58233: Latex style files shifts code with underscores
@ 2022-10-01 19:45 uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-10-02 12:41 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-10-01 19:45 UTC (permalink / raw)
  To: 58233


I am working on some latex style files and have noticed that code with underscores gets displayed
as subscript notation (characters get shifted downwards) rather than showing code as it should be.

Consequently, the following looks extremely weird.

\cs_new_protected:Nn \__hagbard_newtheorem_parent:nnn
 {
  \newtheorem{#1_inner}[#3]{\color{\l__hagbard_theorem_setcolor_tl}#2}
 }
\cs_generate_variant:Nn \__hagbard_newtheorem_parent:nnn { VVV }










^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#58233: Latex style files shifts code with underscores
  2022-10-01 19:45 bug#58233: Latex style files shifts code with underscores uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-10-02 12:41 ` Lars Ingebrigtsen
  2022-10-02 15:28   ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 4+ messages in thread
From: Lars Ingebrigtsen @ 2022-10-02 12:41 UTC (permalink / raw)
  To: uzibalqa; +Cc: 58233

[-- Attachment #1: Type: text/plain, Size: 884 bytes --]

uzibalqa <uzibalqa@proton.me> writes:

> I am working on some latex style files and have noticed that code with underscores gets displayed
> as subscript notation (characters get shifted downwards) rather than showing code as it should be.
>
> Consequently, the following looks extremely weird.
>
> \cs_new_protected:Nn \__hagbard_newtheorem_parent:nnn
>  {
>   \newtheorem{#1_inner}[#3]{\color{\l__hagbard_theorem_setcolor_tl}#2}
>  }
> \cs_generate_variant:Nn \__hagbard_newtheorem_parent:nnn { VVV }

I've managed to repress all knowledge of .sty files I once had.

Emacs currently uses latex-mode to display .sty files.  In LaTeX,
underscores aren't allowed in identifiers like this, are they?

So it seems like the solution here would be to default
tex-fontify-script to nil in .sty files, which seems to fix this
specific problem.  But the fontification is still pretty weird:


[-- Attachment #2: Type: image/png, Size: 47688 bytes --]

[-- Attachment #3: Type: text/plain, Size: 105 bytes --]


I.e., if this is valid .sty syntax, then latex-mode doesn't really have
support for it at all, I think?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#58233: Latex style files shifts code with underscores
  2022-10-02 12:41 ` Lars Ingebrigtsen
@ 2022-10-02 15:28   ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-10-03  9:09     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-10-02 15:28 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 58233






Sent with Proton Mail secure email.

------- Original Message -------
On Sunday, October 2nd, 2022 at 12:41 PM, Lars Ingebrigtsen <larsi@gnus.org> wrote:


> uzibalqa uzibalqa@proton.me writes:
> 
> > I am working on some latex style files and have noticed that code with underscores gets displayed
> > as subscript notation (characters get shifted downwards) rather than showing code as it should be.
> > 
> > Consequently, the following looks extremely weird.
> > 
> > \cs_new_protected:Nn \__hagbard_newtheorem_parent:nnn
> > {
> > \newtheorem{#1_inner}[#3]{\color{\l__hagbard_theorem_setcolor_tl}#2}
> > }
> > \cs_generate_variant:Nn \__hagbard_newtheorem_parent:nnn { VVV }
> 
> 
> I've managed to repress all knowledge of .sty files I once had.
> 
> Emacs currently uses latex-mode to display .sty files. In LaTeX,
> underscores aren't allowed in identifiers like this, are they?
> 
> So it seems like the solution here would be to default
> tex-fontify-script to nil in .sty files, which seems to fix this
> specific problem. But the fontification is still pretty weird:
> 
> 
> I.e., if this is valid .sty syntax, then latex-mode doesn't really have
> support for it at all, I think?

It is the latest L3 Programming Layer Interface for Latex.







^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#58233: Latex style files shifts code with underscores
  2022-10-02 15:28   ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-10-03  9:09     ` Lars Ingebrigtsen
  0 siblings, 0 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2022-10-03  9:09 UTC (permalink / raw)
  To: uzibalqa; +Cc: 58233

uzibalqa <uzibalqa@proton.me> writes:

> It is the latest L3 Programming Layer Interface for Latex.

Then I guess somebody will have to write code to support this new
language -- fixing just the subscripts doesn't seem to make much sense.

Here's a pointer to get somebody that wants to work on this started:

https://www.alanshawn.com/latex3-tutorial/#why-latex3






^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-10-03  9:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-01 19:45 bug#58233: Latex style files shifts code with underscores uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-02 12:41 ` Lars Ingebrigtsen
2022-10-02 15:28   ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-03  9:09     ` Lars Ingebrigtsen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.