LaTeX completion

View: New views
16 Messages — Rating Filter:   Alert me  

LaTeX completion

by Alex Ross-9 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

LaTeX users:

My plan is to remove most of the completion commands and latex  
snippets from the LaTeX bundle.  They will be replaced by a single  
command.  I have a prototype under construction, you can see how it  
works here:

http://lasersox.net/LaTeXCompletion.m4v

Basically there is a tree of completions, and you can navigate them  
just by typing.  We can work citation completion, and all existing  
snippets into this system.

Thoughts?

_______________________________________________
textmate mailing list
textmate@...
http://lists.macromates.com/listinfo/textmate

Re: LaTeX completion

by David Whetstone-6 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Completion is nice, as long as it works like ⌘T, i.e. type any  
sequence of characters and not just the starting sequence.  That way I  
could still type 'enum' to expand an enumerate block, for example.

On Oct 9, 2009, at 7:30 PM, Alex Ross wrote:

> LaTeX users:
>
> My plan is to remove most of the completion commands and latex
> snippets from the LaTeX bundle.  They will be replaced by a single
> command.  I have a prototype under construction, you can see how it
> works here:
>
> http://lasersox.net/LaTeXCompletion.m4v
>
> Basically there is a tree of completions, and you can navigate them
> just by typing.  We can work citation completion, and all existing
> snippets into this system.
>
> Thoughts?
>
> _______________________________________________
> textmate mailing list
> textmate@...
> http://lists.macromates.com/listinfo/textmate


_______________________________________________
textmate mailing list
textmate@...
http://lists.macromates.com/listinfo/textmate

Re: LaTeX completion

by Alex Ross-9 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm afraid I can't support that kind of workflow, due to the  
limitations of the way the Dialog plugin works.

The work flow that I can support is typing:

\b⇥e⇥ for enumerate
\b⇥i⇥ for itemize

etc.

this is the same number of keystrokes as “enum⇥”, but has the  
advantage of being sort of mneumonic.  It will also suggest it to you  
everytime you press “\” so you won't forget to do it, which is the  
problem that I always have with completion.  Additionally, it can  
support MANY different snippets and you won't have to remember all the  
different key combinations.


On Oct 9, 2009, at 9:16 PM, David Whetstone wrote:

> Completion is nice, as long as it works like ⌘T, i.e. type any
> sequence of characters and not just the starting sequence.  That way I
> could still type 'enum' to expand an enumerate block, for example.
>
> On Oct 9, 2009, at 7:30 PM, Alex Ross wrote:
>
>> LaTeX users:
>>
>> My plan is to remove most of the completion commands and latex
>> snippets from the LaTeX bundle.  They will be replaced by a single
>> command.  I have a prototype under construction, you can see how it
>> works here:
>>
>> http://lasersox.net/LaTeXCompletion.m4v
>>
>> Basically there is a tree of completions, and you can navigate them
>> just by typing.  We can work citation completion, and all existing
>> snippets into this system.
>>
>> Thoughts?
>>
>> _______________________________________________
>> textmate mailing list
>> textmate@...
>> http://lists.macromates.com/listinfo/textmate
>
>
> _______________________________________________
> textmate mailing list
> textmate@...
> http://lists.macromates.com/listinfo/textmate


_______________________________________________
textmate mailing list
textmate@...
http://lists.macromates.com/listinfo/textmate

Parent Message unknown Re: LaTeX completion

by gkv1 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

In my opinion, one of the most useful things about the Textmate bundle  
is the snippets feature. I use snippets all the time, many of them  
customized. Thus, I type eq-tab and a nice equation environment  
appears, enum-tab and a nice enumerate environment appears, etc etc.    
If this were made less simple in any way, so that for example I had to  
navigate a tree to get to the most-used snippets, or if I couldn't  
design my own tab triggers, I would regard that as a retrograde step.  
I may be misunderstanding something here and I am sure that is not the  
intent, but I just wanted to make my point clear.

Relatedly, I mainly use pdflatex but sometimes latex (also bibtex,  
makeindex). I use skim.app as a viewer, although the current version  
of skim will sometimes freeze in snow leopard. I  also sometimes use  
xdvi.

I'm absolutely delighted that someone is looking at the latex bundle.

Geoff Vallis



>> On Oct 9, 2009, at 7:30 PM, Alex Ross wrote:
>>
>>> LaTeX users:
>>>
>>> My plan is to remove most of the completion commands and latex
>>> snippets from the LaTeX bundle.  They will be replaced by a single
>>> command.  I have a prototype under construction, you can see how it
>>> works here:
>>>
>>> http://lasersox.net/LaTeXCompletion.m4v
>>>
>>> Basically there is a tree of completions, and you can navigate them
>>> just by typing.  We can work citation completion, and all existing
>>> snippets into this system.
>>>
>>> Thoughts?
>>>
>>> _______________________________________________
>>> textmate mailing list
>>> textmate@...
>>> http://lists.macromates.com/listinfo/textmate

_______________________________________________
textmate mailing list
textmate@...
http://lists.macromates.com/listinfo/textmate

Re: LaTeX completion

by Piero D'Ancona :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Alex Ross <j <at> lasersox.net> writes:
>
> The work flow that I can support is typing:
>
> \b⇥e⇥ for enumerate
> \b⇥i⇥ for itemize
>

I love this. Add an easy way to customize it
(e.g. a text file containing the tree of completions)
and for me it's perfect.

Piero



_______________________________________________
textmate mailing list
textmate@...
http://lists.macromates.com/listinfo/textmate

Re: LaTeX completion

by Édouard Gilbert :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Le 10 oct. 09 à 07:23, Alex Ross a écrit :

> The work flow that I can support is typing:
>
> \b⇥e⇥ for enumerate
> \b⇥i⇥ for itemize
>
> On Oct 9, 2009, at 9:16 PM, David Whetstone wrote:
>
>> Completion is nice, as long as it works like ⌘T, i.e. type any
>> sequence of characters and not just the starting sequence.  That  
>> way I
>> could still type 'enum' to expand an enumerate block, for example.
>>
>> On Oct 9, 2009, at 7:30 PM, Alex Ross wrote:
>>
>>> LaTeX users:
>>>
>>> My plan is to remove most of the completion commands and latex
>>> snippets from the LaTeX bundle.  They will be replaced by a single
>>> command.  I have a prototype under construction, you can see how it
>>> works here:
>>>
>>> http://lasersox.net/LaTeXCompletion.m4v
>>>
>>> Basically there is a tree of completions, and you can navigate them
>>> just by typing.  We can work citation completion, and all existing
>>> snippets into this system.
>>>
>>> Thoughts?

Yes. First of all, I hope the snippets content won’t actually change.  
I’m quite used to the current ones and find most of them pleasing.  
I’d have no use for

\begin{figure}
\end{figure}

And I actually love the

\section{Title} % (fold)
\label{title}

% title (end)

And, perhaps more importantly, I’m worried of the systematic use of  
backslash. It’s a three-key on my french keyboard. Moreover, not  
three key I acces the most easily. So overuse of it, while logical  
when using LaTeX, would actually be quite a pain to use for me.

Édouard GILBERT
edouard.gilbert@...


[=?ISO-8859-1?Q?=C9douard_Gilbert.vcf?=]

BEGIN:VCARD
VERSION:3.0
N:Gilbert;Édouard;;;
FN:Édouard Gilbert
ORG:Université Charles de Gaulle — Lille 3;
EMAIL;type=INTERNET;type=WORK;type=pref:edouard.gilbert@...
TEL;type=WORK:+33 3 59 57 78 63
item1.ADR;type=WORK:;;INRIA Lille – Nord Europe\nParc Scientifique de la Haute Borne\nPark Plaza - Bât A - 40 avenue Halley;Villeneuve d'Ascq;;59650;France
item1.X-ABADR:fr
X-JABBER;type=WORK:edouard.gilbert@...
X-ABUID:C65CA7A2-8CEF-45B5-82FF-EA0F5934F3DE\:ABPerson
END:VCARD






_______________________________________________
textmate mailing list
textmate@...
http://lists.macromates.com/listinfo/textmate

Re: LaTeX completion

by Alex Ross-9 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Oct 11, 2009, at 7:14 AM, Édouard Gilbert wrote:

> Yes. First of all, I hope the snippets content won’t actually  
> change. I’m quite used to the current ones and find most of them  
> pleasing. I’d have no use for

Well, I'm not terribly interested in rewriting all the snippets.  I'm  
mostly interesting in making them more accessible.

> \begin{figure}
> \end{figure}

Snippets will be configurable as they are now.  you'll be able to  
disable the ones you don't like.

> And I actually love the
>
> \section{Title} % (fold)
> \label{title}
>
> % title (end)

You use the folding comments then?

>
> And, perhaps more importantly, I’m worried of the systematic use of  
> backslash. It’s a three-key on my french keyboard. Moreover, not  
> three key I acces the most easily. So overuse of it, while logical  
> when using LaTeX, would actually be quite a pain to use for me.

I agree this is sort of a problem, but it's not one I know how to  
solve for everyone.  If you don't like using the “\” key you can  
just remap some other key to call the command (which will insert the  
backlash for you and bring up the completion suggestions).  I doubt  
there is one particular key which will work for every different  
layout, and there is only one command you would have to change.

_______________________________________________
textmate mailing list
textmate@...
http://lists.macromates.com/listinfo/textmate

Re: LaTeX completion

by Piero D'Ancona :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On a related note: I have both the LaTeX and the
LaTeX 2 bundles installed (I guess this means I
installed your newer version side by side with the
official one).

When LaTeX 2 is active, pressing a left paren  (
inserts the matching open-close () as expected,
but NOT when in mathematical mode. In math
mode, only a left paren is inserted.

If I filter out LaTeX 2 and leave only LaTeX.tmbundle
active, the standard () is inserted also when
in math mode.

Is this a feature or a bug?

Thanks,
Piero




_______________________________________________
textmate mailing list
textmate@...
http://lists.macromates.com/listinfo/textmate

Re: LaTeX completion

by Guido Governatori-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On 17/10/2009, at 6:22 PM, Piero D'Ancona wrote:

> On a related note: I have both the LaTeX and the
> LaTeX 2 bundles installed (I guess this means I
> installed your newer version side by side with the
> official one).
>
> When LaTeX 2 is active, pressing a left paren  (
> inserts the matching open-close () as expected,
> but NOT when in mathematical mode. In math
> mode, only a left paren is inserted.
>
> If I filter out LaTeX 2 and leave only LaTeX.tmbundle
> active, the standard () is inserted also when
> in math mode.
>
> Is this a feature or a bug?
>

The smart typic pair is disabled in math mode. If you enable it again  
you get

\( \))

when you use the complete  feature.

I have tried the LaTeX 2 bundle and the complete feature. But is seems  
it does not work for  environments.

\b

completes to

\begin{}

but then when I insert e or i  they do not complete.

By the way, I had a document, spilt in several files, where watch  
document did not work after I have installed the LaTeX 2 bundle. It  
worked with the standard LaTeX bundle.

All the best

Guido
--
Guido Governatori
http://www.governatori.net/Textmate





_______________________________________________
textmate mailing list
textmate@...
http://lists.macromates.com/listinfo/textmate

Re: LaTeX completion

by Alain Matthes-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Le 17 oct. 2009 à 10:22, Piero D'Ancona a écrit :

> On a related note: I have both the LaTeX and the
> LaTeX 2 bundles installed (I guess this means I
> installed your newer version side by side with the
> official one).
>
> When LaTeX 2 is active, pressing a left paren  (
> inserts the matching open-close () as expected,
> but NOT when in mathematical mode. In math
> mode, only a left paren is inserted.
>
> If I filter out LaTeX 2 and leave only LaTeX.tmbundle
> active, the standard () is inserted also when
> in math mode.
>
> Is this a feature or a bug?
Hi,

I download the bundle today and I can't reproduce the error.
I use LaTeX with LaTeX 2 + LaTeXextension and LaTeX Author
  (my bundle).

@ Alex

  I see a comment about the color of math function ,
perhaps Alex, you want something like this





I need to work on the three languages that I created :
latex author, tex author and tex math author. For example,
  all the primitives of TeX are in TeX Author. It's possible
to get different syntax colors for tex primitives and latex macros.


I like your autocomplete command (awesome !)



Thanks Alex

Best regards

Alain Matthes


_______________________________________________
textmate mailing list
textmate@...
http://lists.macromates.com/listinfo/textmate

=?windows-1252?Q?Capture_d=92=E9cran_2009-10-25_=E0_22.53.23.png?= (10K) Download Attachment

Re: LaTeX completion

by Alain Matthes-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Le 17 oct. 2009 à 15:05, Guido Governatori a écrit :
>
> The smart typic pair is disabled in math mode. If you enable it again
> you get

Hi,

How you do that ? because The smart typic pair is enabled in math mode
  and I have the same problem with )) and ]]
>
> \( \))
>
> when you use the complete  feature.

