Let us assume I have some equation like  \documentclass{article}   \usepackage{cmbright}  \usepackage{amsmath}  \usepackage{bm} % boldmath  % ******** \begin{document}  bold not working: \begin{equation}     X_\mathbf{n} \end{equation} Let us try bold here: \begin{equation}     p_{\bm{n}} \end{equation}  \end{document}   The problem with that command is, that it changes the font from sans to serif. Strange, isnt it? It leads also to a lot of confusion.  Any ideas?
122694
I would like to use bold symbols in superscript equations. To do so, I use \displaystyle as in   \documentclass{standalone} \usepackage{amsmath} \begin{document}     $e^{\mathbf{A}t}=e^{\displaystyle \mathbf{A}t}=e^{{\displaystyle \mathbf{A}}t}$ \end{document}   The corresponding output is:    The first exponential is exactly what I'm looking for.  Now, if I add the cmbright package, the corresponding code  \documentclass{standalone} \usepackage{amsmath} \usepackage{cmbright} \begin{document}     $e^{\mathbf{A}t}=e^{\displaystyle \mathbf{A}t}=e^{{\displaystyle \mathbf{A}}t}$ \end{document}   yields:    As one can see, in the left exponential the A symbol is not bold, and the other symbols are larger (as expected with \displaystyle).  I guess there is a pretty simple explanation about cmbright but I am not aware of it. Any clues to get the bold symbol AND the normal size with cmbright?
110135
I'm a complete newbie to Latex, and I am trying to use it for creating small pdf images with equations. My requirements are:   Aligned equations Clear font (bold and italic) Minimal sized image in PDF format Searchable in PDF format   This version finally creates a small PDF without margins, but the problem I run into is with searching. For some fonts, I can't search for comma (in case I want to find "x,y". In some versions, the first letter of a word isn't searchable with the rest of the word, so "Sample" is not searchable. In some fonts, I can't search for a word ending in ff, the second f is not searchable. Is there an easy solution to this?  To create the file:  pdflatex --file-line-error --interaction=nonstopmode testcode.tex   Thank you so much!  \documentclass{amsart} \usepackage{txfonts} \usepackage[T1]{fontenc} \usepackage[margin=0pt]{geometry} \usepackage[active,tightpage]{preview} \usepackage{varwidth} \begin{document} \begin{preview} \begin{varwidth}{\linewidth} \begin{equation} \nonumber \begin{aligned} &amp;Example\_VAL_{x,y} &amp;&amp;= \sum\nolimits_{i=0}^{MARK\_n}VAL_{x,y,i} * VAL_i \\ &amp;Example\_VAL2_{x,y} &amp;&amp;= \sum\nolimits_{i=0}^{MARK\_n}VAL2_{x,y,i} * VAL_i \end{aligned} \end{equation} \end{varwidth} \end{preview} \end{document}   Latest version after help from Ulrike, and trying to simplify code writing for myself:  \documentclass[varwidth=\maxdimen,border=2pt]{standalone} \usepackage{luatex85} \usepackage{amsmath} \usepackage{unicode-math} \usepackage[italic]{mathastext} \setmainfont{TeX Gyre Termes} %Times clone \setmathfont{TeX Gyre Termes Math} %accompagning math.  \begin{document} \[ \nonumber\begin{aligned}         &amp;Example\_VAL_{x,y} &amp;&amp;= \sum\nolimits_{i=0}^{MARK\_n}VAL_{x,y,i} * VAL_{i}         \\         &amp;Example\_VAL2_{x,y} &amp;&amp;= \sum\nolimits_{i=0}^{MARK\_n}VAL2_{x,y,i} * VAL_{i}     \end{aligned} \] \end{document}   Curious how to get a slanted more normal font in the equation - without embedding myvar throughout.
91296
I am wondering if there is a way to change the math font temporarily, similar to the way it can be done in text mode:  {\ttfamily Some text in typewriter font.}   Is there a way to do $\ttfamily a + b = c$ for example?  I know I could do $\mathtt{a + b = c}$, just like I could do \texttt{text}, but sometimes the other way results in cleaner code.  Please mind I am not looking for something like $\texttt{monospace} \textit{ in math.}$ I want to be able to write complicated formulas without having to mention the font in every word, as I would do in, for example, $\Sigma_{\mathtt{i} = 1}^{\mathtt{n}}$.
3945
What is the easiest way to superscript text outside of math mode?  For example, let's say I want to write the $n^{th}$ element, but without the math mode's automatic italicization of the th.  And what if I still want the n to be in math mode, but the th outside?
77675
Although many have attempted to explain the difference among \mathrm, \textrm, \textnormal and \text (and others?), I found them misleading.  See for example the LaTeX's Wiki \mathrm explanation   Why is it wrong? Let's try all of them within an article and a beamer and you'll see the difference and, therefore, error.  equation.tex  \begin{eqnarray*}   \int_1^9\! \cos{x} \,\mathrm{d}x &amp; &amp; \textrm{this is textrm}\   \sum_1^9 y                       &amp; &amp; \textsf{this is textsf}\   \prod_1^9 z                      &amp; &amp; \textnormal{this is textnormal}\   \bigcup_1^9 w                    &amp; &amp; \text{and this is just text} \end{eqnarray*}   article.tex  \documentclass{article} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb}  \begin{document}   \input {equation} \end{document}     And until here everything looks fine...  beamer.tex  \documentclass{beamer} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb}  \begin{document}   \begin{frame}     \input{equation}   \end{frame} \end{document}     And here we can clearly see that \mathrm does not behave as expected, i.e. does not provide a function aspect to the d. Does anyone know what am I supposed to use here instead? Just \text?? o.O  Moreover, I cannot see any difference between \textnormal and \text.  Finally, \textrm looks useless..
44815
I've been typesetting some equations, and I've found that the default behavior accents like \hat, \bar, \tilde, etc. makes a rather small and easily-missed mark. Is there some way to make the accents stand out more? In particular, is there any way to make them appear in bold (without affecting the letter they are over)?
117405
I recently looked up  on How to color delimiters in Math Mode, and so I decided to test my LaTeX knowledge by trying to define a new appropriate command: \leftcolor{color}&lt;delim symbol&gt; and \rightcolor{color}&lt;delim symbol&gt;.  The MWE is as follows:  \documentclass{article} \usepackage{amsmath} \usepackage{xcolor} % \newcommand*\leftcolor[2]{%  \color{#1}\left#2\normalcolor% } \newcommand*\rightcolor[2]{%  \color{#1}\right#2\normalcolor% } % \begin{document} \begin{equation*} % \leftcolor{red}(\frac{a}{b}\rightcolor{red})^n \neq \left(\frac{a}{b}\right)^n % \end{equation*} \end{document}   The problem can be seen in the result shown below:        I clearly see that the exponent positioning is wrong, but I have no clue on how LaTeX puts that symbol in this way, because I followed the only option possible for the correct coloring (even after searching on the xcolor documentation I didn't find anything related to this topic).  My guess is that the effective size of the delimiter is "faked" in such a way that the compiler finds more correct to put the exponent as one normal size delimiter rather than the extended one.  I don't know if there is some plain TeX or LaTeX string to help about this situation, because the most common solution in these cases involves the making new delimiters such as:  \customdelim{\frac{a}{b}}^n   % these commands are not present in this case   The fact is that I don't request this kind of macro because I want to be able to switch directly from one color to another as a specific argument.
12759
Consider the following MWE.  \documentclass[preview,border=12pt,varwidth]{standalone} \usepackage{amsmath}  \begin{document} \abovedisplayskip=0pt\relax \begin{equation} \begin{cases} ax + by =c \\ px + qy = r \end{cases} \end{equation} \end{document}   produces an output as follows.    What I want to achieve is as follows.    Is there any idea?  My attempt is as follows, but it does not compile.  \documentclass[preview,border=12pt,varwidth]{standalone} \usepackage{amsmath}  \begin{document} \abovedisplayskip=0pt\relax \begin{equation} \begin{cases} ax + by =c \tag{OK}\\ px + qy = r \tag{Yes} \end{cases} \end{equation} \end{document}
30263
I just read a book "Linear Algebra and Its Applications 4E" by David C. Lay. The book is (should be) LaTeX typeset. The matrix and equations are so nice, please see the following 3 examples:        It's so beautiful, so I want get the same effect inside my paper. Here is my code:   \usepackage{amsmath} \usepackage{colortbl} \newcommand\y{\cellcolor{clight2}} \definecolor{clight2}{RGB}{212, 237, 244}%  %%% \[A=\left[ \begin{array}{ccccc} \y 0 &amp; -3 &amp; -6 &amp; 4 &amp; 9 \\    -1 &amp; \y -2 &amp; -1 &amp; 3 &amp; 1 \\ -2 &amp; -3 &amp; 0 &amp; \y 3 &amp; -1 \\ 1 &amp; 4 &amp; 5 &amp; -9 &amp; -7      \end{array} \right]\]  \[A=\left[\begin{array}{cccccc} \rowcolor{clight2} 3 &amp; -9 &amp; 12 &amp; -9 &amp; 6 &amp; 15\\ 0 &amp; 2 &amp; -4 &amp; 4 &amp; 2 &amp; -6 \\ 0 &amp; 3 &amp; -6 &amp; 6 &amp; 4 &amp; -5 \end{array} \right]\]   And the result:     But how to add these arrows??
116231
In LaTeX, you can use commands like \mathbb{C} (in amsfonts) or \mathds{C} (in mathds) to get blackboard bold letters. But how would I get them in plain TeX? I tried {\ds C} and it didn't work.
3683
Since I wanted a better readability of highlights of a would be black &amp; white-printed document, I needed to change both the highlighting color (gray) AND the font color (white).  Depending which command you implement inside the other will compile or not: \hl{\textcolor{white}{Fail}} does not work, compiling returns Package xcolor Error: Undefined color '{white}'.  Here's the mwe:  \documentclass{article} \usepackage{xcolor} \usepackage{color} \usepackage{soul} % Enables highlighting \sethlcolor{gray}  \begin{document}      \textcolor{white}{\hl{Success}}     %% Error:     %% Package xcolor Error: Undefined color `{white}'.     \hl{\textcolor{white}{Fail}}  \end{document}   So, in the end, the problem is sorta solved but I thought you might have an answer as to what happens.
111331
How can I change the font and color of a particular command in a LaTeX document?  For example I want all the text that follows the \item tag to be gray and the font should be different from the rest of the document , which i can specify ...
37858
Although it is not standard notation, I quite like the fact that in Mathematica, a blackboard bold i is used to represent the imaginary unit. Apart from making it stick out, it allows me to write things such as  ,  allowing me to use the variable 'i' as an iterator in series, etc. To achieve this in LaTeX, I've made use of the bbm package (\mathbbm i), however this doesn't render as nicely as the standard AMS math \mathbb command, in fact, it looks pixellated up close:    Is there a way to achieve a nicer blackboard bold i symbol? I'm not very fond of what is offered by the packages bbold, mathbbol or dsfont packages either, I want to get something as close to AMS's \mathbb as possible.
8199
What package should I use, or what setting can I make to the font in theorems so that the text wouldn't be italic. I use amsmath, and from default, everything I write in theorem environments becomes italic and I don't want that. Thank you
106756
Like prompt says, I want a command to allow quicker mathematical equations. I have created my own commands in the past but cant figure this out.  Ideally I would end up with a shortcut like \m or Alt+M that would type $$ and then press the left arrow key.    If this cannot be done native to TeXstudio, could someone suggest a good minimalist macro program to make this work?
17690
I have a 100 page document, I used colored text many places to highlight with below command in my preamble  \newcommand\bluetext[1]{\textcolor{blue}{#1}}   its working great however did not realize at the time of writing that i would require color printer for this. I wanted to change colored text to bold - I change the above command as below    \newcommand\bluetext[1]{\textbf{#1}}   It removed the colors but did not give me any bold letters, is it because of the font? or I am doing anything wrong? I am using sanskrit 2003 font.    In the attached image all the circled text should have appeared bold.  Thanks for your help - Here is the MWE  \documentclass[24pt]{article} \usepackage{fontspec} \usepackage{polyglossia} \usepackage{color} \usepackage{amstext, amsmath} \setmainfont[Script=Devanagari]{Sanskrit2003} \setdefaultlanguage{sanskrit} \newcommand\bluetext[1]{\textcolor{blue}{#1}}  %\newcommand\bluetext[1]{\textbf{#1}} % Blue Text \begin{document} १.१.१\bluetext{वृद्धिः}\textsuperscript{१/१} आत्\textsuperscript{१/१} ऐच्\textsuperscript{१/१}     \\ १.१.२     अत्\textsuperscript{१/१}  एङ्\textsuperscript{१/१} गुणः\textsuperscript{१/१}     \\ १.१.३     \bluetext{इकः}\textsuperscript{६/१} \bluetext{गुणवृद्धी}\textsuperscript{१/२}    \\  १.१.४     \bluetext{न}\textsuperscript{०/०} धातुलोपे\textsuperscript{७/१} आर्धधातुके\textsuperscript{७/१}    \\ १.१.५     क्क्ङिति\textsuperscript{७/१} च\textsuperscript{०/०}     \\ \end{document}
115952
I stumbled upon those two ways of writing a mathematical expression inside a text:    I could easily do the first one by writing the expression inside $s, but what about the second one? If I use \begin{displaymath}, it looks like this:    What is the correct command for this?