简体   繁体   English

pdflatex删除了LaTeX中的En / em空间

[英]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: 我试图将LaTeX文档中的所有Unicode空格字符都作为逐字记录文本(例如\\verb#start end# ),但是我得到了三个不同的结果:

  • With no packages, the spaces are simply not there in the PDF file. 没有软件包,PDF文件中根本就没有空格。
  • with \\usepackage[utf8x,utf8]{inputenc} I get an error: "Unicode char \\u8: not set up for use with LaTeX." \\usepackage[utf8x,utf8]{inputenc}使用时出现错误:“ Unicode char \\ u8:未设置为与LaTeX一起使用。”
  • With \\usepackage[T1]{fontenc} I get rubbish, such as á . 使用\\usepackage[T1]{fontenc}我得到了诸如á垃圾。
  • 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. 使用XeTeX,所有空格字符都将替换为一些看起来像空格的空白空间,因此,当我将其复制回纯文本编辑器时,没有任何字符。

Full-blown Unicode input is almost impossible to support in vanilla TeX (of which pdflatex is a variant). 完整的Unicode输入几乎不可能在原始TeX中支持(其中pdflatex是其变体)。 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. 从技术上讲,正确的解决方法是改用xetex ,它是为Unicode设计的。 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? 还是真的可以处理任何逐字输入而无需预先付费的问题?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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