Tag Info

New answers tagged

1

@Stefan's answer is good, however, I improved his answer. Firstly, if \circled{1} and \circled{10} are placed together, the two circles will not be the same size, so I added an optional parameter to the \circled command. The optional parameter was regraded as a placeholder to make sure that these circles appear in the same size. Additionally, since ...


1

With the stringstrings package. \documentclass{article} \usepackage{stringstrings} \begin{document} \def\x{2014/12/20} \substring{\x}{1}{4}\par \substring{\x}{6}{7}\par \substring{\x}{9}{$}\par% The $ implies the last character of the string. \end{document}


2

A LuaLaTeX-based solution, which sets up a TeX macro called \substring that takes three arguments. The first argument of the macro \substring is a string. It can be either a hard-coded string or a TeX macro that produces a string. E.g., if \myText is defined via \newcommand{\myText}{2014/12/20}, then \myText could used as the first argument of \substring. ...


2

Simple Solution This can be accomplished with the xstring package. In particular, the \StrMid{string}{#2}{#3} command allows you to take the substring of string from character positions #2 through #3. \documentclass{article} \usepackage{xstring} \newcommand{\myText}[2]{\StrMid{2014/12/20}{#1}{#2}} \begin{document} \myText{1}{4} \end{document} Allowing ...


5

The smallest font should be mathb5 not mathb (error in the original but not triggered in the original document) \documentclass[11pt,a4paper]{amsart} \pagestyle{plain} \DeclareFontFamily{U}{mathb}{\hyphenchar\font45} \DeclareFontShape{U}{mathb}{m}{n}{ <-6> mathb5 <6-7> mathb6 <7-8> mathb7 <8-9> mathb8 <9-10> mathb9 ...


8

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. Additionally, it seems to me that setting a local Haskell server up is not very ...


2

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


1

The symbol is defined as U+2C71 and the advanced diacritic as U+31F. If you want to use some special font on you system, you will have to use fontspec and Lua- or XeLaTeX. I am showing two fonts I found on my system and the possible kerning correction, if the diacritic is not set nicely: % arara: lualatex \documentclass{article} \usepackage{fontspec} ...


1

As mentioned in comments, the packages nomencl or glossaries are able to give you what you need.


3

I'd avoid \overline: \documentclass{article} \usepackage{amsmath} \makeatletter \newcommand{\dashover}[2][\mathop]{#1{\mathpalette\df@over{{\dashfill}{#2}}}} \newcommand{\fillover}[2][\mathop]{#1{\mathpalette\df@over{{\solidfill}{#2}}}} \newcommand{\df@over}[2]{\df@@over#1#2} \newcommand\df@@over[3]{% \vbox{ \offinterlineskip \ialign{##\cr ...


2

This may have the drawback of slightly affecting line spacing, but... I substitute \Overline which does an \overline with a little extra stack gap added. And for \preclosure, I modified it so that it preserves the math style of the argument, using the \ThisStyle{...\SavedStyle...} construct of the scalerel package. I did not really address the issue of ...


2

\documentclass[a4paper,oneside,12pt]{report} \usepackage{trfsigns} % Transformation Symbol o---o \laplace and \Laplace \usepackage[fleqn]{amsmath} \newcommand{\vlaplace}[1][]{\mbox{\setlength{\unitlength}{0.1em}% \begin{picture}(10,20)% \put(3,2){\circle{4}}% ...


1

Some other fonts. As can be seen here, the command \cyrgup is a mapping to the unicode U+0491 CYRILLIC SMALL LETTER GHE WITH UPTURN. Here are the available fonts and you may check possible symbols on your machine. % arara: pdflatex \documentclass{article} \usepackage[T2A]{fontenc} \usepackage{gentium} \begin{document} \cyrgup \end{document} % arara: ...


4

The \cyrgup command is defined in the T2A font encoding (cyrillic and not greek...), so it should suffice to load the package fontenc with that encoding table. MWE: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[T1,T2A]{fontenc} \begin{document} \cyrgup \end{document} Output


2

And here is more simple definition than @egregs ooalign: \def\gdw{\mathrel{{>}\mkern-13mu{<}}} $A \gdw B$ And it is optical better:


5

This is the unicode U+2AA4 named "GREATER-THAN OVERLAPPING LESS-THAN". Here, you may see, which fonts support this symbol and here, which fonts on your system do provide it. The MWE requires Lua- or XeLaTeX. It just shows two fonts I found on my PC. Of course, you should define your preferred version in a \mathrel-command. % arara: lualatex ...


6

A simple application of \ooalign: \documentclass{article} % Simple version if you don't need it in sub/superscripts %\newcommand\gdw{\mathrel{\ooalign{$<$\cr$>$\cr}}} % Fuller version \makeatletter \newcommand{\gdw}{\mathrel{\mathpalette\@gdw@\relax}} \newcommand{\@gdw@}[2]{\ooalign{$\m@th#1<$\cr$\m@th#1>$\cr}} \makeatother \begin{document} ...


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}} ...


4

\documentclass{standalone} \usepackage{tikz} \newcommand{\whatzit}{\tikz{\path node[anchor=base,inner sep=0pt](a){$<$} (a.center) +(0pt,.25ex) node[rotate=-30,scale=.6]{$=$};}} \begin{document} Text with \whatzit{} in the middle. \end{document}


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 ...


0

One simple method would be to use tikzpackage. You can draw each line of the rectangle. It may be tedious at first to use tikz, but it is so much more convenient when you need to modify your image. \usepackage{tikz} \begin{document} \maketitle S \begin{tikzpicture}[font=\small\sffamily\bfseries, node distance = 0.5cm] \tikzset{ ...


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 ...


3

Here is a version that allows for line breaks and uses an open rectangle on both parts. \tikzmark is used to mark the start and end of the text and the ovals are drawn after the text has been typeset: Notes: This does require two runs. First one to determine the locations, and the second to do the drawing. This won't work if the text crosses page ...


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}


4

A sloppypar will momentarily allow you to overcome the problem. This problem arises for any oversized box that wants to be typeset at the end of a line. The sloppypar feature (or \sloppy for the whole document) changes TeX's penalties to give more emphasis to avoiding margin overruns, at the expense of grossly wide interword spaces. There is no "free ...


2

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


1

Here I \stackinset a paren within the horizontal extent of the \rightarrow. The horizontal placement of the paren is controlled by the 2nd parameter to \stackinset. By using the {c} anchors, the horizontal (2nd argument) and vertical (4th argument) offsets are taken relative to the center of the \rightarrow. \documentclass{article} ...


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}


5

Here are two options: \documentclass{article} \usepackage{mathtools} \newcommand{\lbarrow}{\mathrel{{\ooalign{$\rightarrow$\cr\hidewidth$($\hidewidth}}}} \newcommand{\rbarrow}{\mathrel{{\ooalign{$\rightarrow$\cr\hidewidth$)$\hidewidth}}}} \makeatletter \newcommand{\lrparen}[1]{% \settowidth{\@tempdima}{#1}% ...


2

You can type the character √ directly if you load inputenc with the option utf8x. MWE: \documentclass{article} \usepackage[utf8x]{inputenc} \begin{document} √(2+3) \end{document} Output


3

Here I offer two variants, where a right paren (rotated) is scaled to the proper width, or where it is stretched to the proper width. The vertical offset is controlled by the optional argument to \stackon. I personally find the \stretchto option superior. EDIT: Definitions tweaked to auto-handle smaller mathstyles. \documentclass{article} ...


3

There are actually two issues with the way you're typesetting these tables. First, as already noted in @cfr's answer, you must use TeX's math mode for the macros \delta, \theta, and \leq (as well as for getting the proper spacing around the symbol <). Second, you need to apply some care with the way you enter numbers and their scientific units. The most ...


3

\delta, theta and \leq are commands for maths mode. You are trying to use them in text mode (which is the default). You need to switch to maths mode in order for it to work: Delta & $\delta < 4Hz$ & Sleep \\ Theta & $4Hz < \theta \leq 8Hz$ & Sleep \\ In each case, the first $ enters maths mode and the second leaves it, returning to ...


2

You have to declare a font encoding that supports cyrillic, for instance T2A. Then, as the commands for producing the characters don't have (for efficiency reason) a default encoding, you have to add it for the characters you need. \documentclass{article} \usepackage[T2A,T1]{fontenc} \usepackage[utf8]{inputenc} \DeclareTextSymbolDefault{\cyre}{T2A} ...


1

This is just an extension of Luigi's answer where the siunitx package is used to typeset the physical quantities in a consistent way: \documentclass{article} \usepackage{steinmetz} \usepackage{siunitx} \begin{document} $6\phase{\ang{200}} - 4\phase{\ang{50}}$ \end{document}


5

The handwriting recognition toolkit (hwrt) is one possibility to classify you recordings. There are still many rough edges and the software gets updated on a daily basis (04.12.2014). The user interface is in a browser and looks like this: The installation is explained in the documentation. If you have trouble or have an idea how to improve it, just leave ...


2

This approach uses the scalerel package to scale the \varPI to the same vertical extent as an x in the local math style. Thus it automatically works for sub- and superscripts, as well as in all cases of \scriptstyle and \scriptscriptstyle. \documentclass{article} \usepackage{amsmath, scalerel} \newcommand{\smallPi}{\scalerel*{\varPi}{x}} \begin{document} ...


3

This might be what you're looking for: \documentclass{article} \usepackage{amsmath} \makeatletter \newcommand{\smallPi}{\mathpalette\small@Pi\relax} \newcommand{\small@Pi}[2]{% \mbox{\fontsize{\sf@size}{\z@}\selectfont$\m@th#1\varPi$}% } \makeatother \begin{document} \[ % first like it is in inline formulas {\textstyle\smallPi x_{x\smallPi}}\qquad % ...


3

With a recent version (at least v4.9) of chemformula you can say: \ch[plus-output-symbol = \raisebox{.2ex}{+}]{CH2=CH2 + 3 O2 -> 2 CO2 + 2 H2O} You can also do the opposite (this works also with older versions): \ch[arrow-yshift = -.2ex]{CH2=CH2 + 3 O2 -> 2 CO2 + 2 H2O} The .2ex in my examples is just an initial guess… \documentclass{scrartcl} ...


3

Here is a solution using mhchem and the arrows=pgf-filled option (to get similar arrows). Note the option requires manual loading of the tikz package. \documentclass{extarticle} \usepackage{tikz} \usepackage[version=3]{mhchem} \mhchemoptions{arrows=pgf-filled} \begin{document} \ce{CH2=CH2 + 3 O2 -> 2 CO2 + 2 H2O} \end{document}


9

Welcome to TeX SE! The key issue is that ebgaramond-maths issues the following \DeclareSymbolFont{letters} {OML} {EBGaramond-Maths} {m} {it} This overwrites the existing letters font. This enables all of the characters which the font does provide and which are used in the OML encoding. However, it does this by telling LaTeX that whenever a maths ...


6

What you're asking for is an overlapping macro. Either use \rlap (which produces a right overlap): \rlap{?}! or \llap (which produces a left overlap): ?\llap{!} The order of the punctuation ? and ! doesn't really matter, although they have different widths (and therefore may set slightly differently when switched around). The LaTeX2e equivalent is ...


14

You are describing the so called Steinmetz notation for complex numbers (or angle notation): the number on the left is the magnitude, the one on the right is the argument of the complex number. You can use the \phase command from the steinmetz package. \documentclass{article} \usepackage{steinmetz} \begin{document} $6\phase{200^\circ}-4\phase{50^\circ}$ ...


4

Whether you use “sign” or “sgn” is a style issue which your intended publisher can answer, not us. That said, you probably want to use AMSMath’s \DeclareMathOperator not \newcommand; see newcommand vs. DeclareMathOperator: … \usepackage{amsmath} \DeclareMathOperator{\sign}{sign} … Depending on the value of $\sign x$, $y$ will take the following values: … ...



Top 50 recent answers are included