简体   繁体   English

乳胶标签/参考为“假”外观

[英]Latex label/ref for “fake” external figure

some journals require each figure to be submitted in a separate document. 有些期刊要求每个数字都必须在单独的文件中提交。 However, they do want the figure legends to be listed in the main document. 但是,他们确实希望将图例列在主文档中。

I was thus hoping to do something along these lines: 因此,我希望按照以下方式做一些事情:

\section{Figure Legends}
\begin{description} 
 \item[Figure \ref{fig:fireAntBiology}] \label{fig:fireAntBiology} bla bla ants
\end{description}

This would still permit to \\ref the figure from the main text. 这仍然允许从正文中引用该图。 However, it doesn't work (The \\ref returns the number of section "Figure Legends"). 但是,它不起作用(\\ ref返回“图例”部分的编号)。 The following correctly gives a different number to each "figure": 以下正确地为每个“数字”赋予了不同的数字:

\item[Figure \ref{fig:fireAntBiology}] \begin{figure} \caption{\label{fig:fireAntBiology}} \end{figure} bla bla ants

However, it also places empty figure floats throughout the document. 但是,它还会在整个文档中放置空白图形。

A solution should be straightforward. 解决方案应该简单明了。 What am I missing? 我想念什么? Any ideas? 有任何想法吗?

Thanks! 谢谢! yannick 扬尼克

I would just use the endfloat package and split the resulting pdf in two separate documents for submission. 我将只使用endfloat软件包 ,并将生成的pdf分为两个单独的文档提交。 Endfloat takes care of all the references and puts all the floats at the end of your document. Endfloat负责所有引用,并将所有浮点数放在文档的末尾。

hmmmm one thing that sort of works is: 嗯,这类工作的一件事是:

\section{Figure Legends}
\begin{figure}[!h]
  \caption{\label{fig:fireAntBiology} bla bla ants}
\end{figure}

But then I need to struggle with Latex's random float placement... 但是然后我需要为Latex的随机浮动放置而苦恼...

Another possible solution would be to define the labels manually with the \\newlabel command in the preamble of the document. 另一种可能的解决方案是在文档的序言中使用\\ newlabel命令手动定义标签。 For example: 例如:

\newlabel{fig:fireAntBiology}{{1}{}}

Would replace all \\ref{fig:fireAntBiology} with 1. The obvious downside is that you now have to manually find the correct number for each figure, but it may work as a quick-and-dirty one-off solution. 将所有\\ ref {fig:fireAntBiology}替换为1。明显的缺点是,您现在必须手动为每个图形找到正确的数字,但是它可能是一种快捷,一次性的解决方案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM