On Sep 11, 2006, at 8:31 AM, Max Lein wrote: Just send them to me (or the list) when you are done. These can easily be included. The custom one are a bit more difficult:
Will do.
This won't be very easy to do, we'll have to figure out the best way to do it in terms of making sure the user stays up to date with newer versions of the bundle. We could tell you how to edit the language grammar to add these things, but that's not very easy to do and results in the user having local modifications to the bundle which might result in them not seeing any official changes that happen to the grammar.
Ok, I'm no expert, but I figure this is what many, many people want to do. Perhaps you could just list these commands in a separate file and include that file appropriately?
One thing that can be done now, is that you can create a new language that basically has the extra commands, and then includes the latex language, and you would be using that new language instead. I could offer a template language and tell you what you need to edit where. However, I would consider that only a temporary fix, because my understanding is that the next major version of TextMate will have tools that will make this customization process a lot easier/
powerful. That would be great.
That's exactly why I advocate the use of ( ).
(we could actually make it so that pressing the dollar sign produces the ( ) pair instead ;). )
;-)
I meant it was not possible without editing the language grammar. However I did add yesterday marginpar as a separate scope. It is meta.paragraph.margin.latex (not meta.paragraph.marginpar.latex as I mentioned in my last email).
True. Again, another quick and dirty hack by me ;-)
Can input do selective includes, like via \includeonly? [http:// www.eng.cam.ac.uk/help/tpl/textprocessing/teTeX/latex/latex2e-html/ ltx-245.html]
I was actually thinking, that one could simply duplicate the include drag command, and have a new one with input. Now, when you drag a file, you would be getting a menu with two options, and selecting one of them (with arrows or 1/2 numbers) would do the corresponding thing. We could do the same thing for graphics,
Nah, I think those people who want to change it, can do so easily.
I was just looking at: http://authors.aps.org/revtex4/auguide.ps Section 6.4 explicitly mentions using [, ] for unnumbered equations. And nowhere is it mentioned that (, ) should not be used (though it does mention $).
Well, we do what we are used to in the end ;-) I use align, because I got used to the way it, ahem, aligns formulas.
The AMS-LaTeX guidelines do make it clear that both options are fine: [ftp://ftp.ams.org/pub/tex/doc/amsmath/short-math-guide.pdf]
The only thing they discurage is the use of the eqnarray environment. They also recommend not using $$..$$
Working on it. Actually the grammar will undergo a series of changes in the next couple of weeks probably.
Great :-) You can also (ab)use me as a beta tester.
I've just added command for part, chapter, paragraph, subparagraph. The triggers now are:
Thanks a lot.
Also, all these commands now create the (fold) (end) comments described earlier, so they would fold and that should keep Jenny
happy. Even better!
Further, they have been designed so that you could execute them with a selection, and then they would wrap around that selection.
You thought of everything ;-)
I would do: select the second part of the formula: press cmd-x, move down until out of the environment, type eq (or the right shortcut) followed by cmd-{ to generate a new equation environment, and then press cmd-v.
No sure, but that's what in principle the closing tag feature should be for ...
Alternatively, you can again select the second part of the formula, use ctrl-cmd-down arrow to move it out, and then use shift-ctrl-cmd-W to wrap it in a new environment.
I gotta give this a try.
That is a good idea. Please suggest a list of specific howto topics. I'll see if I can also do a screencast demonstrating a typical complete workflow.
Yes, this would complement written documentation nicely.
I guess that's why we have the outline at the very beginning, which links to the subsequent sections. In the first draft of the help there was such a thing, but then it was removed. We were trying to keep the size of the LaTeX file a small as possible, so that users could actually read the entire thing.
I don't think this is something you can keep up with the increasing complexity. Thus, I don't think it's a good idea to constrain yourself in such a way.
Instead, you could design one section to be read thoroughly and then let the rest be what it is: a manual.
How about a cheatsheet instead? A single page containing all the necessary information, in the form of a pdf?
Sounds like a good start. Refer to the appropriate sections in the Help as well, then people can go on reading.
Allan and I both agree with that. This is something that's missing. However, a lot of the customization of the LaTeX bundle should be done via the LaTeX Configuration file instead. What kinds of customizations did you have in mind? Things like creating a new snippet or a new command, or changing a current command? Or more deep things related to the syntax?
I would say both. Take a look what I did, I hacked your bundle to get the functionality I want -- at the expense that it might break in the future.
So I would actually do both -- if time permits.
For me, the most helpful kind of documentation is one that explains by example (e. g. Samba by Example). So I would suggest to write HowTo sections on `Getting Started', `Big LaTeX Projects', `Customizing The LaTeX Bundle'. I would be willing to make additions of my own.
I take it you have seen the posts here: http://skiadas.dcostanet.net/ afterthought/list-of-my-textmate-pages/ They are a bit outdated I must say, need some new ones. Not sure if they count as HowTo's.
No, I haven't. You should definitely link them in your help.
Max
On Sep 12, 2006, at 4:25 AM, Max Lein wrote:
On Sep 11, 2006, at 8:31 AM, Max Lein wrote: This won't be very easy to do, we'll have to figure out the best way to do it in terms of making sure the user stays up to date with
newer
versions of the bundle. We could tell you how to edit the language grammar to add these things, but that's not very easy to do and results in the user having local modifications to the bundle which might result in them not seeing any official changes that happen to the grammar.
Ok, I'm no expert, but I figure this is what many, many people want to do. Perhaps you could just list these commands in a separate file and include that file appropriately?
Not with the tools at our disposal, no. But see below for what you can do now.
One thing that can be done now, is that you can create a new
language
that basically has the extra commands, and then includes the latex language, and you would be using that new language instead. I could offer a template language and tell you what you need to edit where. However, I would consider that only a temporary fix, because my understanding is that the next major version of TextMate will have tools that will make this customization process a lot easier/
powerful. That would be great.
Very well, but use at your own risk. For this, open the Bundle Editor (⌃⌥⌘B) and create a new language. Give it any name you like and put it in any bundle you want. Then, in the big text area on the left, place the following text:
{ scopeName = 'text.tex.latex.mylatex'; firstLineMatch = '^\documentclass(?!.*{beamer})'; fileTypes = ( 'tex' ); foldingStartMarker = '\begin{.*}|%.*(fold)\s*$'; foldingStopMarker = '\end{.*}|%.*(end)\s*$'; patterns = ( { name = 'support.function.myfunctions.latex'; match = '(\)(my|commands|here)\b'; captures = { 1 = { name = 'punctuation.definition.function.latex'; }; }; }, { include = 'text.tex.latex'; }, ); }
Set a key equivalent for this language. Make sure to press the button that says "Test". Now, set this as the language in one TeX file. This should be respected in all other files. Now, the commands: \my \commands \here will be recognized as support.function.myfunctions.latex You can change that by changing the line with the name. You can add commands to this list by adding them next to here in the match line (well, you probably want to remov e those three first), separated with a vertical line (|). For instance: match = '(\)(this|list|of|commands|)\b' would allow the use of the commands \this, \list, \of and \commands.
Adding environments is a bit more work.
Well, we do what we are used to in the end ;-) I use align, because I got used to the way it, ahem, aligns formulas.
One of the things I hope to add to the bundle soon is the ability to quickly change between equation styles. I.e. you are in an align environment, and you press a button and it becomes a split environment. And so forth.
Further, they have been designed so that you could execute them with a selection, and then they would wrap around that selection.
You thought of everything ;-)
We try to provide a service ;)
I would do: select the second part of the formula: press cmd-x, move down until out of the environment, type eq (or the right shortcut) followed by cmd-{ to generate a new equation environment, and then press cmd-v.
No sure, but that's what in principle the closing tag feature should be for ...
Well, the closing tag will just close the one above it. You also want to open one. One could probably duplicate and modify the closing tag command, so that it instead adds a \begin{env} too. So it would be a "split environment" command. Might do that actually.
That is a good idea. Please suggest a list of specific howto topics. I'll see if I can also do a screencast demonstrating a typical complete workflow.
Yes, this would complement written documentation nicely.
I guess that's why we have the outline at the very beginning, which links to the subsequent sections. In the first draft of the help there was such a thing, but then it was removed. We were trying to keep the size of the LaTeX file a small as possible, so that users could actually read the entire thing.
I don't think this is something you can keep up with the increasing complexity. Thus, I don't think it's a good idea to constrain yourself in such a way.
Sorry, I should have said: The size of the LaTeX Help file. I'm all for creating other sources of assistance, like howtos and cheatsheets and stuff. The help is supposed to be for reading by someone new to the bundle, possibly even relatively new to LaTeX, who needs to get started getting things set up and learning the basic commands.
Instead, you could design one section to be read thoroughly and then let the rest be what it is: a manual.
How about a cheatsheet instead? A single page containing all the necessary information, in the form of a pdf?
Sounds like a good start. Refer to the appropriate sections in the Help as well, then people can go on reading.
I was thinking of two different kinds of cheatsheets, one pdf that would fit in a page and could be printed, and one html/markdown, longer and with more explanation.
For me, the most helpful kind of documentation is one that
explains
by example (e. g. Samba by Example). So I would suggest to write HowTo sections on `Getting Started', `Big LaTeX Projects', `Customizing The LaTeX Bundle'. I would be willing to make additions of my own.
I would say let's try to create some more specific "HowTo" questions, and then we'll see about answering them. I'll get started on the cheatsheet for now.
Max
Haris