I'm very new to LaTeX but have found it to be enjoyable to work with. Lately I've been focusing on how to get output that will copy/paste well from PDF with special characters. Currently, XeLaTeX with the Fontspec package seems to do the job rather nicely. However, I notice that subscripts and superscripts within the context of math, when copy/pasted, result in the unicode character for the full-sized glyph rather than the unicode character for the sub or super script. Why is that?


1 Answer 1


Unicode superscripts are handy for small in-text superscripts such as x² but they mostly would get in the way in math typesetting where you need to position superscripts at different heights depending on the size of the base, or the presence of a subscript, and you want the formatting of x^2 to be consistent with that of x^{(x+\sqrt{y})} which is difficult to achieve if "simple" cases are set by the font machinery using Unicode superscript characters from the base fonts and "complicated" cases are set by the math layout engine using a script sized font.

  • I think the question is not exactly about typesetting using Unicode superscript characters, but about why, when one copies from the PDF, the copied text doesn't contain Unicode superscripts. Nevertheless the reasons listed in this answer still apply. Commented Apr 30, 2018 at 23:54
  • can't you improve that: there is still one comma (even two! I am disappointed) in your paragraph, which allowed me to take my breath midway :)
    – user4686
    Commented May 1, 2018 at 9:44
  • Aha! This is a helpful reminder to me that LaTeX is first and foremost intended for layout and one should NOT cast cares of data definition upon it. Many thanks to all. Commented May 3, 2018 at 13:00
  • @RobertBrowder actually I would draw the opposite conclusion from this answer. If you write x^2 or \operatorname{power}(x,2) the 2 is the same thing, the fact that one notation raises it in a smaller font is purely a visual artefact. That said it is more natural to use the same (standard) 2 in the encoding of both if you want to use the same Unicode character for the same semantic data. Commented May 3, 2018 at 13:12
  • @jfbu IchkönnteesaufDeutschschreibenundkeineKommasoderLeerzeichenhaben. Commented May 3, 2018 at 13:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .