Skip to content

Commit

Permalink
Version 4.18
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Koch committed Nov 30, 2018
1 parent 8f8a5f5 commit 2a2148d
Show file tree
Hide file tree
Showing 113 changed files with 2,905 additions and 596 deletions.
122 changes: 122 additions & 0 deletions AboutFiles/about418.rtfd/TXT.rtf
@@ -0,0 +1,122 @@
{\rtf1\ansi\ansicpg1252\cocoartf1671\cocoasubrtf200
\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fnil\fcharset0 HelveticaNeue;\f2\fnil\fcharset0 Menlo-Regular;
}
{\colortbl;\red255\green255\blue255;\red0\green0\blue0;\red0\green0\blue0;\red255\green255\blue255;
\red92\green38\blue153;\red196\green26\blue22;}
{\*\expandedcolortbl;;\cssrgb\c0\c0\c0\c84706\cname labelColor;\csgenericrgb\c0\c0\c0;\csgenericrgb\c100000\c100000\c100000;
\csgenericrgb\c35922\c14825\c60191;\csgenericrgb\c77000\c10200\c8600;}
\margl1440\margr1440\vieww17900\viewh15440\viewkind0
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0

\f0\fs24 \cf0 Version 4.18 has additions by Neil Sims,
\f1\fs28 \cf2 n.sims@sheffield.ac.uk, who is Head of the Department of Mechanical Engineering at The University of Sheffield. One of these is spectacular and I wish I had thought of it.\
\
1) The tags menu now automatically tags lines beginning with \
\
\\begin\{slide\}\
\\begin\{wideslide\}\
\\begin\{notes\}\
\\begin\{frame\}\
\
for users of Powerdot and Beamer.\
\
2) When a TeXShop engine job runs, it will find a new environmental variable set called TS_CHAR. This\
variable holds the current selection location in the source file, and can be used by the engine code.\
\
3) There is a new tool in the Source and Combined Windows toolbars called Labels. This behaves like the\
existing Tags tool; it is a pull down menu that lists all labels set in the program, and takes the user to the\
source for a particular label.\
\
Until version 4.18, the contents of both the tags and the labels popup menus were recreated every time the user typed even one key. Both steps require code which searches through the entire source file. In 4.18, an entirely new method is used to generate these contents. When the user first clicks the Tags or Labels toolbar item, a notification is sent and picked up by TeXShop; it then generates the menu contents on the spot. Since both generation steps were VERY fast, this seems to happen instantly. Clearly it is a BIG improvement in the efficiency of TeXShop code. \
\
However, in case of trouble, it is possible to switch back to the old method:\
\
defaults write TeXShop UseNewTagsAndLabels NO\
\
Before creating the new methods for filling these menus, I worked to protect the user against inefficiencies in the code. Hence a number of new hidden preference settings were invented. All are irrelevant with the new method.\
\
When Tags were added to the TeXShop editor, I feared that they would slow down the editor, since the tags list needs to be recreated every time the user types something. This wouldn't be so bad for a 30 page document, but how about a 500 page book? In practice, tags haven't caused this sort of problem. Nevertheless, there is now a way to turn off creation of tags, just in case:\
\
defaults write TeXShop CreateTagList NO\
\
But Labels raises the issue again, since now both Labels and Tags need to be created with each new source entry.\
\
So TeXShop has two built-in protections. First, if the Label item is not in the toolbar (or the user is using the full Split Window and the Label item is not in that toolbar), then the code which fills the label won't run. So there is an easy way to test things if Label seems to slow down the editor: remove Label from the toolbar.\
\
But there is a second foolproof method, just in case. There is a hidden preference setting to turn labels off:\
\
defaults write TeXShop CreateLabelList NO\
\
Moreover, the old method only fills label fields if the Label tool is in the active toolbar of either the source window or the split window holding both source and preview.\
\
Actually, the CreateLabelList and CreateTagList preferences also apply to the new method, although there is little point\
of this because if these new methods still slow the editor, just don't click on the tools!\
\
4) Here is the spectacular feature I wish I had thought of: The text in the TeXShop source window is an\
"attributed string." This means it is an ordinary (often very long) string, with an additional data structure associated\
with the string that lists assets like "text color" and "background color" for selected ranges of the string. Neil Sims noticed\
that one of the available attributes is "do not spell check this selection." So had added two lines to TeXShop's\
syntax coloring code. If that code marks a selection as a comment, this addition says it should not be spell checked.\
And if the code marks a selection as a command, the addition says it should not be spell checked.\
\
The consequence is that spell checking a tex document automatically skips tex commands for free, and there is little or\
no need for special tex-aware spell checkers. \
\
There is one disadvantage. If you use a tex-aware spell checker, it will catch a misspelled control word like \\begin\{documant\}\
while the new method won't. So two special hidden preference settings are provided for users who have a tex-aware checker and depend on checking the spelling of commands, or write long essays in comments and want to spell check these essays:\
\
defaults write TeXShop
\f2\fs24 \cf3 \cb4 TurnOffCommandSpellCheck
\f1\fs28 \cf2 \cb1 NO\
\
defaults write TeXShop
\f2\fs24 \cf3 \cb4 TurnOffCommentSpellCheck
\f1\fs28 \cf2 \cb1 NO\
\
defaults write TeXShop TurnOffParameterSpellCheck NO\
\
By default, the CommandSpellCheck will also turn off spell checking in the first two parameters after a command, of types [...] or \{...\} or mixed between these. This feature can be turned off by the third item.\
\
For some parameters, this is not desirable. For example, if the user types \\emph\{...\} or \\verbatim\{...\}, the required material is free form in which spelling errors are possible. So TeXShop has a list of commands in which it will not turn off spell checking for parameters.\
Here is the built-in list:\
\
\
However, users can extend this list:\
\
defaults write TeXShop
\f2\fs24 \cf3 \cb4 UserCommandsWithoutParameterSpellCheck -array ["\\\\emph", "\\\\verbatim" ]\
\
\
\ul 4a) \cf5 \cb4 \ulnone NSString\cf3 \cb4 *CreateLabelListKey = \cf6 \cb4 @"CreateLabelList"\cf3 \cb4 ;
\f0 \cf0 \cb4 \
\pard\tx593\pardeftab593\pardirnatural\partightenfactor0

