[texworks] Some remarks
Herbert Schulz
herbs at wideopenwest.com
Thu Oct 30 17:29:38 CET 2008
On Oct 30, 2008, at 11:03 AM, Alain Delmotte wrote:
>
>
> Herbert Schulz a écrit :
>>
>> On Oct 30, 2008, at 9:27 AM, Jonathan Kew wrote:
>>
>>>>
>>>> Also, it would be good to have all shortcuts duplicated without "\"
>>>
>>> I'd be interested to hear what others think about this. The
>>> current list basically comes from what's distributed with TeXShop.
>>> I've noticed that some abbreviations are provided without \, but
>>> others aren't; I'm not a heavy user of these so I don't feel
>>> qualified to say what's most useful.
>>>
>>>
>>
>>
>> Howdy,
>>
>> There are two types of completions; one that is based on the
>> command itself and a second that is an abbreviation. Also, when the
>> completion code tries to find a completion it takes all the
>> characters between the point (the cursor) and a terminator character
> Yes if you expand at the end of the input; as I tend to insert the
> formatting commands after inputting the text "some tbcharacters"
> with the cursor after the b will not expand to \textbf{}. I think it
> is normal, that's why I'd like, at least for the most used commands,
> shortcuts for formatting on selections.
Howdy,
That should be a leading bf to get textbf{}. However, you are correct,
about not getting the expansion. Obviously the implementation is a bit
different between TeXshop (which is Mac only) and TeXWorks; if I have
bfacdeg with the cursor just after the bf and I expand, in TeXShop I
get \textbf{}acdeg with the cursor between the braces but no expansion
in TeXWorks.
>
>> (space, tab, linefeed(newline), period, comma, semicolon, colon,
>> {, }, (, ) or \ (actually the TeX Command Character which can vary
>> in different implementations). The { and \ also become part of the
>> expansion --- at least that is what it is in TeXShop and I believe
>> TeXWorks) as it searches to the left. If the character before the
>> text to be completed is NOT one of those you should use a \; e.g.,
>> `tt will NOT expand to `\texttt{} with the cursor between the
>> braces but `\tt will expand correctly.
> On my system it does, but I don't know if I didn't change tw-
> latex.txt yet.
>>
>> By the way, the `it' abbreviation doesn't expand to \textit{} at
>> all on my system. That is because one should mostly use \emph{}
>> (get that with the `em' abbreviation). You can add `it' to the tw-
>> latex.txt file if you
> But in tw-latex.txt there is:
> it:=\item#RET##INS#
> ito:=\item[#INS#]#RET#
> ....
> it:=\textit{#INS#}
> itd:=\itshape
> so it should, it is doing for the 3 others!!!
Hmmm... Open the tw-latex.txt file as UTF-8 (the bullet characters
will look like bullet characters--if they don't please DON'T change or
save the file since the encoding is wrong). Then change the first `it'
abbreviation it `item',
item:=\item#RET##INS#
and then the textit will show up when you type in `it' and press the
Tab key three times. Variations with options add an `o' and starred
variations )e.g., \section*{}) add `s'.
>
>>
>> Also, to keep things simple, there are duplicates but, hopefully,
>> they are set up so that the most used ones are chosen first. If
>> not, you can change the order in the tw-latex.txt file.
> Oh! I didn't know that the order was important; it opens
> possibilities for me.
>
> Thanks,
>
> Alain
>>
The tw-latex.txt file is searched from top to bottom, so order is
important.
Good Luck,
Herb Schulz
(herbs at wideopenwest dot com)
More information about the texworks
mailing list