Hello,
I want a snippet that inserts $\mu$ behind a number (for example "10$\mu$"). The tab triggers is "mü"
So I have to type "10" "blank" "mü" "tab".
My snippet is "$$\mu m$$" But this does not word. I do not get the dollar signs. And I do not know how to go back one letter. How can I do that?
Bye.
Hi,
On 7 May 2007, at 09:43, rowkajjh wrote:
I want a snippet that inserts $\mu$ behind a number (for example "10$\mu$"). The tab triggers is "mü"
So I have to type "10" "blank" "mü" "tab".
My snippet is "$$\mu m$$" But this does not word. I do not get the dollar signs. And I do not know how to go back one letter. How can I do that?
To get a dollar sign you have to escape it by \ not by $. $\mu m$
But two questions in general: What do you want to do with it? And why you are not using a command with output 'Insert Text'?
Hans-Joerg Bibiko bibiko@eva.mpg.de wrote:
To get a dollar sign you have to escape it by \ not by $. $\mu m$
Aaah. And how do I get one space back?
But two questions in general: What do you want to do with it?
Not alwyas typing "$\mu m$". "mü" "tab" is easier.
And why you are not using a command with output 'Insert Text'?
Dont know. What command? cat file or somehing like that?
What about \newcommand{\um}{$\mu m$}?
If it's LaTeX, I'd suggest \newcommand{\um}{% \ensuremath{% \mu \textrm{m}% }% } instead.
Or perhaps even better \newcommand{\micro}[1]{% \ensuremath{\mu \mathrm{#1}}% \xspace% } Of course, you need to add \usepackage{xspace} in your header.
That way, you'll just have to type \micro{some unit} to get the expected result. You can even drop the {} and just add a space if the unit is a single character. If you're really lazy, you can choose a shorter name (such as \u, if available) for the command.
Or use a snippet: \micro{$1}$0
That would make your LaTeX code easier to read, in my opinion. And the command will work inside or outside math environments.
On 5/7/07, rowkajjh spamhalde@fastmail.fm wrote:
Aaah. And how do I get one space back?
Set the tab trigger to " mü" instead of just "mü".
Robin
Hi,
here two examples (command/snippet):
On 07.05.2007, at 12:43, rowkajjh wrote:
To get a dollar sign you have to escape it by \ not by $. $\mu m$
Aaah. And how do I get one space back?
But two questions in general: What do you want to do with it?
Not alwyas typing "$\mu m$". "mü" "tab" is easier.
And why you are not using a command with output 'Insert Text'?
Dont know. What command? cat file or somehing like that?
Cheers,
Hans
To be honest I really don't understand what's going on here, but wouldn't a snippet with a tabstop for the number be simpler?