Tag Info

Hot answers tagged

18

Use the menukeys package. They look even fancier than in SO... \documentclass{article} \usepackage[os=win]{menukeys} \begin{document} \keys{\ctrl + \Alt} \end{document} If you add the line \renewmenumacro{\keys}[+]{shadowedroundedkeys} in the preamble, you can get even fancier output (with shadows)


18

The double brackets are defined in stmaryrd as \llbracket and \rrbracket. For the other symbols, provided they have to be used only in display mode, you can define \DeclareMathOperator*{\bigdoublewedge}{\bigwedge\mkern-15mu\bigwedge} \DeclareMathOperator*{\bigdoublevee}{\bigvee\mkern-15mu\bigvee} MWE \documentclass{article} \usepackage{amsmath,stmaryrd} ...


17

The symbol can be constructed from the sans serif math font, e.g.: \documentclass{article} \newcommand*{\RangeX}{% \mathsf{X}\mkern-9mu\mathsf{X}% } \begin{document} , the \textbf{range} of $X$, denoted $\RangeX$, \end{document} If the symbol is also used in the smaller math styles (\scriptstyle, \scriptscriptstyle), then the width ...


14

You can use \overset from amsmath: \documentclass{article} \usepackage{amsmath} \begin{document} \[\{L(\lambda)\ \overset{\otimes}{,}\ L(\mu)\}\] \end{document} I added optional spaces to make it look more like your example: As noted in the comment, you can use \scriptscriptstyle to make \otimes smaller: \documentclass{article} \usepackage{amsmath} ...


14

The following example sets \otimes as upper limit over the comma, which is turned to a math operator via \mathop. This also decreases the size of ⊗. By explicitly using \scriptscriptstyle, the symbol can be decreased further, see Manuel's comment. Then the result is wrapped in \mathpunct to keep the property of the comma as punctuation character: ...


13

It's easy to use a zero space sans serif X, then a small space and then another sans serif X: \documentclass{article} \usepackage{mathtools} \newcommand{\range}{% \mathop{\mathrlap{\mathsf{X}}\mspace{3mu}\mathsf{X}}% } \begin{document} The \emph{range} of $X$, denoted $\range$. The range of $f$ is $\range f$. \end{document} Here is the same if I ...


12

You can use pst-labo Few samples are: \documentclass{article} \usepackage{pst-labo} \usepackage{auto-pst-pdf} \begin{document} \psset{unit=0.5cm} \psset{tubeCoude=true} \rule{0pt}{2.5cm}% \begin{pspicture} \pstTubeEssais[glassType=erlen] \end{pspicture} \begin{pspicture} \pstTubeEssais[glassType=ballon] \end{pspicture} ...


12

If you're looking for an icon, the font-awesome font has a fa-flask icon, accessible with the fontawesome package through the \faBeaker command. Note, as it's an Opentype font, you can use it only with LuaLateX or XeLaTeX. Demo: \documentclass[12pt,a4paper]{article} \usepackage{fontspec} \usepackage{ebgaramond} \usepackage[x11names]{xcolor} ...


9

Does this look nice? \documentclass{article} \begin{document} Using \verb|\verb|: \verb|#| and using \verb|\texttt|: \texttt{\#} and then regular symbol using \verb|\#|: \# \end{document}


8

