[OS X TeX] TeXShop on Tiger: Reply to Bruno

Richard Koch koch at math.uoregon.edu
Fri May 6 12:10:53 EDT 2005


Folks,

In general I don't like to clutter up the mailing list with messages  
about a mere front end.
Let me reply to Bruno in public, since that will give TeXShop users a  
chance to influence future
program design.

On May 4, 2005, at 9:44 AM, Bruno Voisin wrote:

> Something I just remarked with TeXShop on Tiger: the Preview Window  
> Magnification doesn't stick. On my setup it's set to 150, but  
> apparently that's not taken into account; instead, it seems Fit to  
> Window is always applied when a document is opened.

TeXShop uses the "Preview Window Magnification" number only if you  
have set the window magnification behavior to "Fixed Magnification."
I changed the default value for this preference to "Fit to Window"  
because I thought many users would prefer that mode. To obtain the  
old behavior, change back to "Fixed Magnification."  (I see that in  
Preferences this item is called "After Window Resize," which is  
definitely misleading. I'll change that.)
>
> What I also miss is no longer having Fit to Width as an available  
> magnification. It seems there's now only Fit to Window, with  
> different effects depending on whether Default Page Style is set to  
> Single Page or Multi-Page:

Originally TeXShop had rather primitive preview window display  
options. Then Mitsuhiro Shishikura rewrote the code. Apple's PDFKit  
design is almost isomorphic to Shishikura's design --- compliments to  
Shishikura for doing a good job! TeXShop still contains Shishikura's  
magnification code and his code to select pdf regions for drag and drop.

One feature of Shishikura's design isn't in PDFKit: the ability to  
fit magnification to width or length. That is why these features are  
missing from 2.01. I'd be very reluctant to add them back, since  
PDFKit commands would have to be overridden. In general, accepting  
Apple's design decisions leads to stable code, while trying to force  
changes leads to instabilities and compatibility problems in the future.
>
> - In Single Page, the magnification is set such that the whole page  
> fits within the window.
>
> - In Multi-Page, it is set such that the page width occupies the  
> whole width of the window.
>
> That makes sense.
>
> Thanks, in any case, for having fixed the bug in which, in previous  
> versions of TeXShop, when moving one page up or down, the lateral  
> centering of the page was lost.

These thanks, of course, go to Apple.
>
> A request: keyboard shortcuts for scrolling up or down, and also  
> one page up or down. It would be nice to be able to scroll a whole  
> document without having to use the mouse. Wait! After trying some  
> key combinations, it seems you can actually do this: Space scrolls  
> one screen down, and Shift-Space one screen up.

In earlier versions, we handled keystroke shortcuts ourselves. In  
2.01, I just accepted the default PDFKit behavior. So the left and  
right arrow keys move the display horizontally, the up and down arrow  
keys move the display up or down by a few lines, the page up and page  
down keys move up or down by a page, and the home and end keys go to  
the start and end of a document. Moreover, space goes one page down  
and shift-space goes one page up.

Users have pointed out that Preview adds other defaults to these and  
TeXShop should follow suit. In Preview, command-left arrow is page up  
and command-left arrow is page down. That will be trivial to  
implement and will appear in the next version. Also in Preview, left  
arrow and right arrow move left and right only if the horizontal  
scroll bar is active; otherwise they do page up and page down. I'll  
implement that.

In Preview, command[ and command] are shortcuts for Back and Forward.  
It would be trivial to implement that, but unfortunately TeXShop  
already uses these shortcuts for Indent and Comment. So a first  
question for users: can I change the shortcuts for Indent, Comment,  
Unindent, and Uncomment, and if so what should I use?

>
> A suggestion: something convenient in recent applications like  
> Pages and Keynote (from iWork) is in the Help menu, in addition to  
> the Help item itself, another Keyboard Shortcuts item opening a  
> separate help document (in Help Viewer) containing a table of all  
> keyboard shortcuts for the application.

Good suggestion; I'll try to do it after the rush of adding small  
features ends.
>
> I second the request, made last week-end, of being able to hard- 
> wrap text in TexShop. Possibly a switch enabling "Hard Wrap As You  
> Type", and a command "Hard Wrap", pretty much as for spell checking.

There are two problems with this common request.

The most serious is that I wouldn't use this feature. It is dangerous  
for a programmer to add a feature for others but not use it himself,  
because then the feature doesn't get seriously tested.

Since I don't use editors which work like this, I have some really  
elementary questions. If I'm typing a line and it gets too long, the  
cursor reaches back to a word ending and moves the text after that  
word to the next line. But what happens if I edit in the middle of a  
line? Do words at the end sort of dribble down to their own lines?  
What happens if I copy and paste? Do lines get reformatted? Etc. Etc.  
Pretty soon, what sounds like a simple change requires modifications  
all over the place.

The second problem is that NSTextEdit wasn't really designed for hard  
wrapping. There isn't any switch to just "turn it on." So I'd have to  
force that class to do things it wasn't designed to do, leading to  
possible problems along the lines mentioned in the "fit to width"  
discussion.

I'm not opposed to such a mode. We really need to find a volunteer  
who would actually use this mode to write the code. At present,  
TeXShop's editing code isn't factored out very well, so adding such a  
"hard wrap class" might be tricky, but I'd volunteer to do the  
factoring if someone else would write the new class.

>
> Finally: is it planned at some point to add to TeXShop the ability  
> to Cmd-Drag for discontinuous selection, and Alt-Drag for column  
> selection, as now allowed by NSTextView? (As I don't know whether  
> TeXShop uses NSTextView, this suggestion may make no sense at all.)

This would be trivial to implement. TeXShop does use NSTextView, and  
so in a sense these already work. The trouble is that Cmd-click
has been overridden for synchronization. Is there a reasonable  
substitute for Cmd-click for synchronization?
Or are folks so used to this that they don't want a change?

>
> Bruno Voisin

PS. In a later message, Bruno complained that hyperlinks don't work  
in 2.01. They do work, but you have to select the "A" tool to make  
them work. Probably I should add a command shortcut so that when  
another tool is selected you can temporarily return to the "A" tool.  
One trouble is that most command modifications are used with the  
magnification tools already, to select various magnification options.
> --------------------- Info ---------------------
> Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
>           & FAQ: http://latex.yauh.de/faq/
> TeX FAQ: http://www.tex.ac.uk/faq
> List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>
>
>

--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
           & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>





More information about the MacOSX-TeX mailing list