>
> I have tried the LaTeX 2 bundle and the complete feature. But is seems
> it does not work for  environments.
>
> \b
>
> completes to
>
> \begin{}
>
> but then when I insert e or i  they do not complete.

you can complete with ⎋ , \begin{e  then ⎋ }

>
> By the way, I had a document, spilt in several files, where watch
> document did not work after I have installed the LaTeX 2 bundle. It
> worked with the standard LaTeX bundle.

I think you need to compile from the file master actually with laTeX 2
Perhaps, LaTeX 2 don't know what to do with

  %!TEX root =

but I think Alex can change this

Best Regards

Alain Matthes

_______________________________________________
textmate mailing list
textmate@...
http://lists.macromates.com/listinfo/textmate

Re: LaTeX completion

by Alex Ross-9 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Oct 25, 2009, at 5:00 PM, Alain Matthes wrote:

>
> Le 17 oct. 2009 à 15:05, Guido Governatori a écrit :
>>
>> The smart typic pair is disabled in math mode. If you enable it again
>> you get

This is sort of a bug (actually a bad design decision) that is on the  
list of things to fix.

>> \( \))
>>
>> when you use the complete  feature.
>
>>
>> I have tried the LaTeX 2 bundle and the complete feature. But is  
>> seems
>> it does not work for  environments.
>>
>> \b
>>
>> completes to
>>
>> \begin{}
>>
>> but then when I insert e or i  they do not complete.
>
> you can complete with ⎋ , \begin{e  then ⎋ }


The autocomplete command is depending on some patches I made to the  
Dialog2.tmplugin so it probably won't work properly until we get a new  
build of textmate.  You could also checkout Dialog2.tmplugin and build  
it on your machine.

>>
>> By the way, I had a document, spilt in several files, where watch
>> document did not work after I have installed the LaTeX 2 bundle. It
>> worked with the standard LaTeX bundle.

I'm not sure about why anyone uses the “watch document” command?  
It just does a new build every time you save right?  But ⌘R does a  
save before it builds.  If you want a rebuild to be triggered when you  
save, just rebind Typeset & View to ⌘S.

> I think you need to compile from the file master actually with laTeX 2
> Perhaps, LaTeX 2 don't know what to do with
>
>  %!TEX root =
>
> but I think Alex can change this

I am planning a little more flexible project master system.  I don't  
think it's very convenient setting %!TEX root = in _every_ file that  
is below the master.  Already, you can set TM_PROJECT_MASTER=relative/
path/to/project_master.tex as a project env variable or in TextMate's  
preferences to set the master file.  This is for the whole project  
though.  I'd like to (optionally) have separate master files for each  
directory (so you can setup a special master for your tikz files and  
so on).  Also, it would be great to have a per-language master files.  
So you can set TM_LATEX_MASTER and TM_RUBY_MASTER, and you'll have a  
different project master in latex files than in ruby files.

—Alex

_______________________________________________
textmate mailing list
textmate@...
http://lists.macromates.com/listinfo/textmate

Re: LaTeX completion

by Stéphane Thil :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Le 26 oct. 09 à 02:23, Alex Ross a écrit :

> I'm not sure about why anyone uses the “watch document” command?
> It just does a new build every time you save right?  But ⌘R does a
> save before it builds.  If you want a rebuild to be triggered when you
> save, just rebind Typeset & View to ⌘S.

Well,

- it is faster than command-R (I guess it only compiles the changed  
parts)
- I find it quite convenient to keep a continuous workflow (it runs  
and updates in the background), especially when working with two screens

Cheers,
S.
--
Ce message a été vérifié par MailScanner
pour des virus ou des polluriels et rien de
suspect n'a été trouvé.
CRI UPVD http://www.univ-perp.fr


_______________________________________________
textmate mailing list
textmate@...
http://lists.macromates.com/listinfo/textmate

Re: LaTeX completion

by Alex Ross-9 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Oct 26, 2009, at 4:19 AM, THIL Stéphane wrote:

>
> Le 26 oct. 09 à 02:23, Alex Ross a écrit :
>
>> I'm not sure about why anyone uses the ╲watch document╡  
>> command?
>> It just does a new build every time you save right?  But ③R  
>> does a
>> save before it builds.  If you want a rebuild to be triggered when  
>> you
>> save, just rebind Typeset & View to ③S.
>
> Well,
>
> - it is faster than command-R (I guess it only compiles the changed
> parts)

