groff:我可以嵌入图像吗?

发布于 2024-08-29 16:52:06 字数 55 浏览 3 评论 0原文

我正在生成一些 troff 风格的文档。有没有办法将图像(jpg等)嵌入到 groff 文件中?

I'm generating some troff-style documentation. Is there a way to embed an image (jpg, etc) into a groff file?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

风吹雨成花 2024-09-05 16:52:06

取决于输出格式。如果您要创建 PostScript 文件,则可以使用 PSPIC,它使用 PS 文件本身和单个图像。例如:

.PSPIC image.ps

对齐等有点受限。默认情况下,它与中心对齐,但您可以使用 -L 或 -R 将其放在左角或右角。还有一些其他选项,请检查 groff_tmac这些的联机帮助页(搜索 pspic)。

如果您要创建网页,您可能需要使用 .IMG。语法是一样的。

Depends on the output format. If you are creating a PostScript file, you can use PSPIC which uses a PS file itself with a single image. For example:

.PSPIC image.ps

Alignment, etc is a bit limited. By default it is aligned to the center but you can put it at the left or the right corner using -L or -R. There are some other options, check the groff_tmac manpage for these (search for pspic).

If you are creating a webpage you might need to use .IMG instead. The syntax is the same.

弃爱 2024-09-05 16:52:06

我使用 groff 来准备数据分析报告,并且经常需要使用 Inkscape 在 R 之外调整我的图表。

以下内容可能不符合纯粹主义者的喜好,但它对我有用。生成图像时仔细命名图像,并为每个图像提供必要的垂直空间,添加适当的标签。

创建报告的 pdf(例如 tbl report.roff | eqn | groff -Tps -ms | ps2pdfwr - report.pdf)并使用 Inkscape(或任何其他 pdf 编辑器,如 Pdf Studio)进行复制粘贴报告 pdf 中的图像。

I use groff to prepare data analysis reports, and often need to tweak my graphs outside of R using Inkscape.

The following may not be to purists' liking but it works for me. Carefully name the images as you generate them, and provision the necessary vertical space for each image, adding appropriate labels.

Create the report's pdf (say tbl report.roff | eqn | groff -Tps -ms | ps2pdfwr - report.pdf) and use Inkscape (or any other pdf editor such as Pdf Studio) to copy-paste the images in the report's pdf.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文