%%Figure-9
\begin{figure}[t]
\figurebox{}{}{1}[fgene-10-00561-g009]
\caption{Ectopic expression of \textit{TaPP2C135} in
\textit{Arabidopsis}. \textbf{(A)}~Expression levels of}
\end{figure}需要将上面的数字文本放在段落的引文末尾,引文将在文本".... (\hyperrefF9{\textbf{ figure ~9}})中。“
好心帮助天才,我是初学者!
发布于 2019-07-09 19:26:56
在tex文件中,我们找不到具有简单逻辑的结尾段落。因此,我将该图放在了图引用的末尾。
use strict;
use warnings;
my $texcontent = ' Sample content...
Need to place the above figure text near to citation end of paragraph, Citation would be in text ".... (\hyperref[F9]{\textbf{Figure~1}})."
Need to place the above figure text near to citation end of paragraph, Citation would be in text ".... (\hyperref[F9]{\textbf{Figure~2}})."
Need to place the above figure text near to citation end of paragraph, Citation would be in text ".... (\hyperref[F9]{\textbf{Figure~9}})."
Need to place the above figure text near to citation end of paragraph, Citation would be in text ".... (\hyperref[F9]{\textbf{Figure~3}})."
%%Figure-1
\begin{figure}[t]
\figurebox{}{}{1}[fgene-10-00561-g009]
\caption{Ectopic expression of \textit{TaPP2C135} in
\textit{Arabidopsis}. \textbf{(A)}~Expression levels of}
\end{figure}
%%Figure-2
\begin{figure}[t]
\figurebox{}{}{1}[fgene-10-00561-g009]
\caption{Ectopic expression of \textit{TaPP2C135} in
\textit{Arabidopsis}. \textbf{(A)}~Expression levels of}
\end{figure}
%%Figure-3
\begin{figure}[t]
\figurebox{}{}{1}[fgene-10-00561-g009]
\caption{Ectopic expression of \textit{TaPP2C135} in
\textit{Arabidopsis}. \textbf{(A)}~Expression levels of}
\end{figure}
';
my ($pre,$match,$post) = "";
while($texcontent=~m/\%\%(Figure\-(?:[\w]+))\n?\\begin\{(figure\*?)\}((?:(?!\\end\{\2\}).)*)\\end\{\2\}/gs)
{
$pre = $pre.$`; $match = $&; $post = $'; (my $figId = $1)=~s/\-/\~/i; #%%Figure-1 replaced with Figure~1
if($pre=~m/$figId\}\}\)/i) #Searching the ID
{
$match=~s/\{figure/\{completedfigure/i; #Completed the figures changed to completedfigures.
$pre=~s/$figId\}\}\)/$&\n<figplacedhere>$match<figplacedhere>/i; #TAG Placed figures identification
$match = "";
}
$pre = $pre.$match; $texcontent = $post;
}
if(length $pre) { $texcontent = $pre.$post; }
$texcontent=~s/<figplacedhere>//g; $texcontent=~s/\{completedfigure/\{figure/g;
print "--\n$texcontent\n--\n";完全基于你的输入,我已经更新了代码,除非直到样本输入不同,否则代码不能工作。
https://stackoverflow.com/questions/56949723
复制相似问题