I'm using kile in Linux, but, unfortunately writing math with it is very hard.
I'd like a tool to write math formulas in a easy way, like "Basic Math Input" in Mathematica software.
Is there a good one?
linuxmath-modetools
I'm using kile in Linux, but, unfortunately writing math with it is very hard.
I'd like a tool to write math formulas in a easy way, like "Basic Math Input" in Mathematica software.
Is there a good one?
I'm the developer of Inlage and I think the Windows 7 MIP is a great tool but it can't handle a many special things. But the possibilities are good for doing a lot of math stuff. For testing that tool I tried to write a 2 hour lecture of relativistic quantum mechanics down with a graphic tablet. It was possible but I had some problems. So I just replaced some symbols it couldn't handle. But natural it wasn't faster than handwriting...
But I think another nice idea to use the MIP is if you dont know the latex command of a symbol you can easily write it down (only the symbol, with mouse) in the MIP and get the command.
As with learning any spoken language, getting the hang of expressing your math thoughts in TeX and LaTeX takes some time, and it requires quite a bit of practice to become truly proficient. And, as with learning any spoken language, the learning curve does flatten out considerably after a while, and writing math in LaTeX will seem to have become second nature. (Aside: I've been using TeX and LaTeX for more than 20 years.)
That said, I've found that the following "tricks" do help ease the learning process, and they tend to save you a lot of keystrokes in the process:
Do study the manuals of the amsmath
package; they're chock-full of good examples of interesting (to look at!) formulas. Really! The user guide of amsmath
package shows how to use many great commands for typesetting equations and for entering matrices, to list just two examples of math-writing.
Use a text editor that provides various syntax highlighting methods and highlights matching parentheses, brackets, and curly braces. If the editor gives you pull-down menus to choose and click math terms, all the better; however, you'll likely find yourself using this particular piece of support less and less.
After you've entered a few formulas, take a look at the code and decide if there are any repeated stretches of code, such as second partials, integrals, and numerators and/or denominators of fractions. If these elements occur reasonably frequently, it's worth defining them as macros in your document's preamble and invoking them as needed in the main text. For example, if you have a lot of second partial derivatives, you may want to define a macro like
\newcommand{\secondp}[3]{\ensuremath{\displaystyle%
\frac{\partial^{2}\!{#1}}{\partial{#2}\,\partial{#3}}}}
You'd invoke this macro as follows: \secondp{f(x,y)}{x}{y}
or, if each argument consists of a single character, as \secondp f x y
. (Putting braces around the f
, x
, and y
won't hurt, of course, and it would likely make the code more readable as well.)
What if you have a lot of own second partial expressions? Piece of cake -- just define another macro that takes two inputs:
\newcommand{\ownsp}[2]{\ensuremath{\displaystyle%
\frac{\partial^{2}\!{#1}}{\partial{#2}^2}}}
Two side benefits of using macros in this way are:
they will save you a lot of typing over time and
they will eliminate a major source of typos (and hence frustration arising from having to track down typos!).
In the process of using macros frequently, you'll find that it becomes entirely natural to scrutinize formulas dispassionately, like an architectural critic who looks at the edifice as a whole, rather than like a laborer whose sole concern is how to place the next brick, or gargoyle, or whatever! By looking at the "big picture," so to say, you'll develop a facility to spot flaws in your edifice that you wouldn't be able to discover otherwise. E.g., is some part of the integrand "missing"? Should that be a minus sign instead of a plus sign?
In addition, make a habit of scrutinizing your code for ways to separate, as much as possible, the content of your mathematical expressions from its appearance. What do I mean by this? A main feature of the entire structural philosophy of LaTeX is to separate content from appearance; while appearance depends (obviously!) on the content, it is also affected by decisions about how the content is formatted. While you may be comfortable with your formatting decisions, your thesis adviser, a journal editor, or co-authors may desire different styles for formatting various terms. If you've hard-coded (using lower-level LaTeX/TeX commands) all of the formatting commands, you're going to have to spend a lot of time re-formatting the content of your work to meet these new requirements.
Take, for instance, the case of the cardinality of some set A
. This is sometimes (often?) displayed as |A|
. Now, some people like this formatting choice, but others prefer ||A||
(double vertical bars), or whatever. If you've defined a macro \card
as follows: \newcommand{\card}[1]{\ensuremath\left|#1\right|}
(implementing the former style) and have been using it consistently, your extra work should somebody demand a different style will be minimal. A side benefit of using the macro \card
is that it emphasizes the logic of your code rather than the appearance -- never a bad thing, right?
To give a different example: if you have lots of determinants of matrices, you're probably aware that they are required to be displayed as |A|
in some journals but as [A]
or det(A)
in others, and in yet different styles in further journals. In order not to have to reformat all of your input to meet the formatting requirements of a particular journal, it's best to use a macro named \det
each time your enter the determinant of a matrix. Actually, the macro \det
is already defined, as a "math operator" that sets the letters "det" in upright (not italicized} text mode. If you find that you'd really prefer to have determinants typeset as det(A)
-- with the matrix being the argument of the \det
command -- or as |A|
instead of the default det A
, you could redefine the \det
macro, say as follows:
\let\origdet\det
%% You should comment out one of the two next renewcommands
\renewcommand{\det}[1]{\origdet\mathopen{}\left(#1\right)} % to get "det(A)"
\renewcommand{\det}[1]{\left\lvert#1\right\rvert} % to get "|A|"
Finally, I strongly recommend that you collect all of your macros in a so-called LaTeX style file (named, say, mymacros.sty
), and store this file somewhere in the LOCALTEXMF tree. That way, you can load the style file from your documents with the command \usepackage{mymacros}
, and you'll always have easy access to your macros. And, if you ever want to redefine some of the macros, you'll only have to do so once.
Another change you might want to make to your macros is (if you haven't already done so from the very beginning) is to add copious comments as to what they're supposed to achieve. (Of course, providing copious comments is considered a good programming habit everywhere, not just among LaTeX-ers.)
Happy TeXing!
Best Answer
If you're used to using Mathematica with the various input assistant palettes, then maybe the best option for you to switch to LaTeX is LyX. It has toolbars that contain everything you'd find in Mathematica's basic math assistant, so typing math and structuring your document is quite easy. Just like Mathematica, the math can be entered "by hand" or by using the toolbar.
Here's the math toolbar:
And here's what the main input window looks like and what it compiles to:
Note that you could write your document fully in Mathematica and distribute it as CDF and PDF - this is a perfectly valid option. However, I don't believe that the export to LaTeX is optimal. I'm not a big fan of how it lays out the maths and which commands it uses to it with, but a larger issue is that it does not deal with numbered equations very well. And using Mathematica to generate every LaTeX equation you want (through
TeXForm
) then copy/pasting into your LaTeX document, is going to be very inefficient.This said, I have used Mathematica to generate some particularly nasty equations (see the appendix of arXiv:1102.3043). However I did use a customized
TeXForm
type command that used lots of string replacements to make things look nicer and then I had to do all of the line breaks by hand...My personal opinion is that you should take the plunge and learn how to type LaTeX by hand. It's not that hard and is a useful skill. Kile or TeXWorks are both good linux environments, I use gedit with the LaTeX plugin. If you want to be hard core and impress your friends, then try Emacs (with AUXTeX) or vim (with LaTeX-suite). Ultimately, once you learn your way around one of these environments, then you'll get things done much faster than any GUI/WYSIWYG environment.