当术语表达到一定长度时,表格的位置会发生很大变化

当术语表达到一定长度时,表格的位置会发生很大变化

我在乳胶中有以下命名法

\setlength{\nomitemsep}{-\parskip} % Baseline skip between items
\makenomenclature
\renewcommand*\nompreamble{\begin{multicols}{2}}
\renewcommand*\nompostamble{\end{multicols}}

\ExplSyntaxOn
\NewExpandableDocumentCommand{\strcase}{mm}
 {
  \str_case:nn { #1 } { #2 }
 }
\ExplSyntaxOff

\renewcommand\nomgroup[1]{%
  \item[\bfseries
    \strcase{#1}{
      {P}{Parameters}
      {A}{Acronyms}
      {V}{Variables}
      {I} {Indices}
      % add here other cases
    }%
  ]%
}


\begin{table*}[htb]
  \begin{framed}
  %Acronyms
    \nomenclature[A]{\acs{DHW}}{\acl{DHW}}


%
  % Variables
    \nomenclature[V]{$T^{\vn{Building}}_{t,b}$}{temperature of the building}
    \nomenclature[V]{$C^{total}$}{total costs for electricity}
    \nomenclature[V]{$P^{Peak}$}{electrical peak load}
    \nomenclature[V]{$V^{\vn{DHW}}_{t,b}$}{usable volume for DHW of the hot water tank}
    \nomenclature[V]{$Q_{t,b}^{\vn{SH}}$}{heating energy of the heat pump for space heating}
    \nomenclature[V]{$Q_{t,b}^{\vn{DHW}}$}{heating energy of the heat pump for DHW}
    \nomenclature[V]{$x_{t,b}$}{modulation degree of the heat pump for space heating}
    \nomenclature[V]{$y_{t,b}$}{modulation degree of the heat pump for DHW}
    \nomenclature[V]{$h_{t,b}^{\vn{runSH}}$}{binary variable indicating if the heat pump is running for space heating}
    \nomenclature[V]{$h_{t,b}^{\vn{runDHW}}$}{binary variable indicating if the heat pump is running for DHW}

    \nomenclature[V]{$h_{t,b}^{\vn{switchedOff}}$}{binary variable indicating if the heat pump is switched off}
    \nomenclature[V]{$P_{t,b}^{\vn{EV}}$}{charging power of the EV}
    \nomenclature[V]{$\vn{SOC}_{t,b}$}{state of charge of the EV}
    \nomenclature[V]{$P_{i}^{\text{PriceShift}\%}$}{share of shifted load using the Price-Shift-Operator}
    %\nomenclature[V]{$P_{i}^{\text{PeakShift}\%}$}{share of shifted load using the Peak-Shift-Operator}
    
   


     


    


    

    


    

    

    

    


    

%
  % Parameters
    \nomenclature[P]{$T^{\max}_{b}$}{maximum building temperature}
    \nomenclature[P]{$T^{\min}_{b}$}{minimum building temperature}
    \nomenclature[P]{$p_t$}{time variable electricity price}
    \nomenclature[P]{$^{\vn{DHWmin}}_{b}$}{minimum volume of the hot water tank}
    \nomenclature[P]{$^{\vn{DHWmax}}_{b}$}{maximum volume of the hot water tank}
    \nomenclature[P]{$d^{\vn{Temperature}}$}{factor for controlling the allowed deviation from the initial temperature}
    \nomenclature[P]{$d^{\vn{DHW}}$}{factor for controlling the allowed deviation from the initial DHW volume}
    \nomenclature[P]{$Q_{t,b}^{\vn{DemandSH}}$}{demand for space heating}
    \nomenclature[P]{$Q_{t,b}^{\vn{DemandDHW}}$}{demand for DHW}
    \nomenclature[P]{$Q_{t,b}^{\vn{LossesSH}}$}{energy losses of the heating system}
    \nomenclature[P]{$Q_{t,b}^{\vn{LossesDHW}}$}{energy losses of the hot water tank}

    \nomenclature[P]{$P^{\vn{HP}}_b$}{maximum electrical power of the heat pump}
    \nomenclature[P]{$\vn{COP}_{t,b}$}{Coefficient of performance of the heat pump}
    \nomenclature[P]{$k_b$}{maximum number of heat pump starts}
    \nomenclature[P]{${\vn{mod}}^{\min}$}{minimum modulation degree of the heat pump}
    \nomenclature[P]{$P_{t,b}^{\vn{EVMax}}$}{maximum charging power of the EV}
    \nomenclature[P]{$a_{t,b}$}{availability parameter of the EV}
    \nomenclature[P]{$\eta_{b}$}{charging efficiency of the EV}
    \nomenclature[P]{$P_{t,b}^{\vn{EVDrive}}$}{power consumption of the EV while driving}
    \nomenclature[P]{$C^{\vn{EV}}_b$}{energy capacity of the EV's battery}
    \nomenclature[P]{$P_{t,b}^{\vn{el}}$}{electrical power of the inflexible devices}




    

    

    

    

    


    


    


    

    






    % Index
    \nomenclature[I]{$b$}{building}
    \nomenclature[I]{$i$}{iteration}
    \nomenclature[I]{$t$}{time slot}
    \nomenclature[I]{$Z$}{total number of time slots}
    \nomenclature[I]{$B$}{total number of buildings}
%
%
    \printnomenclature
  \end{framed}
\end{table*}

以及以下主要文件:

\documentclass[5p,times,twocolumn]{elsarticle}
\usepackage{physics}
\usepackage{tabularx}
\usepackage{siunitx}
\usepackage{xcolor}
\usepackage{hyperref}
\hypersetup{hidelinks}
\usepackage{csquotes}
\usepackage{amssymb}% http://ctan.org/pkg/amssymb
\usepackage{pifont}% http://ctan.org/pkg/pifont
\newcommand{\cmark}{\ding{51}}%
\newcommand{\xmark}{\ding{55}}%
\usepackage{acro}
\include{sections/00_acro}
\graphicspath{{figures/}}
\usepackage{lipsum}
\usepackage{booktabs}
\usepackage{float}
\usepackage{comment}
\usepackage{subcaption}
\usepackage{framed} % Framing content
\usepackage{multicol} % Multiple columns environment
\usepackage{nomencl} % Nomenclature package
\usepackage{todonotes}

\usepackage{makecell}

\allowdisplaybreaks
\newcommand\vn[1]{\mathrm{#1}} % "vn": short for "variable name"

%Define the color of the links
\usepackage{xcolor}
\usepackage{hyperref}

\definecolor{myColor}{RGB}{0, 0.0, 0} 

\hypersetup{
    colorlinks=true,
    linkcolor=myColor,
    citecolor=myColor,
    urlcolor=myColor,
}


\journal{Applied Energy}

\begin{document}

\begin{frontmatter}

\title{Title}


\author[1]{A1}
\author[2]{A2}
\author[1]{A3}


\address[1]{Adress1}
\address[2]{Adress2}

\begin{abstract}
\input{sections/00_abstract}
\end{abstract}

\begin{comment}
%%Graphical abstract
\begin{graphicalabstract}
\includegraphics{grabs}
\end{graphicalabstract}

%%Research highlights
\begin{highlights}
\item Research highlight 1
\item Research highlight 2
\end{highlights}
\end{comment}

\begin{keyword}
%% keywords here, in the form: keyword \sep keyword
keyword 1 \sep keyword 2 \sep keyword 3 \sep keyword 4 \sep keyword 5 
%% PACS codes here, in the form: \PACS code \sep code
%\PACS 0000 \sep 1111
%% MSC codes here, in the form: \MSC code \sep code
%% or \MSC[2008] code \sep code (2000 is the default)
%MSC 0000 \sep 1111
\end{keyword}

\end{frontmatter}



%% \linenumbers

\input{sections/00_nomecl}
\input{sections/01_intro}

\input{sections/02}
\input{sections/03}
\input{sections/04}
\input{sections/05}
\input{sections/appendix}


\thispagestyle{empty} % Remove page number and header/footer on the first page


%% If you have bibdatabase file and want bibtex to generate the
%% bibitems, please use
%%
 \bibliographystyle{elsarticle-num} 
 \bibliography{refs}

%% else use the following coding to input the bibitems directly in the
%% TeX file.

% \begin{thebibliography}{00}

% %% \bibitem{label}
% %% Text of bibliographic item

% \bibitem{}

% \end{thebibliography}
\end{document}
\endinput
%%
%% End of file `elsarticle-template-num.tex'.

当命名法达到一定大小时,会发生一些非常奇怪的事情。通常,命名法应显示在开头,如您在主文档中看到的那样\input{sections/00_nomecl}。但是,超过一定大小后,它(几乎)出现在文档的最末尾。更奇怪的是,所有表格突然都出现在文档的末尾,而不是在它们应该在的位置。因此,在命名法达到一定大小后,LaTeX 中会触发某种操作,将所有表格放在末尾,这是我不理解也不想发生的(因为这非常奇怪)。你知道如何避免这种情况吗?我怎样才能告诉 LaTeX 只保持文档的结构,所有表格都放在它们的位置,并且命名法应该尽可能长。

答案1

您已告诉 LaTeX,表格*可以放在页面的顶部、顶部或底部h。这些都对表格的大小有限制,如果 LaTeX 不能满足这些限制,所有内容都会被推到文档的末尾(或下一个)。最好允许 LaTeX 将表格*放在自己的页面上,这样表格就可以稍微大一些。tb\clearpagep

有关更多详细信息,请参阅如何影响 LaTeX 中图形和表格等浮动环境的位置?

相关内容