hello (sorry for my bad english)
I have several questions in connection with the themes.
1) For the LaTeX users with TM : Which topic do you use?
2) Generally, is it possible that a theme can be excellent for several languages? I think that it is very complicated ...
In the TextMate manual :
"Changing theme is global i.e. it is currently not possible to select a specific theme per file or file type."
But is it possible to have a theme for a specific scope or bundle ? is it possible that this option will be a future feature ?
3) I work especially with Latex and CSS and for Latex, it seems to me that only two themes are proposed:
Blackboard and Brilliance Black but at each time i' ve some problems with LateX . Blacboard is perhaps simple and the best but do there exist other themes to use LaTeX?
I would like to make some changes but it is relatively difficult. For example, I often use pgf/tikz and I suppose that many uses pstricks. I would like to be able to emphasize \begin {tikzpicture}… \ end {tikzpicture} and reserved words of tikz in a certain color. I think it's the same for pstricks.
Perhaps, one among you is able to describe the procedure because I suppose that it will be the same one for all the packages.
How to make? Do you have recommendations so I can do that myself?
4) Do you know if somebody began a bundle for the authors of classes and packages (.cls and .sty)? There are specificities for these files. Best, undoubtedly, is to do myself these themes and grammar but i need also recommendations to learn and iunderstand how to proceed !
Greetings Alain Matthes
Hello Alain,
Am 5. Nov 2006 um 10:38 schrieb Alain Matthes:
- For the LaTeX users with TM : Which topic do you use?
I have used three themes so far for LaTeX: 1. iLife 05, which is nice and fine but by far no real Latex-theme 2. Brilliance Black and siblings by Thomas, which are nice and very complete themes for many languages (see below), but by far not good enough for my Latex-needs, although at the moment I am back to Brilliance Black… [1] and I guess I should look if there is an update to it. 3. My own modified version of Brilliance Black, which, in addition to changes to my Latex-grammar is quite nice and fulfills my needs.
- Generally, is it possible that a theme can be excellent for
several languages? I think that it is very complicated ...
It is, but Thomas's Brilliance Black themes [1] are very detailed and I believe he aims to provide support for quite a bunch of languages.
- I work especially with Latex and CSS and for Latex, it seems to
me that only two themes are proposed:
Blackboard and Brilliance Black but at each time i' ve some problems with LateX . Blacboard is perhaps simple and the best but do there exist other themes to use LaTeX?
I would like to make some changes but it is relatively difficult. For example, I often use pgf/tikz and I suppose that many uses pstricks. I would like to be able to emphasize \begin {tikzpicture}… \ end {tikzpicture} and reserved words of tikz in a certain color. I think it's the same for pstricks.
Perhaps, one among you is able to describe the procedure because I suppose that it will be the same one for all the packages.
How to make? Do you have recommendations so I can do that myself?
If you want to style something like a keyword -- it HAS to be recognized by the language grammar. So anything that you will want to add needs to be both in the theme and inside the grammar. And I guess there are two ways to do this: - either you create your own grammar file and add your changes there - or you try to get your changes added to the official LaTeX grammar.
An example for the first approach: I have my own bundle with my own LaTeX.dekay language which I select when working in LaTeX.
{ scopeName = 'text.tex.latex.dekay'; fileTypes = ( 'tex' ); patterns = ( { name = 'meta.label.reference.latex'; begin = '(\(?:ref|eqref|vref|prettyref){)'; end = '(})'; captures = { 1 = { name = 'keyword.control.ref.latex'; }; }; patterns = ( { name = 'constant.other.reference.lable.latex'; match = '[a-zA-Z,:0-9]+'; } ); },
The las section is one taken from the original language grammar and extended by the different ways I markup references… but they are all styled as the regular references…
{ name = 'meta.function.section.latex'; begin = '((\(?:part))(*?)(?:([)[^[]*?(]))??({))'; end = '(})'; captures = { 1 = { name = 'support.function.section.part.latex'; }; }; patterns = ( { include = 'text.tex.latex'; } ); contentName = 'entity.name.section'; },
Then I have different patterns for each type of heading that get named differently, so that I can have different color highlights for each… in my custom theme
{ name = 'meta.package.fixme.latex'; begin = '(\(?:fixme){)'; end = '(})'; captures = { 1 = { name = 'support.function.package.fixme'; }; }; patterns = ( { include = 'text.tex.latex'; } ); },
and for some packages with their own commands I have set new rules to make them highlighted as such… e.g. the fixme-package gets a yellow backgground which stands out nicely on Brilliance Black.
{ include = 'text.tex.latex'; }, ); }
The language grammar then includes the original grammar and this gets me the regular Latex-based highlighting.
As for the theme itself: I have made a copy of Brilliance Black and added the newly styled commands/scopes to it.
There is also one additional alternative: once your custom grammar file is finished you can use the "create theme of the day" command by Allan - which was created for the purpose of creating a new custom theme with random colors based on the current document's language grammar… but I can't seem to find it anywhere… search this list for it, I believe it was posted a while ago (March?).
Dan
[1]: http://textmate.svn.subtlegradient.com/Themes/Brilliance%20Black% 20BETA.tmTheme
On Nov 5, 2006, at 5:35 AM, Daniel Käsmayr wrote:
- My own modified version of Brilliance Black, which, in addition
to changes to my Latex-grammar is quite nice and fulfills my needs.
- Generally, is it possible that a theme can be excellent for
several languages? I think that it is very complicated ...
It is, but Thomas's Brilliance Black themes [1] are very detailed and I believe he aims to provide support for quite a bunch of languages.
- I work especially with Latex and CSS and for Latex, it seems to
me that only two themes are proposed:
Blackboard and Brilliance Black but at each time i' ve some problems with LateX .
Brilliance Black is now a part of TextMate, so delete the old version if you have it.
If you have an example of something in any language that doesn't look good, please give me an example of the code along with what language it is and whatever specific info you think I would need to fix it.
Also, If you've made local changes to your copy of it, maybe it'd be best to incorporate those changes back into the main theme for everyone to use.
The goal of Brilliance Black is to look good in every language evar.
thomas Aylott — design42 — subtleGradient — CrazyEgg
Le 6 nov. 06 à 07:22, thomas Aylott a écrit :
On Nov 5, 2006, at 5:35 AM, Daniel Käsmayr wrote:
- My own modified version of Brilliance Black, which, in addition
to changes to my Latex-grammar is quite nice and fulfills my needs.
- Generally, is it possible that a theme can be excellent for
several languages? I think that it is very complicated ...
It is, but Thomas's Brilliance Black themes [1] are very detailed and I believe he aims to provide support for quite a bunch of languages.
- I work especially with Latex and CSS and for Latex, it seems
to me that only two themes are proposed:
Blackboard and Brilliance Black but at each time i' ve some problems with LateX .
Brilliance Black is now a part of TextMate, so delete the old version if you have it.
If you have an example of something in any language that doesn't look good, please give me an example of the code along with what language it is and whatever specific info you think I would need to fix it.
Also, If you've made local changes to your copy of it, maybe it'd be best to incorporate those changes back into the main theme for everyone to use.
The goal of Brilliance Black is to look good in every language evar.
thomas Aylott — design42 — subtleGradient — CrazyEgg
Thanks Thomas I need some days ... and i give you some ideas and litle problems for me
Alain
On 5. Nov 2006, at 10:38, Alain Matthes wrote:
- Generally, is it possible that a theme can be excellent for
several languages?
Hopefully.
In the TextMate manual :
"Changing theme is global i.e. it is currently not possible to select a specific theme per file or file type."
But is it possible to have a theme for a specific scope or bundle ?
You can add styles for specific elements, e.g. you can have strings in PHP colored differently than general strings (across languages).
is it possible that this option will be a future feature ?
Probably…
[...] I would like to make some changes but it is relatively difficult. For example, I often use pgf/tikz and I suppose that many uses pstricks. I would like to be able to emphasize \begin {tikzpicture}… \ end {tikzpicture} and reserved words of tikz in a certain color. I think it's the same for pstricks.
Perhaps, one among you is able to describe the procedure because I suppose that it will be the same one for all the packages.
How to make? Do you have recommendations so I can do that myself?
If you watch the customization screencast [1] then I show how to change the color of a name in a comment (or similar). That might give you the feel for how the system works.
[1] http://macromates.com/blog/archives/2006/04/12/customization- screencast/
Le 5 nov. 06 à 12:11, Allan Odgaard a écrit :
On 5. Nov 2006, at 10:38, Alain Matthes wrote:
- Generally, is it possible that a theme can be excellent for
several languages?
Hopefully.
If you have make the choice to share a theme with several languages, your answer is logic but with LateX, there is a lot of little things not really perfect.
When i try to change for example brilliance black , often I realize that a change in another scope that latex implies annoying consequences.
There are a lot of dependances...it is interesting for languages which resemble each other and which have a structure and a very close syntax.
Probably…
thanks !
[...] I would like to make some changes but it is relatively difficult. For example, I often use pgf/tikz and I suppose that many uses pstricks. I would like to be able to emphasize \begin {tikzpicture}… \ end {tikzpicture} and reserved words of tikz in a certain color. I think it's the same for pstricks.
Perhaps, one among you is able to describe the procedure because I suppose that it will be the same one for all the packages.
How to make? Do you have recommendations so I can do that myself?
If you watch the customization screencast [1] then I show how to change the color of a name in a comment (or similar). That might give you the feel for how the system works.
[1] http://macromates.com/blog/archives/2006/04/12/customization- screencast/
thanks I had forgotten and I do not practise C also I do not have to look all the screencast :( but it is very interesting !
thanks Alain Matthes
Hi there,
just to throw a couple of ideas into the pot whilst this discussion is still active.
I had a think about this recently, and had some similar thoughts about the usefulness of themes. I agree with Allan, in that I think that it's probably possible to get a theme that caters for all your desires. However, what I would suggest is that this is probably a very difficult and time consuming task. The theme you would have to create would be rather large, and difficult to write. And (to me at least) what would be most annoying is that other people have written parts of the 'perfect solution'. So, part A of theme 1 would be useful, part B of theme 2 also... etc. The problem is that themes aren't modular. I'd really like to be able to compose a theme from various theme modules.
My second thought is probably a lot wilder, and therefore potentially useless, but sometimes bonkers thoughts need to be thrown out there. I wondered to what extent the colours within theme modules could be relative. Hmm, that doesn't sound so descriptive. What I'm trying to explain is that if within a particular theme module (if they were to exist) the colours could be made relative to a base colour. Therefore, if somebody didn't like a colour scheme, they could choose a different base colour, and the theme would reflect it. Crazy eh!
Anyway, back to modules for themes. I'd like to be able to pick one guy's great module for LaTeX, another's for CSS, and my own for Ruby, etc. I'd also need to be able to prioritise them, in case there were any attempts to redefine the highlighting for the same scope.
I'm not suggesting that these be implemented, I'm just throwing the ideas out for general discussion.
Sam Aaron ---- http://sam.aaron.name
On 5 Nov 2006, at 14:05, Sam Aaron wrote:
My second thought is probably a lot wilder, and therefore potentially useless, but sometimes bonkers thoughts need to be thrown out there. I wondered to what extent the colours within theme modules could be relative. Hmm, that doesn't sound so descriptive. What I'm trying to explain is that if within a particular theme module (if they were to exist) the colours could be made relative to a base colour. Therefore, if somebody didn't like a colour scheme, they could choose a different base colour, and the theme would reflect it. Crazy eh!
Perhaps a stand alone tool that'd let you pick one or more base colours and generate a whole range of colours from them and then install them in TM?
It wouldn't have to be limited to TM then - it could be used to generate themes for, eg, Terminal, XCode etc.
I love the theme I use in TM[1] and tend to use similar themes in the Terminal, in XCode and in various applications on my Linux box[2]. It'd be nice to have a single theme builder / manager application that could generate themes for different applications.
[1] http://www.flickr.com/photos/andyarmstrong/211328349/ [2] http://www.flickr.com/photos/andyarmstrong/211328376/
Sam Aaron wrote:
My second thought is probably a lot wilder, and therefore potentially useless, but sometimes bonkers thoughts need to be thrown out there. I wondered to what extent the colours within theme modules could be relative. Hmm, that doesn't sound so descriptive. What I'm trying to explain is that if within a particular theme module (if they were to exist) the colours could be made relative to a base colour. Therefore, if somebody didn't like a colour scheme, they could choose a different base colour, and the theme would reflect it. Crazy eh!
This is already quite possible. Not only can you set some theme elements to be semitransparent, you can also make them modify only a particular one of h, s, l, r, g, b. The problem is that you'll need to edit the theme plist directly instead of using the interface. Scan back through the release notes to figure out how to do this. AFAIK no themes ever really did anything like this though.
Infin, think we can get those release notes you've compiled into the repository, or somewhere else online?
-Jacob