\f2 \cf5 NSString\cf3 *CreateTagListKey = \cf6 @"CreateTagList"\cf3 ;
\f0 \cf0 \

\f2 \cf5 NSString\cf3 *UseNewTagsAndLabelsKey = \cf6 @"UseNewTagsAndLabels"\cf3 ;
\f0 \cf0 \

\f2 \cf5 NSString\cf3 *TurnOffCommandSpellCheckKey = \cf6 @"TurnOffCommandSpellCheck"\cf3 ;
\f0 \cf0 \

\f2 \cf5 NSString\cf3 *TurnOffCommentSpellCheckKey = \cf6 @"TurnOffCommentSpellCheck"\cf3 ;
\f0 \cf0 \

\f2 \cf5 NSString\cf3 *TurnOffParameterSpellCheckKey = \cf6 @"TurnOffParameterSpellCheck"\cf3 ;
\f0 \cf0 \

\f2 \cf5 NSString\cf3 *ExceptionListExcludesParametersKey = \cf6 @"ExceptionListExcludesParameters"\cf3 ;
\f0 \cf0 \

\f2 \cf5 NSString\cf3 *ExtraCommandsToCheckParametersKey = \cf6 @"ExtraCommandsToCheckParameters"\cf3 ;
\f0 \cf0 \

\f2 \cf5 NSString\cf3 *ExtraCommandsNotToCheckParametersKey = \cf6 @"ExtraCommandsNotToCheckParameters"\cf3 ;
\f0 \cf0 \
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0

\f2 \cf3 \cb4 \
\
\
5) Fixed a crash bug in the very old "Search" method of synchronization, reported by Michael Beeson. }
Binary file modified ChangesDocument/Changes.pdf
Binary file not shown.

0 comments on commit 2a2148d

Please sign in to comment.