# Tag Info

12

It is better to mark URL with \url{http://.....} (url or hyperref) as then line breaking is better handled. Note that url package will just allow linebreaking in URLs and doesn't add any annotation. hyperref uses the same code for linebreaking but also makes the link an active link. By default this adds coloured decoration but the package has several options ...

10

You can have your underscores print as such outside math mode and doing their usual business in math mode: \documentclass{article} \usepackage[T1]{fontenc} \catcode_=12 \begingroup\lccode~=_\lowercase{\endgroup\let~\sb} \begin{document} Under_score and $a_{1}$. \end{document} For the problem of colored URLs, just load hyperref with the relevant ...

10

You can use the new newtxsf package: \documentclass{article} \usepackage{fontspec} \usepackage{newtxsf} \setmainfont{Helvetica Neue}[Scale=0.9] \AtBeginDocument{% \DeclareMathSymbol{0}{\mathalpha}{operators}{0}% \DeclareMathSymbol{1}{\mathalpha}{operators}{1}% \DeclareMathSymbol{2}{\mathalpha}{operators}{2}% ...

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

8

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 $... 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 ... 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)  5 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}

5

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

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

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)]{ ...

3

A simpler approach with xparse: \documentclass[12pt, reqno]{amsart} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{xparse} \usepackage{mathtools} \usepackage[version=3]{mhchem} \DeclarePairedDelimiter{\cebrack}{[}{]} \NewDocumentCommand{\conc}{sO{}m}{% \IfBooleanTF{#1} {\ensuremath{\cebrack*{\ce{#3}}}} ...

2

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

2

Here is an example of what can be done with pstricks , and more specifically with the psmatrix environment from pst-node. The basic idea is quite simple: putting the elements of the lattice as elements of a matrix which are nodes, then connect these nodes with invisible lines. The inclusion relations are labels placed in the middle of these lines: ...

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

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

I merely applied \detokenize to the argument of \rhead, so as to make the underscore a catcode 12. \documentclass{article} \usepackage[T1]{fontenc} \usepackage{fancyhdr,listings} \newcommand\codefile[1]{% \refstepcounter{subsection}% \addcontentsline{toc}{subsection}{% \protect\numberline{\thesubsection}#1}% \sectionmark{#1}% ...

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