# Get the value of custom (pseudo?) length

I defined a custom length for horizontal separation of subfloats through

\DeclareFloatSeparators{halfgap}{\hskip0.5\columnsep}


and use it on a float by float basis with

\thisfloatsetup{subfloatrowsep=halfgap}


but I also need to use such length in a \fpeval calculation, is it possible?

• Sorry to have misled you! I comment instead of answer when I haven't tested the solution... Jun 10, 2021 at 12:32

You might say

\newcommand{\halfgap}{0.5\columnsep}
\DeclareFloatSeparators{halfgap}{\hspace{\halfgap}}


Then you can use \halfgap wherever you need to refer to the length.

Don't follow the suggestion to say

\newlength{\halfgap}
\setlength{\halfgap}{0.5\columnsep}


because this would fix the value as it is computed when processing the document preamble, whereas \columnsep might change later.