Hola Haris (and other LaTeX bundle maintainers),
is there a reason (philosphical?) that there is no command for \emph {} but there is for \textit{}?
Dan
No, there is no command for \emph. I was also wondering about that. But it's easy to add it yourself.
Helge
Hola Haris (and other LaTeX bundle maintainers), is there a reason (philosphical?) that there is no command for \emph {} but there is for \textit{}?
Doesn't cmd-I do \emph? I thought so, but I am not near my Mac to check it right now :-).
-- Sune.
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On Sep 19, 2006, at 3:26 AM, Helge Hartmann wrote:
No, there is no command for \emph. I was also wondering about that. But it's easy to add it yourself.
I've been wanting this myself. The command for textit is part of a general triple of commands "bold,underline,typewriter" that a bunch of languages have, and they are bound to the same keystrokes in all these languages. But I would be more than happy to add a command for emph, since it is IMO the most used way of highlighting stuff. We just need to find a good key equivalent for it.
Another option is to simply have ctrl-shift-W default to it. For those not aware of it, while ctrl-shift-W traditionally works with a selection, and then wraps it in a command, you can use it without a selection. In that case, after you've typed the command and pressed tab, you are taken inside the braces. In other words, with selection the command inserts the snippet: \\${1:text${2:bf}}}{$TM_SELECTED_TEXT} and without selection, it inserts the snippet: \\${1{text${2:bg}}{$3}
The idea the first part was that one could quickly and easily insert textbf and friends, but seeing how we have special commands for it there's no much reason to keep them here as well. So we could have this command default to, with selection: \\${1:emph}{$TM_SELECTED_TEXT} and without selection: \\${1:emph}{$2}
So this would provide one easy way of creating emph'ed text, via ctrl- shift-W. Then you/we can further add the shortcut: e = '\emph{$1} '; in the LaTeX configuration file. It currently contains: em = '\emph{$1} ';
So right now the fastest way to produce a new emph is to type em and press cmd-{. We could make that even faster with the above, so that pressing e + cmd-{ would create an emph environment (and add an extra space after it, which I find I commonly need when typing).
And of course we could create a dedicated snippet, so that em+tab or e +tab creates an emph-ed environment, or we could bind it to one of the (not that many) free key equivalents. So we have:
1. Set default behavior for ctrl-shift-W. 2. Add even shorter trigger for cmd-{. 3. Add dedicated command, with tab trigger "e" or with some (??) key equivalent.
I personally would prefer on of the first two options, and I think option 1 is the more appropriate at the moment. And of course 1 and 2 could be both implemented. Let me know what you think.
Helge
Haris
On Sep 19, 2006, at 9:46 AM, Charilaos Skiadas wrote:
- Set default behavior for ctrl-shift-W.
- Add even shorter trigger for cmd-{.
I actually just went ahead and committed these two changes. For general reference for people not familiar with it, I've appended all the shortcuts used by the cmd-{ command at the moment. New shortcuts are added every now and then, and you suggestions would be welcomed.
Haris
it = '\textit{$1} '; bf = '\textbf{$1} '; tt = '\texttt{$1} '; sf = '\textsf{$1} '; sc = '\textsc{$1} '; e = '\emph{$1} '; em = '\emph{$1} '; fc = '\footcite{$1} '; fn = '\footnote{$1} '; cli = '\lstinline{$1} '; ds = '\displaystyle'; dis = '\displaystyle';
hf = '\hfill'; vf = '\vfill';
dc = '\documentclass{${1:article}}\n'; nc = '\newcommand{$1}{$2}'; rnc = '\renewcommand{$1}{$2}'; usep = '\usepackage{$1}'; geo = '\usepackage[left=${1:2cm},right=${2:2cm},top=${3:1cm},bottom=$ {4:2cm}]{geometry}';
sec = '\section{$1}'; sub = '\subsection{$1}'; ssub = '\subsubsection{$1}'; subs = '\subsubsection{$1}'; cha = '\chapter{$1}'; par = '\paragraph{$1}'; subp = '\subparagraph{$1}';
fr = '\frac{${1:num}}{$0}'; frac = '\frac{${1:num}}{$0}'; l = '\lim_{$1} $0'; lim = '\lim_{$1} $0'; s = '\sum_{${1:bot}}^{$2} $0'; sum = '\sum_{${1:bot}}^{$2} $0'; p = "\prod_{${1:bot}}^{$2} $0"; prod = "\prod_{${1:bot}}^{$2} $0";
put = "\put(${1:0},${2:0}){$0}"; mp = "\multiput(${1:0},${2:0})(${3:5},${4:0}){${5:2}}{$0}"; mput = "\multiput(${1:0},${2:0})(${3:5},${4:0}){${5:2}}{$0}"; multiput = "\multiput(${1:0},${2:0})(${3:5},${4:0}){${5:2}}{$0}"; line = "\line(${1:0},${2:0}){${3:0}}{$0}"; cir = "\circle${1:[*]}{$0}"; circle = "\circle${1:[*]}{$0}";
Thanks for adding this Haris!
But why not also create a command whicht toggles emphasis like the ones already existing for textit (cmd-I), textbf (cmd-B), underline (cmd-U), texttt (cmd-K) and assign cmd-E as a shortcut? For me, this would mean much less finger-acrobatics than those strange ctrl-shift- w or cmd-{ shortcuts. Especially on european keyboards ;-)
Maybe you find some time to add this, too.
Thanks in advance for all your work.
Oliver
On 19.09.2006, at 16:00, Charilaos Skiadas wrote:
On Sep 19, 2006, at 9:46 AM, Charilaos Skiadas wrote:
- Set default behavior for ctrl-shift-W.
- Add even shorter trigger for cmd-{.
I actually just went ahead and committed these two changes. For general reference for people not familiar with it, I've appended all the shortcuts used by the cmd-{ command at the moment. New shortcuts are added every now and then, and you suggestions would be welcomed.
Haris
it = '\textit{$1} '; bf = '\textbf{$1} '; tt = '\texttt{$1} '; sf = '\textsf{$1} '; sc = '\textsc{$1} '; e = '\emph{$1} '; em = '\emph{$1} '; fc = '\footcite{$1} '; fn = '\footnote{$1} '; cli = '\lstinline{$1} '; ds = '\displaystyle'; dis = '\displaystyle';
hf = '\hfill'; vf = '\vfill';
dc = '\documentclass{${1:article}}\n'; nc = '\newcommand{$1}{$2}'; rnc = '\renewcommand{$1}{$2}'; usep = '\usepackage{$1}'; geo = '\usepackage[left=${1:2cm},right=${2:2cm},top= ${3:1cm},bottom=${4:2cm}]{geometry}';
sec = '\section{$1}'; sub = '\subsection{$1}'; ssub = '\subsubsection{$1}'; subs = '\subsubsection{$1}'; cha = '\chapter{$1}'; par = '\paragraph{$1}'; subp = '\subparagraph{$1}';
fr = '\frac{${1:num}}{$0}'; frac = '\frac{${1:num}}{$0}'; l = '\lim_{$1} $0'; lim = '\lim_{$1} $0'; s = '\sum_{${1:bot}}^{$2} $0'; sum = '\sum_{${1:bot}}^{$2} $0'; p = "\prod_{${1:bot}}^{$2} $0"; prod = "\prod_{${1:bot}}^{$2} $0";
put = "\put(${1:0},${2:0}){$0}"; mp = "\multiput(${1:0},${2:0})(${3:5},${4:0}){${5:2}}{$0}"; mput = "\multiput(${1:0},${2:0})(${3:5},${4:0}){${5:2}}{$0}"; multiput = "\multiput(${1:0},${2:0})(${3:5},${4:0}){${5:2}}{$0}"; line = "\line(${1:0},${2:0}){${3:0}}{$0}"; cir = "\circle${1:[*]}{$0}"; circle = "\circle${1:[*]}{$0}";
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
Ah, yes. Sorry I forgot...
On 19.09.2006, at 16:42, Allan Odgaard wrote:
On 19/9/2006, at 16:32, Oliver Hagmann wrote:
[...] and assign cmd-E as a shortcut?
This key is “put selection on the find clipboard” -- something I would not be without ;) But you can do a local snippet on ⌘E, if you do not need it.
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On Sep 19, 2006, at 10:42 AM, Allan Odgaard wrote:
On 19/9/2006, at 16:32, Oliver Hagmann wrote:
[...] and assign cmd-E as a shortcut?
This key is “put selection on the find clipboard” -- something I would not be without ;) But you can do a local snippet on ⌘E, if you do not need it.
As Allan clearly demonstrates, this is indeed the only stumbling block for the addition of such a command, finding a good key equivalent for it, which should first of all make some sense/offer easy mnemonic, second follow the guidelines as much as possible (http://macromates.com/textmate/manual/key_bindings#conventions), and third not conflict with any key command.
Haris
This is exactly what I did. And I'm really satisfied with this solution.
Helgeh
-------- Original-Nachricht -------- Datum: Tue, 19 Sep 2006 16:42:34 +0200 Von: Allan Odgaard throw-away-1@macromates.com An: TextMate users textmate@lists.macromates.com Betreff: Re: [TxMt] LaTeX and \emph
But you can do a local snippet on ⌘E, if you do not need it.
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On 19/09/2006, at 15:46, Charilaos Skiadas wrote:
On Sep 19, 2006, at 3:26 AM, Helge Hartmann wrote:
No, there is no command for \emph. I was also wondering about that. But it's easy to add it yourself.
I've been wanting this myself. The command for textit is part of a general triple of commands "bold,underline,typewriter" that a bunch of languages have, and they are bound to the same keystrokes in all these languages. But I would be more than happy to add a command for emph, since it is IMO the most used way of highlighting stuff. We just need to find a good key equivalent for it.
IMO we should definately use ⌘i for this, and lose textit.
-- Sune.
I am with Sune on this one. In Latex you usually want the \emph and not \textit for context hilites, and if you really need the cursive font you can always use the "wrap…" command…?
Dan
Am 19. Sep 2006 um 16:56 schrieb Sune Foldager:
IMO we should definately use ⌘i for this, and lose textit.
Charilaos Skiadas <skiadas@...> writes:
On Sep 19, 2006, at 9:46 AM, Charilaos Skiadas wrote:
- Add even shorter trigger for cmd-{.
This should of course have been cmd-}
cmd-{ is for environments, cmd-} for LaTeX commands.
Haris
For the record... Please, think about us, poor europeans, for whom ⌘{ and ⌘} cannot be achieved :-)
TIA
On Sep 19, 2006, at 2:53 PM, guerom00 wrote:
For the record... Please, think about us, poor europeans, for whom ⌘{ and ⌘} cannot be achieved :-)
You do know you can just change the command key in the Bundle editor, right? This will not affect the ability to update any more. i.e. TextMate keeps the information in a "delta" file, and it only keeps the information that you changed the keybinding. So if for whatever reason the actual command text is changed, then you will pick it up with no problems.
TIA
Haris
On 19/09/2006, at 21:59, Daniel Käsmayr wrote:
For the record... Please, think about us, poor europeans, for whom ⌘{ and ⌘} cannot be achieved :-)
try alt-9 = } and alt-8 = {. Both can be combined with ⌘!
Yes, they work but are quite inconvenient :-p. However, anything with ⌥{ or similar won't work.
-- Sune.
On 19/9/2006, at 22:43, Sune Foldager wrote:
Please, think about us, poor europeans, for whom ⌘{ and ⌘} cannot be achieved :-)
try alt-9 = } and alt-8 = {. Both can be combined with ⌘!
Yes, they work but are quite inconvenient :-p [...]
So is using ⌥⇧7 for , but I am not changing the regexp syntax for your poor europeans clinging to your native keyboards :p
Aren't you using a danish keyboard ;)
Yes, they work but are quite inconvenient :-p [...]
So is using ⌥⇧7 for , but I am not changing the regexp syntax for your poor europeans clinging to your native keyboards :p
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On 20/9/2006, at 11:29, Helge Hartmann wrote:
Aren't you using a danish keyboard ;)
Nope, I switched to US long ago -- the same did DHH (who is also danish).
...and then of course it _must_ be right... or not.
The danish keyboard is just awful for programming, shell stuff, etc.
Or at least rather inconvenient, true :-p.
-- Sune.
Am 19. Sep 2006 um 22:51 schrieb guerom00:
Not with my German keyboard, at least :-)
Well, they can with mine… just substitute Apple-} with Apple-Alt-9 and you should be fine... but then it would be nicer to have a two- key combo, not?
Dan.
…enough of this. long live Bundle-deltas. But which keys should we Krauts take? <G>
Daniel Käsmayr <daniel@...> writes:
Well, they can with mine… just substitute Apple-} with Apple-Alt-9 and you should be fine... but then it would be nicer to have a two- key combo, not?
Indeed. Mine is swiss-german to be precise and that does not work. I thought it was the same as the german one :-)
After popular request and agreement of everyone I've asked, I've set cmd-I to produce \emph from now on. So now you have at least three easy ways of producing it. I hope this will not produce an unusually large amount of emphasized text in all subsequent LaTex documents :)
Haris