I think the speed differences are due solely to the fact that the ⌘R  
in the LaTeX bundle is really slow.  The command in my LaTeX2 bundle  
is much faster.

> - I find it quite convenient to keep a continuous workflow (it runs
> and updates in the background), especially when working with two  
> screens

It seems to me that if ⌘S triggered a background build directly, then  
you wouldn't miss the “watch document” command at all?

—Alex



_______________________________________________
textmate mailing list
textmate@...
http://lists.macromates.com/listinfo/textmate

Re: LaTeX completion

by Guido Governatori-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On 27/10/2009, at 8:32 AM, Alex Ross wrote:

> On Oct 26, 2009, at 4:19 AM, THIL Stéphane wrote:
>
>>
>> Le 26 oct. 09 à 02:23, Alex Ross a écrit :
>>
>>> I'm not sure about why anyone uses the ╲watch document╡
>>> command?
>>> It just does a new build every time you save right?  But ③R
>>> does a
>>> save before it builds.  If you want a rebuild to be triggered when
>>> you
>>> save, just rebind Typeset & View to ③S.
>>
>> Well,
>>
>> - it is faster than command-R (I guess it only compiles the changed
>> parts)
>
> I think the speed differences are due solely to the fact that the ⌘R
> in the LaTeX bundle is really slow.  The command in my LaTeX2 bundle
> is much faster.
>
Indeed the compilation from LaTeX2 is faster, but compilation from  
watch seems to be faster than LaTeX2.

>> - I find it quite convenient to keep a continuous workflow (it runs
>> and updates in the background), especially when working with two
>> screens
>
> It seems to me that if ⌘S triggered a background build directly,  
> then
> you wouldn't miss the “watch document” command at all?
>

I think "watch document" is useful when one is editing (formatting) a  
document, but when one is drafting/writing compiling is not so useful.  
In my workflow I tend to save quite often, but in many cases I don't  
care (and don't want) to compile the document, often the document  
would not compile correctly.

Guido

> —Alex
>
>
>
> _______________________________________________
> textmate mailing list
> textmate@...
> http://lists.macromates.com/listinfo/textmate

--
Guido Governatori
http://www.governatori.net/Textmate





_______________________________________________
textmate mailing list
textmate@...
http://lists.macromates.com/listinfo/textmate

Re: LaTeX completion

by Alex Ross-9 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Oct 26, 2009, at 3:56 PM, Guido Governatori wrote:

>
> On 27/10/2009, at 8:32 AM, Alex Ross wrote:
>
>> On Oct 26, 2009, at 4:19 AM, THIL Stéphane wrote:
>>
>>>
>>> Le 26 oct. 09 à 02:23, Alex Ross a écrit :
>>>
>>>> I'm not sure about why anyone uses the ╲watch document╡
>>>> command?
>>>> It just does a new build every time you save right?  But ③R
>>>> does a
>>>> save before it builds.  If you want a rebuild to be triggered when
>>>> you
>>>> save, just rebind Typeset & View to ③S.
>>>
>>> Well,
>>>
>>> - it is faster than command-R (I guess it only compiles the changed
>>> parts)
>>
>> I think the speed differences are due solely to the fact that the  
>> ⌘R
>> in the LaTeX bundle is really slow.  The command in my LaTeX2 bundle
>> is much faster.
>>
> Indeed the compilation from LaTeX2 is faster, but compilation from
> watch seems to be faster than LaTeX2.

I'll have to have a peek into the script to see why it might be faster.

>>> - I find it quite convenient to keep a continuous workflow (it runs
>>> and updates in the background), especially when working with two
>>> screens
>>
>> It seems to me that if ⌘S triggered a background build directly,
>> then
>> you wouldn't miss the “watch document” command at all?
>>
>
> I think "watch document" is useful when one is editing (formatting) a
> document, but when one is drafting/writing compiling is not so useful.
> In my workflow I tend to save quite often, but in many cases I don't
> care (and don't want) to compile the document, often the document
> would not compile correctly.

I generally know exactly when I want to compile a document, and that  
I'm also usually
interested in looking at the generated pdf immediately after the  
compilation is finished.
But I can see how it might be useful to have the document re-compiled  
automatically after
each save. But I think it would be better to hook into ⌘S so that a  
save _directly_
triggers a document-compile, instead of running a (perhaps delicate)  
background job to
watch for changes.

—Alex

_______________________________________________
textmate mailing list
textmate@...
http://lists.macromates.com/listinfo/textmate