[texshop] Line numbers in the edit window
Bruno Voisin
bvoisin at icloud.com
Mon Oct 17 12:23:29 CEST 2022
(Just a note to anybody considering answering this message: if you wish to answer to the list, not just me, make sure to use Reply-All not Reply. I almost forgot, again, and remembered at the last minute when I was about to press Send.)
> On 16 Oct 2022, at 15:11, Stephen Moye via texshop <texshop at tug.org> wrote:
>
> To my (admittedly aging) eyes the line numbers in the edit window are vanishingly small, virtually invisible, and certainly illegible. I have searched in vain in TeXshop.plist, CommentLines.pdf (contains information on hidden preferences) and StackExchange — all to no avail. How can Gentle User make the line numbers larger?
The line number size seems hardcoded in TeXShop's source, you cannot set it in the prefs, I think.
User's view
===========
I looked how things work in four editors that display line numbers:
- Two TeX-specific: TeXShop, Texifier (formerly Texpad).
- Two general-purpose: BBEdit, Xcode.
In the first two the line number size is fixed, in the last two it grows with the text size.
See the attached screenshots:
- TeXShop upper left, Texifier upper right, BBEdit lower left, Xcode lower right.
- Text size 18 pt.
- TeXShop and BBEdit use Menlo, Texifier Source Code Pro, Xcode SF Mono.
Something I never think about using is the Accessibility System Pref. I think Herb Schulz has some significant experience with it, maybe there's a way to use this pref to make line numbers more visible?
Programmer's view
==================
Looking at TeXShop's source, the line number code
NoodleLineNumberMarker.h
NoodleLineNumberMarker.m
NoodleLineNumberView.h
NoodleLineNumberView.m
has been borrowed from Paul Kim <https://www.noodlesoft.com/> who described it in a blog post
http://www.noodlesoft.com/blog/2008/10/05/displaying-line-numbers-with-nstextview/
The code now lives at
https://github.com/MrNoodle/NoodleKit
and seems not to have changed since it was posted 13 years ago. The only issue there was posted by Dick Koch.
Maybe there's a way to modify this code so that the line numbers grow with the text size?
Bruno
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot 2022-10-17 at 11.36.22.png
Type: image/png
Size: 1610983 bytes
Desc: not available
URL: <https://tug.org/pipermail/texshop/attachments/20221017/acb3eaa3/attachment-0001.png>
More information about the texshop
mailing list.