有没有办法让LaTeX将图形放置在同一页上作为对该图形的引用? [英] Is there a way to get LaTeX to place figures in the same page as a reference to that figure?

查看:841
本文介绍了有没有办法让LaTeX将图形放置在同一页上作为对该图形的引用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用LaTeX和图形环境.

I am using LaTeX and the figure environment.

我非常熟悉该环境的参数:[htbp],而且我也通常熟悉LaTeX默认采用的决定放置每个图形的位置的策略.例如,将数字放在页面的顶部或底部.

I am well familiar with the parameters to that environment: [htbp], and I am also generally familiar with the strategies that LaTeX takes, by default, to decide where to put each figure. For example, by placing figures at the top or bottom of the page.

我想知道的是,是否有一个软件包,宏或一些命令可以提供,因此,如果我有一个单列文档,并且大多数情况下我只对图有一个文本引用,那么该图更有可能被放置在参考的同一页上?

What I am wondering is whether there is a package, macro, or some commands that I can give so that if I have a single-column document and I mostly have a single in-text reference to a figure, that the figure would be more likely to be placed in the same page of the reference?

例如,假设我有一个较长的段落,中间有一个\ ref {FIG:X}.呈现时,某些段落出现在分页符之前,而某些出现在分页符之后.我还可以将Figure命令放置在整个段落的前后.有没有一种方法可以将它与实际参考实际放置在同一页面中?

For example, imagine that I have a long paragraph which in the middle has a \ref{FIG:X}. When rendered, some of the paragraph appears before the page break, and some appears after the page break. I can also place the figure command somewhere before and after the whole paragraph. Is there a way to get it to actually be placed in the same page as the actual reference?

推荐答案

我不想听起来令人反感,但是有时候您想要的东西几乎是不可能的,而没有很多人工"调整分页符.

I don't want to sound too negative, but there are occasions when what you want is almost impossible without a lot of "artificial" tuning of page breaks.

如果标注自然地落在页面底部附近,并且图形落在下一页上,则将图形向后移动一页可能会使标注 forward 移位.

If the callout falls naturally near the bottom of a page, and the figure falls on the following page, moving the figure back one page will probably displace the callout forward.

我会建议(尽可能,并取决于数字的确切大小):

I would recommend (as far as possible, and depending on the exact size of the figures):

  • 在数字上加上[t](如果需要,可以加上[h])
  • 将图形放置在尽可能靠近正确"位置的位置([t]和[h]不同)
  • 在带有\ input的单独文件中包含图形,这将使它们在最终调整时更容易移动

根据我的经验,这是一个很大的空闲时间(:-)的吃光了

In my experience, this is a big eater-up of non-available time (:-)

在回应乔恩的评论时,我认为这是一个固有的难题,因为LaTeX团队绝不琐.您可能想阅读弗兰克·米特尔巴赫(Frank Mittelbach)的论文.

In reply to Jon's comment, I think this is an inherently difficult problem, because the LaTeX guys are no slouches. You may like to read Frank Mittelbach's paper.

这篇关于有没有办法让LaTeX将图形放置在同一页上作为对该图形的引用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