TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I try to circle a small letter, compile (using glyphtounicode.tex), and then paste the resulting text, the combining circle (U+20DD) appears before the letter (here: "b") even though it, being a Unicode combining character, should always appear after.

\input glyphtounicode

%\newcommand*{\textcircledcorrected}[1]{\BeginAccSupp{method=hex,unicode,ActualText=???? 20DD}\textcircled{#1}\EndAccSupp{}}

a\textcircled{\tiny b}c
%a\textcircledcorrected{\tiny b}c

(This problem does not arise when the letter is of sufficient size.)

When I try to fix this using accsupp (see the commented-out lines above), I run into an impasse: If I use the method=hex and unicode options, I can specify the combining circle (U+20DD) as 20DD, but I'd need to convert the letter argument (#1) to its Unicode codepoint, or I'd need some way of specifying the U+20DD character otherwise (using perhaps the method=pdfstringdef option) while keeping the #1-argument as is.

Unfortunately I cannot use UTF-8 as the input encoding on my system.

Is there a good way of defining a \textcircledcorrected command (using accsupp I suppose) that always pastes the combining circle after the enclosed character?

share|improve this question
up vote 5 down vote accepted

\pdfstringdef supports \textcircled, thus the following works, if #1 contains one symbol:

\input glyphtounicode




a\textcircledcorrected{\tiny b}c


BTW, without accsupp the PDF code contains the characters in the right order, #1 comes first, then the circle. Because of the overlapping, the circle is put a little to the left. The amount of the left shift is larger for the letter in \tiny. Thus it depends on the heuristics, how to deal with that in the PDF viewer. Your PDF viewer apparently decided to switch the characters in that case.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.