在 LaTeX 中,有没有办法沿着边缘获得长线?

发布于 2024-08-31 21:21:40 字数 315 浏览 3 评论 0原文

我正在编写一份报告,有些元素超出了页边距(但有些元素几乎超出了页边距)。我想知道:有没有一种方法可以沿着边缘制作两条垂直线,每一侧各一条,以便人们可以轻松地看到它是否超出了垂直线?

(谷歌搜索,我只找到了关于页边注的信息。)

如下图:

|report text goes here|
|more text goes also h|ere
|and so on and so fort|h

这肯定会使纠正此类错误变得非常微不足道。 :)

请随意发布答案,以更“LaTeX 正确”的方式解决/显示这个问题,如果这有任何意义的话。

I'm working on a report, and some elements are outside the margins (but some are just barely outside the margins). I was wondering: Is there a way to make two vertical lines, one on each side, along the margins so that one can easily see if it goes outside them?

(Googling it, I only found information about margin notes.)

A figure is below:

|report text goes here|
|more text goes also h|ere
|and so on and so fort|h

It would certainly make correcting these kinds of mistakes very trivial. :)

Feel free to post answers that would solve/show this problem in a more "LaTeX-correct" way, if that makes any sense at all.

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

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

发布评论

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

评论(2

匿名。 2024-09-07 21:21:40

\documentclass 语句中使用选项 draft,例如:

\documentclass[12pt,a4paper,draft]{report}

这将在每个过满行的末尾产生一个小黑框(这就是 Johannes Schaub 必须做的)在他的评论中提到)。这使得很容易发现这些
不方便的过长行...

或者,您可以在序言中说 \sloppy 。然后,排版人员将对段落的灰度值不那么严格,并更频繁地避免“overfull \hbox”(更频繁的换行)。

Use the option draft in your \documentclass statement, e.g.:

\documentclass[12pt,a4paper,draft]{report}

This will produce a litte black box at the end of every overfull line (this is what Johannes Schaub must've been referring to in his comment). This makes it very easy to spot these
inconvenient overlong lines ...

Alternatively, you can say \sloppy in your preamble. The typesetter will then be less strict on the grey value of your paragraphs and avoid "overfull \hbox"es more often (more frequent linebreaking).

怪我闹别瞎闹 2024-09-07 21:21:40

如果您使用 pdflatex,请尝试 microtype 包。

If you're using pdflatex, try the microtype package.

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