I have the following nomenclature in latex
\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*}
and the following main document:
\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'.
When the nomenclature reaches a certain size something really strange happens. Normally the nomenclature should be displayed at the beginning as you can see in the main document \input{sections/00_nomecl}. However, after a certain size it (almost) at the very end of the document. More strangley, all tables all of a sudden are at the end of the document and not on the places where they should be. So after the nomenclature reacheas a certain size something is triggered in latex to put all tables at the end which I don't understand and don't want to have (as it is extremely weird). Do you know how to avoid this? How can I tell latex to just maintain the structure of the document with all the tables at their positions and the nomenclature should be as long as it is.
framedin a specific spot, then don't put it in atable*. The entire point oftableis to let LaTeX put it where it thinks best. Your life will be easier if you let LaTeX do that, but it sounds like you are trying to override LaTeX. – Teepeemm Mar 06 '24 at 19:21tableenvironment. ... – Teepeemm Mar 07 '24 at 13:11tableenvironment in the first place. You don't want it to float, you've not labeled it as a "Table" (that I've seen), you don't have a tabular inside it (which isn't necessary for it to be a table, but maybe you thought so). What are you wanting to gain from having it be atable*? Do you just want it to span both columns? – Teepeemm Mar 07 '24 at 13:13\twocolumn[{ \begin{framed} ... \end{framed} }]. See https://tex.stackexchange.com/q/211148/107497 – Teepeemm Mar 08 '24 at 03:59