From: Lars Ingebrigtsen <larsi@gnus.org>
To: uzibalqa <uzibalqa@proton.me>
Cc: 58233@debbugs.gnu.org
Subject: bug#58233: Latex style files shifts code with underscores
Date: Sun, 02 Oct 2022 14:41:27 +0200 [thread overview]
Message-ID: <87r0zqcs94.fsf@gnus.org> (raw)
In-Reply-To: <BrolsrKVjRSLTEbiC7toBn6g3q3j1t1jgQrGf3BCptqYIz0jYeqOCZCPMn07LDUmQUt1ssfY0ZtZENWXQvcPvnwJnl9dGgHJUStAPOdIZ4U=@proton.me> (uzibalqa@proton.me's message of "Sat, 01 Oct 2022 19:45:27 +0000")
[-- 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?
next prev parent reply other threads:[~2022-10-02 12:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r0zqcs94.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=58233@debbugs.gnu.org \
--cc=uzibalqa@proton.me \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.