[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Syntax classes of text in href
From: |
Arash Esbati |
Subject: |
Re: Syntax classes of text in href |
Date: |
Thu, 12 Jan 2023 17:00:12 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 |
Hi Keita,
Ikumi Keita <ikumi@ikumi.que.jp> writes:
>>>>>> Arash Esbati <arash@gnu.org> writes:
>>
>> Footnotes:
>> [1] From hyperref.pdf, section 6 Additional user macros.
>
> Hmm, strange. The same portion of hyperref-doc.pdf (not hyperref.pdf,
> though) reads
Sorry, my bad, I meant hyperref-doc.pdf.
> ... The special characters # and ~ ...
>
> for me. The second symbol is not "%", but "~".
>
> I haven't updated my TeX Live 2022 installation yet, so maybe the latest
> version is revised in such a way?
Yes, this is the corresponding bug report:
https://github.com/latex3/hyperref/issues/249
>> You can have things like '%20' in the URL which would then break
>> fontification if not treated verbatim.
>
> In fact "%" is treaded verbatim in the actual pdflatex run as you say,
> so I realized that hyperref.sty treats "%", in addtion to "#" and "~",
> as special. Hmm, this is diffcult...
How about this:
--8<---------------cut here---------------start------------->8---
diff --git a/font-latex.el b/font-latex.el
index b78cf58a..bcb27b64 100644
--- a/font-latex.el
+++ b/font-latex.el
@@ -1095,7 +1095,10 @@ have changed."
;; Some macros take an optional argument. This is
;; the same line as above for environments.
"\\(?:\\[[^][]*\\(?:\\[[^][]*\\][^][]*\\)*\\]\\)?"
- "\\({\\).*?[^\\]\\(?:\\\\\\\\\\)*\\(}\\)")
+ "\\({\\)"
+ "\\(?:[^}{]*\\(?:{[^}{]*}[^}{]*\\)*\\)*"
+ "[^\\]\\(?:\\\\\\\\\\)*"
+ "\\(}\\)")
(1 "|") (2 "|")))))
(when font-latex-syntactic-keywords-extra
(nconc font-latex-syntactic-keywords font-latex-syntactic-keywords-extra))
--8<---------------cut here---------------end--------------->8---
Best, Arash
- Syntax classes of text in href, Al Haji-Ali, 2023/01/11
- Re: Syntax classes of text in href, Arash Esbati, 2023/01/11
- Re: Syntax classes of text in href, Al Haji-Ali, 2023/01/11
- Re: Syntax classes of text in href, Arash Esbati, 2023/01/11
- Re: Syntax classes of text in href, Ikumi Keita, 2023/01/12
- Re: Syntax classes of text in href, Arash Esbati, 2023/01/12
- Re: Syntax classes of text in href, Ikumi Keita, 2023/01/12
- Re: Syntax classes of text in href,
Arash Esbati <=
- Re: Syntax classes of text in href, Ikumi Keita, 2023/01/13
- Re: Syntax classes of text in href, Arash Esbati, 2023/01/13
- Re: Syntax classes of text in href, Ikumi Keita, 2023/01/13
- Re: Syntax classes of text in href, Arash Esbati, 2023/01/13
- Re: Syntax classes of text in href, Abdul-Lateef Haji-Ali, 2023/01/13
- Re: Syntax classes of text in href, Arash Esbati, 2023/01/13