如何在 reStructuredText 中创建不间断空间? [英] How can I make a non-breaking space in reStructuredText?

查看:65
本文介绍了如何在 reStructuredText 中创建不间断空间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在 reStructuredText 中创建不间断空格?

How can I make a non-breaking space in reStructuredText?

一个明显但有问题的解决方案是:

An obvious but problematic solution is:

`word A`

但它可能会被不同的实现不同地对待,例如 rst2latex 或 rst2pdf.此外,它以斜体呈现.

But it might be treated differently by different implementations, such as rst2latex or rst2pdf. Plus it is rendered in italics.

推荐答案

我在这里没有看到问题,运行 docutils v0.9.至少 rst2latex 和 rst2html 在不间断空格方面表现得很好.Latex 生成 ~ 和 html 生成  当您输入不间断字符 (\xa0, \0240) 时.

I don't see the problem here, running docutils v0.9. At least rst2latex and rst2html are behaving properly regarding non-breaking whitespace. Latex generates ~ and html generates   when you input a non-breaking character (\xa0, \0240).

也许您有编辑器问题?如果您可以设法输入字符,docutils 将完成这项工作.

Maybe you have an editor issue ? If you can manage to input the character, docutils will do the job.

这篇关于如何在 reStructuredText 中创建不间断空间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