Hot answers tagged

14

Here's a enumitem way and a patch that starts \( after item and ends \) before \item or at the end of the environment, checking with \ifmmode whether we are in math mode or not. Note: \item[...] is not catched here! -- Since the patch is inside the environment group, all other \item definitions in other environments are not changed. It's possible to jump ...


7

Here's a LuaLaTeX-based solution, which works with both enumerate and itemize environments. It does not actually modify the enumerate and itemize environments, it doesn't modify the \item macro, and it doesn't require the use of a new macro called, say, \mathitem. How does the solution work, then? It takes a preprocessor approach: It sets up a Lua function ...


7

As mentioned in corporal's comment, your problem is that you have \1, when you obviously want just 1. That is: $\phi(t) \to 1$ To expand upon this a little, when you compiled your document you should have received the error: ! Undefined control sequence. l.11 $\phi(t)\to\1 $ Here, you are being told what the problem is. You have an ...


7

You can create a command like \mathitem that you would use in place of \item when you want that the current item contains only math: \newcommand\mathitem[1]{\item $#1$} Your lists will look like this: \begin{itemize} \mathitem{1+1=2} \mathitem{e^{i\pi}+1=0} \end{itemize}


5

There's no such command, but you can create one. As you've probably already noticed, $if$ isn't right: the font and spacing represent i times f, not the word if. $\mathrm{if}$ or the like isn't right either; depending on the choice of fonts, this may or may not look similar to \text{if}. \text{if} is the way to go, either directly or via another command. ...


3

At Michigan State University we us MathTalk and Scientific Notebook to dictate equations. http://www.mathtalk.com/ Dragon Naturally Speaking also has the ability to create macros that may be useful for commonly used LATEX strings.


3

I've attempted to create a command which will typeset the "Triangle of Power" in a nice way. My best effort so far is the following: \newcommand{\tripow}[3]{ _{#1}{\stackrel{#2}{\triangle}}_{#3}} $\tripow{x}{y}{z}$ The only issue is that the right subscript appears a little low. But it does allow nesting fairly well.


3

With version 0.11 of tasks it is possible to say item-format=\ensuremath: \documentclass{article} \usepackage{tasks}[2016/05/03] % v0.11 \begin{document} This is some text. \begin{tasks}[item-format=\ensuremath] \task x + y = z \task e^{i\pi} + 1 = 0 \end{tasks} This is some text. \begin{tasks}[style=enumerate,item-format=\ensuremath] \task x + y = z ...


3

Use \[\left|\frac{\partial I}{\partial M}\right| = \frac{T^2 dg}{4\pi^2}\] instead. Note that \mid is a relation symbol, and not appropriate here. It produces different spacing, for one. The \left…\right construction can be used with all kinds of parentheses, brackets, and the like. (Incidentally, replaced $$ by proper math delimiters.)


2

I suggest you load the mathtools package and define a macro called \abs as follows: \usepackage{mathtools} \DeclarePairedDelimiter{\abs}{\lvert}{\rvert} Then, in the body of the document, you'd write \[ \abs*{\frac{\partial I}{\partial M}} = \frac{T^2 dg}{4\pi^2} \] The *("star") after the macro indicates to LaTeX that the delimiter symbols (here: ...


2

If you reduce your example further, you end up with the following: \documentclass{article} \usepackage[spanish]{babel} \usepackage{breqn} \begin{document} $<$ \end{document} So there is some interaction with breqn and babel which causes the problem. If no features of the breqn package are used, you can just remove \usepackage{breqn}. However, it ...


2

The problem is in making babel-spanish and breqn into cooperating with each other. With \usepackage[spanish]{babel}, the < character is made active, to mean \es@use@shorthand < This command transforms < into an other character via \string when LaTeX is in certain states or else executes the associated shorthand. When in math, we of course want ...


2

Here's one approach using the AMS-provided alignat environment: \documentclass[12pt]{article} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \begin{document} \begin{alignat*}{5} y_t = {} & \varphi_1rer_t & {}+{} & \varphi_2 \pi_t & {} + u_t \\ t: \quad & [2.89] & & [8.63] ...


1

The positioning of accents with respect to “accent atoms”, obtained by basically ignoring the accent and taking only the accentee into account, is a precise choice made by Donald Knuth when designing TeX, based on his study of traditional mathematical typesetting. Here are three ways for typesetting the \dot{\gamma} with an exponent; take your pick (but I ...



Only top voted, non community-wiki answers of a minimum length are eligible