Skip to content

How to add underdots to Chinese text? #4682

Answered by memeplex
wdscxsj asked this question in Q&A
Discussion options

You must be logged in to vote

Here are a couple of quick solutions that come to my mind, probably there are much better ones and probably there is some Chinese specific thing for this.

#let dotted1(c) = context {
  let (width: wd, height: hd) = measure(".")
  box(place(dx: .5 * wd, dy: -.7 * hd, "."))
  c
}

#let dotted2(c) = context {
  let (width: wd, height: hd) = measure(".")
  box(stack(c, v(-.7 * hd), h(.5 * wd)   ".", v(-.3 * hd)))
}

a#dotted1[b]c

a#dotted2[b]c

You can experiment with math.attach also, but I think it's problematic because of #366. For example:

#let dotted3(c) = $attach(limits(upright(#c)), b: inline(dot))$

a#dotted3[b]b

Look how it's not the same "b".

Then again, try to find out whether th…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by wdscxsj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants