File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed
Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -536,9 +536,10 @@ DefConstructor('\ltx@centerline{}', sub {
536536 alias => ' \centerline' ,
537537 bounded => 1);
538538
539- # These should be 0 width, but perhaps also shifted?
540- DefMacro(' \llap{}' , ' \hbox to 0pt{\hss#1}' );
541- DefMacro(' \rlap{}' , ' \hbox to 0pt{#1\hss}' );
539+ # rely on RTL trickery to shift the \llap content over the previous text (see CSS)
540+ # the zero-width space prevents merging the two boxes in a single ltx:text
541+ DefMacro(' \llap{}' , ' \hbox to 0pt{\@ADDCLASS{ltx_llap}' . " \x{200B} " . ' \hbox{\@ADDCLASS{ltx_llap_content}#1}}' );
542+ DefMacro(' \rlap{}' , ' \hbox to 0pt{\@ADDCLASS{ltx_rlap}#1}' );
542543
543544DefMacroI(' \m@th' , undef , ' \mathsurround=0pt ' );
544545
Original file line number Diff line number Diff line change @@ -510,3 +510,15 @@ cite { font-style: normal; }
510510
511511.ltx_overlay {position : relative; }
512512.ltx_overlay > span : nth-child (2 ) {position : absolute; left : 0 ; }
513+
514+ /* \llap, \rlap */
515+ .ltx_llap , .ltx_rlap {
516+ white-space : nowrap; /* width 0pt causes extreme wrapping otherwise */ }
517+
518+ /* shift \llap over the previous text by shifting text direction */
519+ .ltx_llap {
520+ direction : rtl; }
521+
522+ /* restore LTR inside \llap */
523+ .ltx_llap_content {
524+ direction : ltr; }
You can’t perform that action at this time.
0 commit comments