Picture mode to the rescue! \documentclass{article} \usepackage{pict2e} \makeatletter \newcommand{\cwedge}{\mathbin{\mathpalette\do@cwedge\relax}} \newcommand{\do@cwedge}[2]{% \sbox\z@{$#1\m@th\wedge$}% \dimen@=\ht\z@ \unitlength=.005\wd\z@ \count@=\dimen@ \divide\count@\unitlength \begin{picture}(200,\count@) \roundjoin ...


7

\documentclass[border=5pt]{standalone} \newcommand{\statrange}{{\sffamily X\kern-.5em X}} \begin{document} the range of X, denoted \statrange, \end{document}


7

If you can use the stix package (or unicode-math), then the symbol is available as \approxident. Note however that \usepackage{stix} in a pdfLaTeX document will change all math symbols. Also importing only the symbol from the STIX fonts might give one that's not compatible with your symbols. There is a solution in the Comprehensive List of Symbols: ...


7

If the symbol \approxident is not available, see greg's answer, the following definition provides the symbol by using \sim three times moved with a gap close to the gap of the \equiv symbol (more or less because of line thickness issues). The symbol works in the different math style versions and the lower border of the bounding box is fixed to get a correct ...


7

And this one? \documentclass{article} \newcommand{\myhash}{\raisebox{\depth}{\#}} \begin{document} \# or \myhash? \end{document} The second hash fits your requirement (not dropping below the baseline), but personally I think the first is better positioned.


7

Here, I use Bruno's \slantbox from Shear transform a "box" in conjunction with \mathscr. EDITED to use John K's variant of \slantbox at Adjust custom made upright greek letters when used in subscripts in order to achieve better horizontal positioning within the \slantbox. \documentclass{article} \usepackage{mathrsfs} \newsavebox\foobox ...


6

You can use the rsfso package: \documentclass{article} \usepackage[scr]{rsfso} \newcommand{\Laplace}{\mathscr{L}} \begin{document} \begin{equation} \Laplace\{\sin(t)\} = \frac{1}{s^2 + 1} \end{equation} \end{document} Variant preamble if you need also mathrsfs (but in that case I'd simply use the script L provided by \mathscr{L}): ...


6

You have to do some chasing in kpfonts.sty to arrive at \documentclass{article} \DeclareSymbolFont{largesymbolsA}{U}{jkpexa}{m}{n} \SetSymbolFont{largesymbolsA}{bold}{U}{jkpexa}{bx}{n} \DeclareMathSymbol{\varprod}{\mathop}{largesymbolsA}{16} \begin{document} \[ \varprod_{i=1}^n A_i\ne\prod_{i=1}^n A_i \] \end{document} The steps Look for \varprod in ...


5

Don't set multiple letter identifiers like runs in math italic, use \mathrm{runs} or \mathit{runs} For the question mark \mbox{?`} or \mbox{¿} if you have specified \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} Note that > only typesets as ¿ if you use the original 7-bit OT1 encoding, if you use T1 (or any other encoding) > will ...


5

One possibility \stackrel{\otimes}{,}: $\left\{L\left(\lambda\right)\ \stackrel{\otimes}{,}\ L\left(\mu\right)\right\}$


5

A solution with TikZ. The hash sign has the width of 80% of the equals sign, see \myWidth, and the height of an uppercase letter, see \myHeight. The vertical distance of the horizontal lines is configured as a third of the width, see \mySepY. The angle of the slanted lines is configured by \myAngle. Also side bearings are added, see \mySideBearing. The line ...


5

Rather than raise the height of \max_{r_t}, I would lower the \mathbb{E} particle, making it look more like a purely symbolic entity (rather than an uppercase letter). One way to do this is to encase it in a \vcenter{\hbox{...}} set of directives. Note that this method (as well as the one you initially proposed) "works", typographically speaking, only if ...


5

A variant of karlkoeller's method that doesn't require guessing the amount of the back up. The relative position of the two symbols can be adjusted by changing the factor in \makebox[1.35\wd\z@][s]{$\m@th#1#2\hss#2$}% which in this example is set to 1.35. \documentclass{article} \usepackage{amsmath} \makeatletter ...


5

You can get these from the MnSymbol package: \documentclass[12pt,a4paper]{article} \usepackage{MnSymbol} \begin{document} $$ \medtriangledown $$ $$\medtriangleup \qquad \wedge \qquad \vee $$ \end{document}


4

Some suggestions: Most importantly, place the text material before and after the vertical bar inside separate \textsc{...} directives. Instead of \frac, use \dfrac (requires the amsmath package). The terms in the numerator and denominator will look much less cramped. Consider using \big-sized outer parentheses in both the numerator and denominator. Instead ...


4

You can use the package upquote and put the code in a verbatim environment. \documentclass{article} \usepackage{upquote} \begin{document} \begin{verbatim} data 'a list = Nil | Cons (e, 'a list) \end{verbatim} \end{document}


4

\text works fine for me: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{amsmath} \begin{document} ?`abc? $\text{?`}a=b$ \end{document}


4

Here is a primitive attempt to achieve outcomes which may be close to what you need. This solution is perhaps suitable for those who wish to achieve square corner quotation marks such as yours, but prefer not to use a typesetting system specialised for Japanese such as pTeX [PDF documentation], or who cannot use a TeX engine specialised to use unicode input ...


3

\documentclass{article} \begin{document} This is an inline $\partial$ \end{document}


3

The easy way is to use \%, the preferred way \SI{5}{\percent}, for example. The siunitx package approach has a 'better' spacing. \documentclass{article} \usepackage{siunitx} \begin{document} One way: 5\% or \SI{5}{\percent} \end{document}


3

You do not need use \newcommand. Your symbol is part of the packages txfonts and pxfonts. You must insert in the preamble: \usepackage{txfonts} % https://www.ctan.org/tex-archive/fonts/txfonts And insert in the text: \textit{\textbf{Symmetry:}} $(X \Perp Y | Z) \Rightarrow (Y \Perp X | Z)$. \textit{\textbf{Decomposition:}} $(X \Perp YW | Z) \Rightarrow ...



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