Tag Info

New answers tagged

1

Sure, as the Haskell code is on GitHub: https://github.com/kirel/detexify Front-End https://github.com/kirel/detexify-hs-backend Back-End https://github.com/kirel/detexify-data Training data However, it is not straight-forward to do so as some of the packages have changed. But you can (relatively straight-forward) use my project hwrt. See ...


3

I would agree with egreg that it is far better to make the markup match the meaning here and mark up each identifier separately. The math markup in TeX, as well as the default fonts, are designed on the idea that adjacent letters are separate variables, typically with implied multiplication or concatenation operators. However if you are not convinced and ...


4

The reason why the global reassigning the letters in math mode is not good idea was mentioned in another answer and comments. But if you really need this, then you can do: \everymath{\it}\everydisplay{\it} at beginning of the document. If you need to keep the numbers in roman style, then you can set: ...


6

It depends on several factors. If your math formulas are all built like that, then you might be justified in changing the mathcodes for the letters, although I recommend you not to do it. Prefer a semantic markup: multiletter identifiers denote either variables or functions; define two commands, say \var and \func and type your formula as \[ ...


1

The straightforward way to do this is with \middle, which works just like \left and \right. Unfortunately, the index doesn't get placed correctly. To get placed low enough, I inserted a fake fraction with \vphantom{\frac12}: \documentclass{article} \begin{document} \[ H \left(\frac{1}{2},\frac{1}{2} \middle| {\vphantom{\frac12}}_{C_{k}=1} \right) \] ...


1

You can force the subscripts to be under the summation, by using \limits, like this: \sum\limits_{j=1} A_{xj} An alternative way is to change the typesetting style the formula, by \displaystyle. You probably noticed, that the typesetting of math differs depending on what 'mode' your in: inline math or display math: \documentclass[10pt,a4paper]{article} ...


4

just to cover one approach that hasn't yet been mentioned, but is the approach presented in the texbook, wrap \left. ... \right| around the taller portion of the expression: \documentclass{article} \usepackage{amsmath} \begin{document} \[ H\biggl(\left.\frac{1}{2},\frac{1}{2}\right|_{C_{k}=1}\,\biggr) \] \end{document}


2

% arara: pdflatex \documentclass{article} \begin{document} \[\hat{x}^{-}_{k}=A\hat{x}_{k-1}+Bu_k \] \end{document}


7

The following solution simply uses \vrule, which gives exact height and depth of the fraction. (On the other hand, \left...\right doesn't give exact height.) No additional package is needed. $$ H\left(\frac{1}{2},{\frac{1}{2}\,\vrule\,}_{C_{k}=1}\right) $$


4

To make the vertical bar extent exactly the height of the fraction (as requested by the OP), the scalerel package can help. \documentclass{article} \usepackage{scalerel} \begin{document} $\displaystyle H\left(\frac{1}{2},\frac{1}{2} {\stretchrel*{\vert}{\frac{1}{2}}}_{C_{k}=1}\right)$ \end{document}


10

I'd use \bigg and friends; with \left and \right the parentheses turn out to be too big. \documentclass{article} \usepackage{mleftright} \newcommand{\fakeleft}{\mleft.\kern\nulldelimiterspace} \begin{document} \[ H\mleft(\fakeleft\frac{1}{2},\frac{1}{2}\mright|_{C_{k}=1}\mright) \] \[ H\biggl(\frac{1}{2},\frac{1}{2}\bigg|_{C_{k}=1}\,\biggr) \] ...


4

Your first line of code produces a line with normal height since it surrounds \left|_{C_{k}=1}\right. not he fraction. So you have to use \left.\kern-\nulldelimiterspace\frac{1}{2}\right|. As far, \Big| is concerned the size is not suitable, use \bigg| \documentclass{article} \usepackage{amsmath} \begin{document} $\displaystyle ...


4

Here is a TikZ solution. \documentclass[varwidth,border=50]{standalone} \usepackage{tikz} \tikzset{ main node/.style={inner sep=0,outer sep=0}, label node/.style={inner sep=0,outer ysep=.2em,outer xsep=.4em,font=\scriptsize,overlay}, strike out/.style={shorten <=-.2em,shorten >=-.5em,overlay} } \newcommand{\cancelto}[3][]{\tikz[baseline=(N.base)]{ ...


4

I introduce \bcancelto{label}{term} by modifying one of the packages routines. EDITED to support labels on \bcancelto. The modification to \canto@vector to produce \cantox@vector amounted to three things: 1) adding a - before #4 in the \vector call; 2) Changing the ^ superscript to a _ subscript before the \raise; and 3) adding a - sign before #2 ...


2

In relation to the extra question about \square. I do not have Minion Pro, but out commenting the two \setm... font lines and adding amssymb, then this compiles just fine using xelatex \documentclass{article} \usepackage{mathtools,amssymb} \usepackage{polyglossia} % also loads package fontspec \usepackage{unicode-math} % if you also need maths ...


2

I used Werner's comment for the $...$ form, but added forms that work for equation and align. EDITED to handle the OP's requirements: 1) arguments to \mathmacro; 2) multiple calls to \mathmacro in a single environment; 3) works when embedded within \ensuremath argument. REVISED SOLUTION (can handle multiple \mathmacro calls) In this approach, to allow ...


