Open corecode opened 12 years ago
This is not a complete fix. I think you should use '\\<\\d+pt\\>'
to avoid cases like 12ptabc
. Accordingly there should be a change later in this function: increase 2
to 3
because pt
has two characters
pointsize <- substr(docString, psLocation, psLocation +
attr(psLocation, "match.length") - 3)
Thanks, I fixed accordingly.
The previous regexp would match any number that was followed by either "p" or "t" and use this as the document point size. This led to
being interpreted as a 4pt document. As a result, plotted figures wound up with grossly scaled font nodes (scale=3 or similar).
We instead want to only match digits at the beginning of a word, followed by the string "pt".