Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

latex-dev: i with macron loops in T1-encoding #1587

Open
u-fischer opened this issue Dec 18, 2024 · 10 comments
Open

latex-dev: i with macron loops in T1-encoding #1587

u-fischer opened this issue Dec 18, 2024 · 10 comments
Labels
bug category base (latex) fixed in dev Fixed in development branch, not in stable release

Comments

@u-fischer
Copy link
Member

In latex-dev a definition for i with macron has been added and that loops in T1-encoding

Minimal example showing the bug

\RequirePackage{latexbug}
\documentclass{book}
\usepackage[T1]{fontenc}
%\DeclareTextCompositeCommand{\=}{T1}{\i}{\=\i} %in latex-dev, loops
%\DeclareTextCompositeCommand{\=}{T1}{\i}{something else} %works
\begin{document}
sīc erat scriptum! %similar with \=\i
\end{document}

Log file (required) and possibly PDF file

log-files is a bit long, but basically one gets

\T1\= #1->\@text@composite \T1\= #1\@empty \@text@composite {\add@accent {9}{#1
}}
#1<-\i 

\@text@composite #1#2#3\@text@composite ->\expandafter \@text@composite@x \csna
me \string #1-\string #2\endcsname 
#1<-\T1\= 
#2<-\i 
#3<-\@empty 

\@text@composite@x #1->\ifx #1\relax \expandafter \@secondoftwo \else \expandaf
ter \@firstoftwo \fi #1
#1<-\\T1\=-\i 

\@firstoftwo #1#2->#1
#1<-\\T1\=-\i 
#2<-\add@accent {9}{\i }

\\T1\=-\i ->\=\i 

\=->\T1-cmd \=\T1\= 

\T1-cmd #1->\ifx \protect \@typeset@protect \@inmathwarn #1\else \noexpand #1\e
xpandafter \@gobble \fi 
#1<-\=

\@inmathwarn #1->\ifmmode \@latex@warning {Command \protect #1 invalid in math 
mode}\fi 
#1<-\=

\T1\= #1->\@text@composite \T1\= #1\@empty \@text@composite {\add@accent {9}{#1
}}
#1<-\i 

\@text@composite #1#2#3\@text@composite ->\expandafter \@text@composite@x \csna
me \string #1-\string #2\endcsname 
#1<-\T1\= 
#2<-\i 
#3<-\@empty 

\@text@composite@x #1->\ifx #1\relax \expandafter \@secondoftwo \else \expandaf
ter \@firstoftwo \fi #1
#1<-\\T1\=-\i 

\@firstoftwo #1#2->#1
#1<-\\T1\=-\i 
#2<-\add@accent {9}{\i }

\\T1\=-\i ->\=\i 

\=->\T1-cmd \=\T1\= 

\T1-cmd #1->\ifx \protect \@typeset@protect \@inmathwarn #1\else \noexpand #1\e
xpandafter \@gobble \fi 
#1<-\=

\@inmathwarn #1->\ifmmode \@latex@warning {Command \protect #1 invalid in math 
mode}\fi 
#1<-\=

\T1\= #1->\@text@composite \T1\= #1\@empty \@text@composite {\add@accent {9}{#1
}}
#1<-\i 
@cfr42
Copy link
Contributor

cfr42 commented Dec 21, 2024

\DeclareTextCompositeCommand{\=}{T1}{\i}{\={\char25}}

@FrankMittelbach
Copy link
Member

FrankMittelbach commented Dec 21, 2024

\DeclareTextCompositeCommand{\=}{T1}{\i}{\={\char25}}

yes, that'll probably do, but why do it in the first place (it works correctly without any declaration afaics)?

I think what was intended was

\DeclareTextCompositeCommand{\=}{T1}{i}{\=\i}

(but I didn't find a reference why the change was made)

@josephwright
Copy link
Member

@FrankMittelbach #1453

@josephwright
Copy link
Member

Hmm, I think I meant

\DeclareTextCompositeCommand{\=}{T1}{i}{\=\i}

Does that look right?

@FrankMittelbach
Copy link
Member

So it is as I thought: the change has a \ too many (the changelog omits the link to that issue)

but then the question is wouldn a similar definition be needed for \=j or is this something that doesn't exist in any spoken or written language?

@FrankMittelbach
Copy link
Member

Hmm, I think I meant

\DeclareTextCompositeCommand{\=}{T1}{i}{\=\i}

Does that look right?

yes, and please add the (gh/1453) in the changes logs

@josephwright
Copy link
Member

Hmm, I think I meant

\DeclareTextCompositeCommand{\=}{T1}{i}{\=\i}

Does that look right?

yes, and please add the (gh/1453) in the changes logs

OK - I always use the Git blame for changes so to me there is a clear link :)

@josephwright josephwright added bug fixed in dev Fixed in development branch, not in stable release labels Dec 21, 2024
@car222222
Copy link
Contributor

car222222 commented Dec 21, 2024

@FrankMittelbach wrote:
needed for \=j
or is this something that doesn't exist in any spoken or written language?

Very likely not needed, but I could invent a new language that does, if you like!

Do we have any "accented j" characters/glyphs so far?

Check Unicode, maybe! ??

@davidcarlisle
Copy link
Member

davidcarlisle commented Dec 21, 2024 via email

@FrankMittelbach
Copy link
Member

yes, and please add the (gh/1453) in the changes logs

OK - I always use the Git blame for changes so to me there is a clear link :)

as far as I'm concerned that is a rather lengthly extra step, compared to just go to /issue/number and I'm not sure that blame shows me the releated discussions necessarily (does it? I think I only saw that you made the change but not why)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug category base (latex) fixed in dev Fixed in development branch, not in stable release
Projects
None yet
Development

No branches or pull requests

6 participants