简体   繁体   中英

En/em space in LaTeX removed by pdflatex

I'm trying to include all the Unicode whitespace characters in a LaTeX document as verbatim text (eg \\verb#start end# ), but I've gotten three different results:

  • With no packages, the spaces are simply not there in the PDF file.
  • with \\usepackage[utf8x,utf8]{inputenc} I get an error: "Unicode char \\u8: not set up for use with LaTeX."
  • With \\usepackage[T1]{fontenc} I get rubbish, such as á .
  • With XeTeX all the spacing characters are replaced by some space-looking empty space, so that when I copy it back to a plaintext editor there is no character.

Full-blown Unicode input is almost impossible to support in vanilla TeX (of which pdflatex is a variant). There are just too many characters to set up enough fonts to handle everything that might occur; there are many partial solutions, but no complete ones.

The TeXnically correct way to go about this is to use xetex instead, which was designed with Unicode in mind. That said, don't all spaces look pretty much the same? What do you actually want rendered? Or is the problem really to be able to process any verbatim input whatsoever, without pre-munging?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM