I want to calculate the ideal size of figures that I export from R and include in LaTeX documents (so the text size of the figure labels is in a known proportion to the font size of the resulting document). However, for twocolumn documents I don't know how LaTeX calculates \linewidth. Is there a formula on how to calculate this? I would need something like:
(paperwidth - margins)/2 - distance_of_the_columns_as_a_function_of_font_size
Of course, I could compile the pdf and include
to get the linewidth of the current document (which I could then provide manually to R), but I want to write a R script that I can run "blindly" and that calculates the required values from the plain .tex file automatically.
Edit: I tested
for 8pt, 10pt, 11pt and 12pt article and scrartcl documents and always got 10pt, hence I assume the value is constant for regular cases. This will make things fairly easy, since
\columnwidthwill then be:
(\paperwidth - margins - 10pt)/2```