auctex-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Syntax classes of text in href


From: Ikumi Keita
Subject: Re: Syntax classes of text in href
Date: Fri, 13 Jan 2023 22:56:23 +0900

Hi Arash and Al,

>>>>> Arash Esbati <arash@gnu.org> writes:
> Ikumi Keita <ikumi@ikumi.que.jp> writes:
>> But maybe it's a corner case that we don't have to worry about. I'm not
>> sure.

> This is indeed a corner case: Packages like fvextra.sty which allow
> things like \Verb{content} explicitly require balanced braces;
> \Verb{co{ntent} raises an error during compilation whereas
> \Verb|co{ntent| works.  Another issue with my suggestion above is this:

I see, thanks. Now I'm inclined to take your new regexp.

> \documentclass{article}
> \usepackage{fvextra}

> \begin{document}

> \Verb{w{o}r{k}s}
> \Verb{b{r}eak{s}}

> \end{document}

> due to "[^\\]\\(?:\\\\\\\\\\)*" in the regexp.

Wow :-) That'd be hard to cope with cleanly...

>>>>> Abdul-Lateef Haji-Ali <abdo.haji.ali@gmail.com> writes:
> Nevertheless, IMO, treating a url as verbatim seems to be the main
> issue since it clearly is not (e.g., macros are processed). It's just
> that some characters have special treatment that differs from normal
> TeX. Perhaps a new class of text is required to distinguish the two
> cases.

I feel similarly. Probably the best approach is to develop a new
function in hyperref.el to find out "%"s in the URL argument of \href
and to assign syntax table property on those "%"s to cancel the comment
starter syntax using that new function by a new entry in
`font-latex-syntactic-keywords-extra'.
However that requires extra work. So I think the practical solution
would be to make it a future open task and to follow Arash's idea.

Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine



reply via email to

[Prev in Thread] Current Thread [Next in Thread]