英文:
Rendering Swedish Å Ä and Ö with groff, mupdf
问题
我正在学习使用groff作为替代Latex,并在渲染字符Å、Ä和Ö方面遇到困难。
在仅英文环境下,我一直在运行groff命令:
$ groff -ms example.ms -T pdf > example.pdf
然后用以下命令查看PDF文件:
$ mupdf example.pdf
我在groff_tmac(5)的手册页中看到有对瑞典语的支持,但当我尝试将手册页中的法语示例推广到瑞典语时,我没有获得想要的结果。我仍然在每个Å、Ä或Ö的位置得到两个奇怪的字符。
我尝试了以下命令:
$ groff -ms -msv example.ms -T pdf > example.pdf
我已经在瑞典和英语的网站上搜索了很多,但没有找到任何示例。我不需要答案,只需要知道比我聪明的人会从哪里开始查找。我身边的人只建议我使用Latex,但我决心使用更轻量的Groff。
我期望能够使Å、Ä和Ö打印得漂亮,以便我可以使用groff来完成我的作业,而不是使用Latex。
谢谢!
英文:
I am learning to use groff as an alternative to Latex and am struggling with rendering Å Ä and Ö
characters.
In an English only setting, I have been running groff with:
$ groff -ms example.ms -T pdf > example.pdf
and then viewing my pdf with :
$ mupdf example.pdf
I see in the man pages groff_tmac(5) that there is support for Swedish and when I try to extrapolate the example from French in the man pages to Swedish I do not achieve the results I want. I am still getting two strange characters in place of every Å, Ä, or Ö.
I am trying the command
$ groff -ms -msv example.ms -T pdf > example.pdf
I have scoured the web both in Swedish and English (Swedish results even worse...seems like no one is using Groff) and am finding zero examples.
I don't need the answer, just where someone smarter than myself would start looking. People in my circle just suggest Latex but I am determined to use the much lighter Groff.
I am expecting to have Å Ä and Ö print nicely, so I can do my assignments in groff instead of Latex.
Thank You!
答案1
得分: 2
以下是您要翻译的内容:
When I have accented or non-standard-ascii characters in my input text, I run the inputfile through preconv
, which solves almost all my problems.
preconv inputfile | groff > outputfile
If you dislike typing the separate preconv
, you can also run groff
with -k
.
If I use the following inputfile:
test
.br
I am expecting to have Å Ä and Ö print nicely,
and run it through preconv
, I get
.lf 1 inputfile
test
.br
I am expecting to have \[u00C5] \[u00C4] and \[u00D6] print nicely,
Of course, you can put in the \[u00C4]
etc. by hand, but that makes groff
a lot less lightweight. And the output of groff
then becomes:
英文:
When I have accented or non-standard-ascii characters in my input text, I run the inputfile through preconv
, which solves almost all my problems.
preconv inputfile | groff > outputfile
If you dislike typing the separate preconv
, you can also run groff
with -k
.
If I use the following inputfile:
test
.br
I am expecting to have Å Ä and Ö print nicely,
and run it through preconv
, I get
.lf 1 inputfile
test
.br
I am expecting to have \[u00C5] \[u00C4] and \[u00D6] print nicely,
Of course, you can put in the \[u00C4]
etc. by hand, but that makes groff
a lot less lightweight. And the output of groff
then becomes:
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论