-
Notifications
You must be signed in to change notification settings - Fork 43
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
Nabc ~ handling broken #1015
Comments
Will you have time to look at this or do you need someone else to do it? |
I'm afraid I'll need help, this are of TeX I'm constantly struggling with. |
And it would be nice to cover this case in the testsuite once it is fixed, so that it doesn't reappear, the ~ parsing in TeX is a nightmare. |
Worst case, if nothing else works, we could let gregorio replace the ~ in nabc strings with some other character (one that doesn't appear elsewhere in the nabc grammar, and doesn't have so many catcode issues as |
Untested hack |
I think you hack is what would work best. I've reduced the catcode problem to: \def\mydefmacro#1{#1}
\def\macrowithtild{%
\begingroup\catcode`\~=11{}%
\domacrowithtild%
}
\def\domacrowithtild#1{%
#1\endgroup %
}
\macrowithtild{a~b}
\mydefmacro{\macrowithtild{a~b}}
\bye (to be compiled with The problem is that we're using the second form (which doesn't work): we use Can you test your hack? |
Alternately, It might be possible to use a variation of the code I use for sending headers directly into Lua. I escape troublesome characters into something that escapes into a character under Lua but doesn't have issues on the TeX side. |
I'm not really sure about that... I think we would run into the exact same problem |
oh sorry, you're right, I think that's even better indeed |
Looking at the code, I also noticed that |
the nabc parser just needs to be able to parse (you're right about the |
FYI, I've tested my patch and it seems to work. For the testsuite, we probably want: |
@eroux Lua will evaluate \xyz automatically. If we use my alternative, |
Indeed, I forgot to remove the escaping in my tests. Well, this solution is really good, let's use it! |
I won't be able to work on this today anymore, I'll come back to this tomorrow if not done already |
I'll prepare a pull request for this later this evening. |
Just installed 4.1 and noticed that tilde handling is broken.
...
nabc-lines: 1;
...
Test(g|po~)
displays normal porrectus like Test(g|po) rather than the liquescent diminutive one, something doesn't change the catcode to parse it properly. The *.gtex file contains correct stuff.
The text was updated successfully, but these errors were encountered: