[OS X TeX] TeXShop on Tiger: Reply to Bruno
Maarten Sneep
maarten.sneep at xs4all.nl
Sat May 7 13:40:54 CEST 2005
On May 6, 2005, at 6:10 PM, Richard Koch wrote:
> In general I don't like to clutter up the mailing list with
> messages about a mere front end.
I think this message is _exactly_ what this list is for, rather than
generic TeX question that get answered anyway.
[snip]
> 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?
I hardly ever indent or comment a pdf file ;-). I think it is not a
problem to overload these command-key shortcuts and use them bot for
source-display (where they perform an action on the source) and on
the preview (where they go back and forth).
>> 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 main reason I can see for this request is for version control
systems (CVS, subversion, ...) and working with other writers (on
other platforms). To merge back changes, the most commonly used tool
is diff (or some graphical shell around that (bbedit's variant,
available in TextWrangler as well, or Apple's FileMerge). All of
these tools work on a line-by-line basis. Due to the nature of TeX,
this comes down to paragraph-by-paragraph in most sources. This can
be a granularity that is fine enough for some, but in practice it is
too coarse. I have made a habit of starting each sentence on a new
line (and let sentences themselves wrap around). Some completion
algorithm could be used to wrap after a '. ' is typed, but that may
not suit everyone (and foul up some abbreviations in the process,
just look at the hoops TeX itself has to jump through to reliably
determine whether a period ends a sentence (and a double space has to
be inserted).
Re-wrapping the paragraph upon a re-write totally removes the benefit
of hard-wrapping, at least as far as I can see. Maybe you should add
a command to re-wrap the current paragraph, if users feel inclined to
trow out some of the benefits.
> 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.
This is a harder problem to solve.
> 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.
You _do_ use some form of version control for TeXShop itself, don't
you? At the very least it will give you some experience with the
issues involved. (Related: I think it would be a good idea to develop
TeXShop in a public location - SourceForge, Sarovar.org - as it would
involve more developers more directly).
> 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?
Cmd-doubleclick for syncing seems fine. Or just press 'Esc' to sync
with the text-cursor.
> 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.
Is there a specific reason that hyperlinks do not work in a mode that
is not the 'A' tool? What about switching temporarily if the cursor
is over a hyperlink?
Maarten
--------------------- 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 macostex-archives
mailing list