投影仪包括带有屏幕截图的图形

发布于 2024-08-17 20:21:21 字数 515 浏览 9 评论 0原文

我正在使用 LaTeX-Beamer 类进行演示。每隔一段时间我就需要包含屏幕截图。当然,这些图形是基于像素的。我使用 includegraphics 像这样:

\begin{figure}
   \includegraphics[width= \paperwidth]{img/analyzer.png}
\end{figure}

或者通常是这样的:

\begin{figure}
   \includegraphics[width= 0.8\linewidth]{img/analyzer.png}
\end{figure}

这会导致所包含文本的可读性非常差,所以我要求您提供最佳实践:您如何包含包含文本的屏幕截图,考虑到,我将使用pdflatex输出PDF?

编辑:我想我正在寻找诸如投影仪中图像的 1:1 预设之类的东西。但是,[scale = 1.0] 没有达到我想要的效果。

I'm using the LaTeX-Beamer class for making presentations. Every once in a while I need to include screenshots. Those graphics are pixel-based, of course. I use includegraphics like this:

\begin{figure}
   \includegraphics[width= \paperwidth]{img/analyzer.png}
\end{figure}

or usually something like this:

\begin{figure}
   \includegraphics[width= 0.8\linewidth]{img/analyzer.png}
\end{figure}

This leads to pretty bad readibility of the contained text, so I'm asking for your best practices: How would you include screenshots containing text considering, that I will do the output PDF with pdflatex?

EDIT: I suppose I'm looking for something like an 1:1 presetation of the image within beamer. However, [scale = 1.0] doesn't achieve what I'm looking for.

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

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

发布评论

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

评论(4

追风人 2024-08-24 20:21:21

最好的选择是在 Latex 之外缩放图像以进行包含,并以 1:1 的比例包含它。 Latex 中的图形包完成的缩放效果不会像其他工具那样好。 Latex (Tex) 的浮点运算能力有限,而外部工具可以使用复杂的算法来获得更好的缩放效果。

另一种选择是仅使用屏幕截图的一部分,即您想要关注的部分。

编辑:如果您可以在截取屏幕截图之前更改字体大小,这是另一种选择 - 只需增加屏幕截图的字体大小即可。

当然,您可以将这两种方法结合起来。

Your best bet is to scale the image outside of Latex for inclusion, and include it in 1:1 ratio. The scaling done by graphics packages in Latex isn't going to be anywhere near as good as possible from other tools. Latex (Tex) has limited floating-point arithmetic capabilities, whereas an external tool can use sophisticated algorithms to get the scaling better.

Another option is to use only a part of the screenshot, the one you want to concentrate on.

Edit: If you can change the font size before taking the screenshot, that's another option—just increase the font size for the screenshots.

Of course, you can combine the two methods.

痴意少年 2024-08-24 20:21:21

我已经做了你所做的事情,例如定义了

\newcommand{\screenshot}[1]{\centerline{%
    \includegraphics[height=7.8cm,transparent]{#1}}}  % 7.8in

它适用于我当时使用的任何风格。该宏中包含的文件都是使用常用 Linux 屏幕捕获工具创建的 PNG 文件。

编辑:您可能需要调整输入文件的大小(高度和宽度)。结果对我来说相当不错(这是 2006 年的一次演示)。

I have done exactly what you do and e.g defined

\newcommand{\screenshot}[1]{\centerline{%
    \includegraphics[height=7.8cm,transparent]{#1}}}  % 7.8in

which worked with whatever style I was using at the time. The files included with this macro were all PNGs created with one the usual Linux screen capture tools.

Edit: You may have to play with the size (height and width) of your input files. It came out rather nice for me (and this was from a presentation in 2006).

辞慾 2024-08-24 20:21:21

按如下方式缩放怎么样:

\includegraphics[scale=0.5]{images/myimage.jpg}

这对我有用。

How about scaling it as follows:

\includegraphics[scale=0.5]{images/myimage.jpg}

This works for me.

如果没有你 2024-08-24 20:21:21

您是否尝试过将图像转换为 .eps.pdf 文件并在 LaTeX 中使用此文件?

也许还可以尝试 latexdvipsps2pdf

问题可能出在使用的查看器中,在 Linux 中我使用文档查看器或 ePDFViewer,并且输出比我在 Windows 中使用的 Adob​​e Reader 或 Acrobat 中差得多...

Have you tried to convert the image to .eps or .pdf file and use this file in LaTeX?

Maybe try also latex, dvips and ps2pdf.

Problem might be in used viewer, in Linux I use Document viewer or ePDFViewer and output is much worse than in Adobe Reader or Acrobat, which I use in Windows...

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