bugtipauni - Bugs: bug #609, Loading xeCJK with tipauni messes...

Show feedback again

You are not allowed to post comments on this tracker with your current authentification level.

bug #609: Loading xeCJK with tipauni messes up position of some IPA diacritics

Submitted by:  Jigsaw <jigsaw>
Submitted on:  Sat Sep 16 23:30:56 2023  
Category: NonePriority: 5 - Normal
Severity: 3 - MinorStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Sun Sep 17 16:17:16 2023, comment #1:


Thanks for raising this, but I am afraid this isn't a bug in my package. A package globally changes the way characters are printed which messes up the expected typesetting of my package. I also appreciate the patch that you have sent and the efforts taken by its author, but I don't think it's a good idea to add this globally in the package as not everyone will be using XeCJK. For normal users, the package does produce the expected output, so why to patch the code? I don't want to mess things up with the normally working codes. I advise you to use the patch locally.

निरंजन <niruvt>
Project Administrator
Sat Sep 16 23:30:56 2023, original submission:

Original issue is described at https://tex.stackexchange.com/questions/696172/tipauni-xecjk-loading-xecjk-messes-up-position-of-ipa-diacritics.
Loading tipauni with xeCJK changes the spacing of some IPA diacritics. For instance, consider the following minimal example:

\usepackage{xeCJK} % order of loading does not matter

This produces what is in "bad.png," instead of the expected "good.png."

As TeX Stack Exchange user egreg identified, this is related to the interchar tokens xeCJK activates. When xeCJK is not loaded:
....\TU/DoulosSIL(0)/m/n/10 m̽m̩

And when it is:
....\TU/DoulosSIL(0)/m/n/10 m
....\kern -0.0002
....\kern 0.0002
....\TU/DoulosSIL(0)/m/n/10 ̽
....\kern -0.0002
....\kern 0.0002
....\TU/DoulosSIL(0)/m/n/10 m
....\kern -0.0002
....\kern 0.0002
....\TU/DoulosSIL(0)/m/n/10 ̩
....\kern -0.0002
....\kern 0.0002

egreg proposes the following patch to `\textipa`:
\RenewDocumentCommand\textipa{ +m }
\l__tipauni_extras_tl % <--- added
\cs_set_eq:NN \* \tipaunistar
\cs_set_eq:NN \: \tipaunicolon
\cs_set_eq:NN \; \tipaunisemicolon
\cs_set_eq:NN \! \tipaunibang
\cs_set_eq:NN \| \tipaunipipe
\cs_set_eq:NN \t \tipaunit
\seq_map_inline:Nn \l__tipauni_remove_from_accents_seq
{ \tl_remove_all:Nn \l_text_accents_tl {##1} }
\tl_set:Nx \l__tipauni_textipa_tl { \text_expand:n {#1} }
\escapechar = `\\
\tl_set:Nx \l__tipauni_textipa_tl
{ \exp_args:No \__tipauni_act:n \l__tipauni_textipa_tl }
\escapechar =
\int_use:N \escapechar

\tl_new:N \l__tipauni_extras_tl

\tl_set:Nn \l__tipauni_extras_tl { #1 }



This fixes the issue.

Jigsaw <jigsaw>


Attached Files
file #525:  bad.png added by jigsaw (6kB - image/png - Example of actual and expected output for two diacritics)
file #526:  good.png added by jigsaw (6kB - image/png - Example of actual and expected output for two diacritics)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by niruvt (Posted a comment)
  • -unavailable- added by jigsaw (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    2 latest changes follow.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat Sep 16 23:30:56 2023jigsawAttached File-=>Added bad.png, #525
      Attached File-=>Added good.png, #526
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup+gray