Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'd like to experiment with making custom macros to see if I can find a way to structure things to efficiently take notes in class starting in January... as it is right now, there's a lot of typing to do repetitive things.

Is there a way I can define a \newcommand{} macro to do something like this?

\l{x}{\infty}f(x) would translate to \lim_{x\to\infty}f(x)? I'd like to be able to just type as little as possible, and have the \rightarrow be automatically put into the typesetted document.

share|improve this question
    
Personally, I think this shouldn't be written with a command. Related to what I wrote here. I would go for a snippet application which let you write \lim_{ \to } easily. –  Manuel Dec 11 '12 at 20:02
add comment

1 Answer

up vote 6 down vote accepted
\renewcommand\l[2]{\lim_{#1 \to #2}}

would seem to do what you ask?

share|improve this answer
    
Ah yes, that does it. Thank you. –  agent154 Dec 11 '12 at 20:15
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.