Closed leomayer closed 3 years ago
It's not random... Whenever one of the \test...
commands is used at the beginning of the lua-ul command, the space immediately before the command is affected by the lua-ul command too. That's an artifact of how LaTeX inserts italic correction there: \texttt
and friends remove the last space (and penalty), add some italic correction and then reinsert the space (and penalty). The issue is that his reinsertion happens inside of \highLight
and therefore the space is highlighted.
I'll have to think about this to see if it can be avoided.
If you don't need italic correction you can avoid this by using \ttfamily
instead:
\newcommand{\code}[1]{\highLight[{[HTML]{D3D3D3}}]{\ttfamily #1}}
With random
I meant the space in front of the word. As you can see in the screenshot the width of highlighted text in front is not the same length. This seems to be corrected with 1.4.
With
random
I meant the space in front of the word. As you can see in the screenshot the width of highlighted text in front is not the same length.
They are just normal spaces, their width is influenced by TeX's justification. The first line is slightly stretched, so all spaces are a bit wider than in the second line which is set at the natural width.
This seems to be corrected with 1.4.
??? Where did you get a version 1.4?
This seems to be corrected with 1.4.
??? Where did you get a version 1.4?
Ohhh... seems like I missed something - its 1.3. :-/
Ohhh... seems like I missed something - its 1.3. :-/
Actually it's 0.1.3.
Anyway, this is fixed in the real v0.1.4.
When I highlight a text which is encapsulated in a
texttt
the highlighting seems to have random additional space in front. e.g.See as well https://tex.stackexchange.com/q/596753/48642. The reverse order of commands works fine.