等宽字体的文本被压缩

等宽字体的文本被压缩

当一行中有太多字符时,空格会被压缩以适应这些文本。通常这是可以的。但现在因为我使用的是等宽字体,并且希望保持字符垂直对齐,有什么方法可以禁用此功能吗?

下面是一个 MWE。如你所见,第一行被压缩了。第二行的字符有正常的空格。奇怪的是,这只发生在中文字体上,英文字体表现正常。

在此处输入图片描述

%! TEX program = xelatex
\documentclass[11pt,letterpaper]{article}
\usepackage{geometry}
\geometry{margin = .75in}
\usepackage{parskip}
\usepackage{xeCJK}
\renewcommand{\familydefault}{\ttdefault}

\begin{document}
\raggedright
你好,世界。你好,世界。你好,世界。你好,世界。你好,世界。你好,世界。你好,世界。你好,世界。你好,世界。你好,世界。你好,世界。你好,世界。你好,世界。你好,世界。

Hello, here is some text without a meaning.  This text should show what a printed text will look like at this place.  If you read this text, you will get no information.  Really?  Is there no information?  Is there a difference between this text and some nonsense like not at all!  A blind text like this gives you information about the selected font, how the letters are written and an impression of the look.  This text should contain all letters of the alphabet and it should be written in of the original language.There is no need for special content, but the length of words should match the language. 
\end{document}

答案1

我看不懂文档,但可以通过一些猜测和自动翻译的帮助:标点符号有一个橡皮擦,您可以将其停用:

\documentclass[11pt,letterpaper]{article}
\usepackage{geometry}
\geometry{margin = .75in}
\usepackage{parskip}
\usepackage{xeCJK}
\xeCJKsetup{RubberPunctSkip=false}
\renewcommand{\familydefault}{\ttdefault}

\begin{document}
\raggedright
你好,世界。你好,世界。你好,世界。你好,世界。你好,世界。你好,世界。你好,世界。你好,世界。你好,世界。你好,世界。你好,世界。你好,世界。你好,世界。你好,世界。

Hello, here is some text without a meaning.  This text should show what a printed text will look like at this place.  If you read this text, you will get no information.  Really?  Is there no information?  Is there a difference between this text and some nonsense like not at all!  A blind text like this gives you information about the selected font, how the letters are written and an impression of the look.  This text should contain all letters of the alphabet and it should be written in of the original language.There is no need for special content, but the length of words should match the language.
\end{document}

在此处输入图片描述

相关内容