[texshop] Line numbers in the edit window
Bruno Voisin
bvoisin at icloud.com
Mon Oct 17 19:39:00 CEST 2022
> On 17 Oct 2022, at 12:23, Bruno Voisin <bvoisin at icloud.com> wrote:
>
> Looking at TeXShop's source, the line number code
>
> NoodleLineNumberMarker.h
> NoodleLineNumberMarker.m
> NoodleLineNumberView.h
> NoodleLineNumberView.m
>
> [...]
>
> Maybe there's a way to modify this code so that the line numbers grow with the text size?
I'll probably be making an utter fool of myself, but this might be a matter of modifying line 104 of NoodleLineNumberView.m
return [NSFont labelFontOfSize:[NSFont systemFontSizeForControlSize:NSMiniControlSize]];
so as to replace NSMiniControlSize by the size of DocumentFontKey. But I have not the faintest idea of how to do this.
And this is assuming that the above wouldn't break the rest of the code there, which calculates the width of the line number column, the width of the "text" part of the Source window, and the resulting line breaks.
Bruno Voisin
More information about the texshop
mailing list.