投影仪包括带有屏幕截图的图形
我正在使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
最好的选择是在 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.
我已经做了你所做的事情,例如定义了
它适用于我当时使用的任何风格。该宏中包含的文件都是使用常用 Linux 屏幕捕获工具创建的 PNG 文件。
编辑:您可能需要调整输入文件的大小(高度和宽度)。结果对我来说相当不错(这是 2006 年的一次演示)。
I have done exactly what you do and e.g defined
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).
按如下方式缩放怎么样:
这对我有用。
How about scaling it as follows:
This works for me.
您是否尝试过将图像转换为
.eps
或.pdf
文件并在 LaTeX 中使用此文件?也许还可以尝试
latex
、dvips
和ps2pdf
。问题可能出在使用的查看器中,在 Linux 中我使用文档查看器或 ePDFViewer,并且输出比我在 Windows 中使用的 Adobe 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
andps2pdf
.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...