in Getting length as number? I've seen a way to find out the length of \textwidth.
However, when instead using for example \getlength{hey} I receive an error. That occurred when using the code of all possible answers.
I'd actually like to go even further and obtain the length of something like | {\footnotesize hey}
Did I miss something unusually simple or is it just a standard beginner Latex problem?
UPDATE: I'd like to obtain the lengths in point as a return. Or any other small metric like sp. So say the length of | {\footnotesize hey} was equivalent to X pt I'd like to see X pt returned in the documents' PDF.
UPDATE2: Here is an example code of what I would like to use the received length for in this specific case; sorry for the inconvenience so far! Hope this clears up things.
\documentclass[a4paper,10pt]{article}
\usepackage[backend=biber, style=alphabetic, isbn=true, url=true, doi=true]{biblatex}
\usepackage{multirow}
\usepackage{array}
\newcolumntype{L}[1]{>{\raggedright\let\newline\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\arraybackslash\hspace{0pt}}m{#1}}
\setlength{\tabcolsep}{7pt}
\usepackage{calc}
\begin{document}
\begin{tabular}{ R{107pt} | L{278pt} | }
Something
& Something else \
& Something else \
& \begin{tabular}{ @{}l l L{\widthof{| some other text}} | }
Some & thing & {| some text} \
Some & thing & {| some other text} \
\end{tabular} \
\end{tabular}
\end{document}



\newlength{\mylength}in the preamble and then\settowidth{\mylength}{hey}\getlength{\mylength}in your document. – Henri Menke Dec 29 '20 at 21:16\settowidthwhich appears to be what you are looking for, – David Carlisle Dec 29 '20 at 21:20| {\footnotesize hey}. I added an update to clarify :) Edit: for the purpose of what you meant (I guess) I'm currently using the packagecalcand command\widthof. – Tork Dec 29 '20 at 21:45\settolengthin a length command and then use it anywhere a length can be used. Or as you say there is\widthoffrom calc (which is essentially the same thing, but hiding the internal length) – David Carlisle Dec 29 '20 at 21:59\newlength\zzz \settolength\zzz{| {\footnotesize hey}} the length is \the\zzz– David Carlisle Dec 29 '20 at 22:000.5\linewidthyou don't need to access\the\linewidthwhich will show the value in pt as a string of characters . – David Carlisle Dec 30 '20 at 10:48