Unicode characters showing encircled alphanumerics

Guenter Milde milde at users.sf.net
Wed Dec 16 09:58:09 UTC 2020


On 2020-12-09, Pavel Sanda wrote:
> On Tue, Dec 08, 2020 at 09:47:53PM -0000, Guenter Milde wrote:
>> The various answers to
>> https://tex.stackexchange.com/questions/7032/good-way-to-make-textcircled-numbers
>> show, that there is no global winner.

>> * \raisebox{.5pt}{\textcircled{\raisebox{-.9pt} {8}}}

>> * \usepackage{pifont}

>>   \ding{172}--\ding{181} % seriffed fonts
>>   \ding{192}--\ding{201} % sans-seriffed fonts

>> * \usepackage{igo}
>>   \whitestone{1}--\whitestone{99}

>> * \usepackage{tikz}
>>    \newcommand*\circled[1]{\tikz[baseline=(char.base)]{
>>        \node[shape=circle,draw,inner sep=2pt] (char) {#1};}}
>>    \begin{document}
>>    Numbers aligned with the text:  \circled{1} \circled{2} \circled{3} end.
>>    \end{document}


>> One could consider providing a set of alias macros

>>   \textcircleda ... \textcircledz

>> with fallback definitions to allow customability by a power user.

> Thanks for the research. This seems getting complicated, what is your gut 
> feeling about the whole proposal now? Should we try to introduce it all?

In my view, the rule given in lib/unicodesymbols 

 # Do only add commands that give correct output, no hacks that look "similar".
 # Commands that modify other parts of the text should not be added either.

implies that we should not force one of the above workarounds.


However, the problem of alternative workarounds with different mileage to
different users/situations may require a more generic solution:

We could consider making the lib/unicodesymbols replacements more modular,
allowing a ~/.lyx/unicodesymbols to be partial and only update the LyX
default. This could be put even more forward with per-document additions.

For the related problem

  # Commands that modify other parts of the text should not be added
  # either. For this reason, all commands requiring txfonts, pxfonts,
  # fourier, mathdesign and MnSymbol are commented out (these packages
  # switch to fonts like times or palatino). mathabx is not used because of
  # many clashes with AMS math.

we could introduce package-dependent replacements that are
only activated when the required packages are already loaded by (or
compatible to) the document.

Günter



More information about the lyx-devel mailing list