3

The command \DeclarePairedDelimiter is defined by mathtools. Since this package also loads amsmath it must go before fontspec: \documentclass{article} \usepackage{mathtools} \usepackage{polyglossia} % also loads package fontspec \usepackage{unicode-math} % if you also need maths \setmainlanguage{english} % loads language hyphenation rules and such ...


1

I'm not sure what you want but here is a try: \documentclass{article} \usepackage{amsmath} \usepackage[{siunitx} \sisetup{ output-decimal-marker = {,}, group-digits = false } \begin{document} \begin{align*} P(B_{1}) &= P(A_{1} \cap \overline{A_{2}} \cap \overline{A_{3}})\\ &= P(A_{1}) \cdot P(\overline{A_{2}}) \cdot ...


3

Another solution prints the formula only once (no three times): $$ u = \vbox{\def\shiftA{3.3ex}\def\shiftB{\vrule height2.7ex width0pt} %spec. numbers for this formula \kern\shiftA\hrule\kern-\shiftA \hbox{$\displaystyle \exists\, {\it degree} \overbrace{\big( \underbrace{\shiftB{\rm degrees}({\it course},{\it ...


5

You are using a weird way of putting bars on the A's (at least: I have never seen it done like that). You can use the \bar command for that. Try this: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{multline} P(B_{1}) = P({A_{1}} \cap \bar{A}_{2} \cap \bar{A}_{3})\\ = P(A_{1}) * P(\bar{A}_{2}) * P(\bar{A}_{3})\\ = 0,0001 * 0,9988 * ...


5

Typeset the whole thing three times. The first one as a horizontal phantom to set the width, the second time as the real thing, the third time as a vertical phantom. The first two times the two objects are superimposed with \ooalign. In order to save typing, the object is saved in a temporary command, which takes as argument an invisible rule stating its ...


0

The symbol \intercal is quite a nice symbol for transpose, but it is placed a little low. Therefore the example defines \transpose to use a \intercal, which is shifted to the baseline. The symbol size adapts to the current math style. \documentclass{article} \usepackage{amssymb} \makeatletter \newcommand*{\transpose}{% {\mathpalette\@transpose{}}% } ...


0

In order to give some reference: (DIN) EN ISO 80000-2:2013 writes it like the following. % arara: lualatex \documentclass{article} \usepackage{mathtools} \usepackage{unicode-math} \setmathfont{XITS Math} \newcommand*{\matr}[1]{\mathbfit{#1}} \newcommand*{\tran}{^{\mkern-1.5mu\mathsf{T}}} \newcommand*{\conj}[1]{\overline{#1}} ...


0

I use Scientific Workplace (SWP), Version 5.5. I have used SWP since the mid-1990's and have been pleased with it. I have written several books with it, many research papers, and many exams. Their Beamer template is also good for presentation slides. At present, I am using SWP under both Windows 7 and Windows 8.1. It works fine! Kendall Atkinson


2

\documentclass{article} \usepackage{amsmath} \begin{document} \noindent Something\dots \begin{alignat*}{2} K_{C} &= \sqrt{EG_{c}} &\qquad &\text{(plane stress)}\\ \intertext{further description of the equation} K_{c} &= \sqrt{\frac{EG_{c}}{1-\nu^{2}}} &&\text{(plane strain)} \end{alignat*} Something\dots \end{document}


4

I suggest three strategies. The first one is to define a command \iheq that prints an equals sign with some padding to become the same width as \overset{\mathrm{IH}}{=}, which can be simply obtained with \iheq*. The second strategy is adding “(IH)” to the side. \documentclass{article} \usepackage{amsmath} \usepackage{xparse} ...


4

You can use \mathmakebox or \mathclap (thanks to Andrew) from mathtools \documentclass{article} \usepackage{mathtools} \begin{document} \begin{equation*} \begin{split} S_n &= 2^iS_{n-i}+2^i-1\\ &\stackrel{\mathmakebox[\widthof{=}]{\mathrm{IH}}}{=} 2^i(2^1S_{n-i-1}+2^1-1)+2^i-1\\ &= ...


3

<stuff>\big|_<index> is also possible. There is also \Big, \bigg, and \Bigg


3

When \left. is used, TeX inserts no delimiter, but adds a space of width \nulldelimiterspace. It's not advisable to set this parameter to zero, in my opinion. But with \newcommand{\noleft}{\left.\kern-\nulldelimiterspace} using \noleft x\right|_{a} will in any case remove the added space. As explained in my answer to the referenced question, using a ...


2

An application of the macros in http://tex.stackexchange.com/a/136767/4427 \documentclass{article} \usepackage{amsmath} \usepackage{xparse} \ExplSyntaxOn \DeclareDocumentCommand{\xDeclarePairedDelimiter}{mmmO{}} { \NewDocumentCommand{#1}{sO{}m} { \IfBooleanTF{##1} { \egreg_paired_delimiter_expand:nnnn {#2}{#3}{##3}{#4} } { ...


2

Here is a macro that does auto scaling, but also allows you to manually specify a size if so desired. You can also specif a prefix for the limits if so desired as in the last example on the first group: Notes: The manually specified size example as just illustrate the possibilities in the size that you can select. I am not suggesting that all those ...


4

LaTeX needs to know beforehand that the subsequent text does indeed contain mathematical elements. This is because LaTeX typesets maths notation differently from normal text. Therefore, special environments have been declared for this purpose. Greek letters are commonly used in mathematics, and they are very easy to type in math mode. You just have to type ...


0

You might want to try the "amsmath" package. Use \usepackage{amsmath} in the preamble of your document. Then one way to get an equation with greek letter is: \begin{equation}\label{eq1} \alpha + \beta_1 \end{equation}


2

\documentclass{report} \usepackage{mathtools} \begin{document} \[ \sideset{_5}{_{2,3}}{\mathop{edu}}= \sideset{_5}{}{\mathop{yr}} \sideset{_5}{}{\mathop{wg}} + 2 \] \[ \sideset{_{ll}^{ul}}{_{lr}^{ur}}\prod \] \end{document}


0

Another option: \documentclass{article} \usepackage{amsmath} \begin{document} \[ 5^{\text{edu}_{2,3}} = 5^\text{yr}\ 5^{\text{wg}+2} \] \end{document} or \documentclass{article} \usepackage{amsmath} \begin{document} \[ 5^{edu_{2,3}} = 5^{yr}\ 5^{wg+2} \] \end{document} for


5

You can use \prescript macro provided by mathtools \documentclass{report} \usepackage{mathtools} \usepackage{atbegshi} \begin{document} \[ \prescript{}{5}{\mathit{edu}}_{2,3}= \prescript{}{5}{\mathit{yr}} \prescript{}{5}{\mathit{wg}} + 2 \] \end{document}


1

You can have multiline brackets, following Sébastien Gouezel's example on po. 28-29 of the mathtools documentation. In addition, I propose another alignment based on the alignedat environment: \documentclass{article} \usepackage[showframe]{geometry} \usepackage{mathtools} % \usepackage{braket} \newcommand\MTkillspecial[1]{% helper macro \bgroup ...


2

May I suggest an alternative approach: Use $\vee$ and $\wedge$ as superscripts, like $f^\vee$ and $f^\wedge$.


0

There is a difference. Here are 5 versions of your formula, with the normal spacing, and adding \,, \:, \; and \. In my opinion, the only places that might justify adding some space are just between the quantifiers. For the parentheses and the binary symbol, spacing is fine: \documentclass{article} \usepackage{mathtools} % \begin{document} \begin{gather*} ...


0

Can't see any problem here. Does none of these work for you? Just in order to give some examples. You can find a big list here. % arara: pdflatex \documentclass{article} \usepackage{mathtools} \newcommand*{\test}[1]{$G#1(\forall(x)#1\forall(y)#1(p(x)#1\vee#1\neg{}p(y)))$\par} \begin{document} \test{} \test{\,} \test{\>} \test{\ } \test{\mkern+10mu} ...


4

In addition to Przemysław's answer, I made it a little bit more beautiful. You do not need that big parenthesis at all. If you want to use an automated bracket like \left(, you have to 'close' it with \right. on the same line. Here is my MWE. You could even reduce one row. There is enough space in order to make the equation a bit wider: % arara: pdflatex ...


2

You have unbalanced \left ... \right (they must be in the same logical line). An exemplary, however ugly, solution: \documentclass{article} \usepackage{amsmath,braket} \begin{document} \begin{equation} \begin{split} %\left( (\hat{c}_{0}^{\dagger} + \hat{c}_{1}^{\dagger})\hat{t}_{0}^{\dagger} \ket{0000}\otimes\ket{00}= \\ \Bigl(- c_{0}^{\dagger} ...


4

Adjust the amount of lowering (now 0.5ex) to suit your need. \documentclass{article} \usepackage{amsmath} \makeatletter \newcommand\post@accent[2]{% \mbox{\fontsize{#2}{\z@}\selectfont\raisebox{-0.5ex}[\dimexpr\height-0.5ex][0pt]{$\m@th\,#1{}$}}% } \newcommand{\definepostaccent}[2]{% ...


0

This looks just like a sans serif font to me. So I would do the following. % arara: pdflatex \documentclass{article} \newcommand*{\expect}{\mathsf{E}} \newcommand*{\prob}{\mathsf{P}} \begin{document} \[\expect X = \int\displaylimits_{\Omega} X(\omega)\prob}(d\omega)\] \end{document} The \displaylimits is just used in order to get the first image of ...


4

Something like this? \documentclass{article} \usepackage{amsmath} % for \text macro \begin{document} $f\text{\v{}}$ $f\text{\^{}}$ $f\text{\u{}}$ $f\text{\={}}$ $f\text{\.{}}$ $f\text{\"{}}$ \end{document}


4

I don't understand the need for the \setbox, \vbox, and \hbox instructions. If all you want to do is to create an image file containing a certain math expression, in a font size of 12pt, you could achieve this objective by writing \documentclass[12pt,preview,border=1pt]{standalone} \begin{document} $ x^2 + \phi $ \end{document} More elaborate contents ...


1

use \setbox0=\hbox{% $x^2 + \phi$% } or: \documentclass[12pt,preview,border=1pt]{standalone} \begin{document} \[ x^2 + \phi \] \end{document}


5

\fbox sets its argument in text mode, and \sigma as well as the subscript requires math mode. So, use \fbox{$\sigma_{yy}$} or the \boxed version supplied by amsmath: \documentclass{article} \usepackage{amsmath} \begin{document} \[\begin{bmatrix} \boxed{\sigma_{xx}} & \sigma_{yx} \\ \sigma_{xy} & \fbox{$\sigma_{yy}$} ...


2

Provided you can spare a maths alphabet: \documentclass{article} \usepackage{mathtools,amssymb,amsfonts} \DeclareMathAlphabet{\mathbx}{U}{BOONDOX-ds}{m}{n} \SetMathAlphabet{\mathbx}{bold}{U}{BOONDOX-ds}{b}{n} \DeclareMathAlphabet{\mathbbx} {U}{BOONDOX-ds}{b}{n} \begin{document} \verb|\mathbb| \[ \mathbb{N Z R} \] \verb|\mathbx| \[ \mathbx{N ...


2

See section 3.2.1 of the manual: 3.2.1 Contextual analysis of hamza As with ArabTeX, a contextual analysis of the input encoding is performed (at the font-mapping level) to automatically determine the carrier of the hamza, as illustrated by the following examples: \begin{arab} 'amruN, 'ibiluN, 'u_htuN, '"u_ht"uN, '"Uql"Id"Is, ra'suN, 'ar'asu, sa'ala, ...



Top 50 recent answers are included