Occasionally, I have inline math in my text (e.g., $Y^{(0)}$). This will make the line on which it appears taller and introduce an extra space between that line and the previous one. This has the undesired effect of making that line stand out. The solution is to use \smash{$Y^{(0)}$} instead. But I don't want to have to do this manually for all the inline math that I have.  So, is there a way to \smash everything by default? I.e., I want my line height to be fixed and not adjust to things like $Y^{(0)}$.
122282
Often when typesetting mathematics, one wants to use math symbols in line. When these are certain symbols, or more often, decorated symbols, whose height is sufficiently large, the line spacing (that is, the space between the current line and the previous one) is increased in order to compensate for the height of the symbol. A usual example is $\widetilde{f}$, for instance. I would like to stop this from happening, even if it leads to possible overlap of symbols between the two lines. Is this possible?  Another one that will certainly induce a lineskip increase is \overset{\alpha}{\to}. I would also like this not to induce a lineskip increase.  If it is relevant, I am using XeLaTeX with unicode-math and the Lucida fonts, but I would very much prefer a general solution, as I encounter this problem with computer modern (and the $\widetilde{f}$) as well.
93898
In math, one often needs to put a letter inside the symbols &lt;&gt;, e.g. to denote a cyclic group &lt;x&gt; generated by some element x. However, plain text displays the symbols &lt; and &gt; as an upside down exclamation point and an upside down question mark, respectively, while math type displays a large space like so:  &lt; x &gt;    Is there some way to reduce this spacing?
33623
I have a document where I quiet often refer to source code element, such as class names, I wanted to format these strings differently, but at the beginning I didn't want to fiddle with various options I had, rather I defined my custom command as follows:  \providecommand{\inlinecode}[1]{\texttt{#1}}   Now my question is, what do you think is the best way to define \inlinecode? Note: I often use text with unescaped &lt;, >, e.g., List&lt;T&gt;.   The \texttt looks fine to me, and works with &lt;, >, but sometimes the words overflow the line. Is there any way to tell latex not to overflow the line, but rather "underflow" or insert more spaces between words, which seems to me as (maybe still ugly but) more acceptable than overflow? And is it possible to achieve it by only changing definition of my command, so I won't have to change the whole source?
39610
I need a vertically dashed line in my matrix, but my current solution looks like the dashes are going out of the array environment (and they are - i checked in photoshop). Can I manually shorten it by say 1 mm or 0.5 mm?  Here is MWE:  \documentclass[a4paper]{article} \usepackage{amsmath} \usepackage{arydshln} \usepackage{mathtools} \begin{document}  \begin{equation*} \setlength{\dashlinegap}{2pt} \left[\begin{array}{cccc:c} a_{11} &amp; a_{12} &amp; \cdots &amp; a_{1n} &amp; b_1 \\ a_{21} &amp; a_{22} &amp; \cdots &amp; a_{2n} &amp; b_2 \\ \vdots &amp; \vdots &amp; \ddots &amp; \vdots &amp; \vdots \\ a_{n1} &amp; a_{n2} &amp; \cdots &amp; a_{nn} &amp; b_n \end{array} \right] \end{equation*}  \end{document}
106814
On a publication (thesis, paper, other), when should I write an equation inline and when should it be separated and numbered from the text?  I've seen publications containing both styles, but I don't know if there is a rule to choose among them. My field is applied computer science.
87808
The reigning answer for the  completely disregards math-mode.  This might be preferred when all math equations are set display style, but a matching font is a must for in-line equations.  My current MWE (based on the one given ) only gives the text-mode items in sans, but any math remains in serif style (in-line, numerical-only equations look particularly hideous).  How can I set math in sans-serif as well?    \documentclass[]{article}  \usepackage{helvet} \renewcommand{\familydefault}{\sfdefault}  \usepackage[math]{blindtext}  \begin{document}  Text looks particularly bad when you have $123,400$ number-only equations in-line.  \blindmathpaper  \end{document}
75207
Does anyone know how to get line spacing in a paragraph to be greater than one and half spacing and less than double spacing? I tried \renewcommand{\baselinestretch}{value} but it did not work.
79221
I'm busy answering a question by constructing a new math operator that uses the sum symbol and some TikZ placed on top. My answer as it stands can be found . It looks (I think) pretty good in display style, but too large when shown inline. Even if it automatically set the sum symbol into inline size, the placement of the TikZ would be off.  Is there a way to define different code for when the operator is used in display mathematics environments, and when it's inline? Alternatively, is there a way to detect when you are in display or inline mode?  From the aforementioned example, here is the code I constructed:  \documentclass{minimal} \usepackage{amsmath} \usepackage{tikz}  % Modify the coordinate (-0.3ex,0) to adjust alignment, and (0.1) to adjust the size. \DeclareMathOperator*{\osum}{\ensuremath{     \begin{tikzpicture}[baseline=(char.base), inner sep=0, outer sep=0]         \draw (-0.3ex,0) circle (0.1);          \node (char) at (0,0) {$\displaystyle\sum$};  % Want to define a second symbol for inline...     \end{tikzpicture}}% }  \begin{document}  \[ G=\osum_a^b H \]  And now in inline mode the equation $G=\osum_a^b H$ is obviously too big.  \end{document}
19022
I have something like this:  \usepackage{algorithm} \usepackage{algpseudocode}  ... \begin{document} \begin{algorithm}[H] \begin{algorithmic}[1] \Function {function}{a} \State a = a + 1 \EndFunction \end{algorithmic} \end{algorithm} \end{document}   I'm using [H] because I want to set the position of my code. But after doing that a space for caption appears and I don't want it and now there are to horizontal lines beafore my code. You can see what I mean in this picture:   How can I remove one of those lines?  Thanks!
87076
Sometimes a line break inside inline math is acceptable and sometimes it detracts from the message. I'd like to be able to see exactly where such breaks (meaning any line break during inline math mode) occur in my final-minus-epsilon draft and decide if any action should be taken to rearrange sentence wording, etc. (based on my manual inspection of the instance). I know there are automated ways to prevent line breaking in inline math, but I don't want to do that. The document is huge, so it's not OK to just manually look through it for such breaks.  Is there a way to mark where these things occur? Ideally by line number in the log. But also OK would be some sort of visual or searchable signal that stands out in the PDF, if somehow that is easier.    Added later:  points out that \binoppenalty and \relpenalty are the badness contributors that matter. So can we log when these are used?
72635
I use the options  \renewcommand{\baselinestretch}{1.25} \setlength{\parskip}{0pt} \setlength{\parindent}{0pt}    in the preamble of my document and most of the time the document looks like intended. Once in a while though, especially when I use multiline-equations, I get huge spaces right before and after the equation and the surrounding text, for example:    Is there any way I can avoid that without removing the \parskip option?
69728
I often used \boxed{...} from the AMS math package to place a box around important equations.  However, this approach often produces somewhat awkward looking output.  Consider  \documentclass{article} \pagestyle{empty} \usepackage{amsmath} \begin{document}  \[  \boxed{c_i = \sum_jA_{ij}}  \]  \[  \boxed{c_i = \langle\psi|\phi\rangle}  \] \end{document}     Observe that in the first case the  box looks unbalanced while in the second case could do with more padding on both the top and bottom.  What is the best way to go about this?  I know that I could use a \phantom but am wondering if more elegant solutions exist.
71738
Hi I am wondering what code is used to get text above the $\rightarrow$   have tried $ \xrightarrow{P}$ but not running on my LaTeX as I do not know which package to install or how to install it.   currently using \usepackage{mathtools} but it wants to load from a random directory and then LaTeX stops working.
80590
I design emoticons, and often I need to resize things. However, this usually needs to be done without anti-aliasing. I can't find anywhere to do this.  It's kind of backward, as it's actually harder for a program to use anti-aliasing than not. It also means I need to spend lots of time hand-pixelling everything twice as large.  I'd especially prefer a way that this can be done within Photoshop CS3, though it's not required.
9736
I've posted a lot to StackOverflow, and I've noticed something kind of irritating with the formatting in writing questions and comments. If I need to put something inside a &lt; and a >, without spaces in the middle (like right there), it will think it's code and not show up, like this   (obviously it won't come up what I wrote there, or else this wouldn't be an issue, but if you open up the question to edit you can see what's written there.)  If I want it to show up, right now I have to add an extra set of brackets inside of the originals with a junk variable, like right &lt;here> (again, open in edit window to see).  This is really annoying when trying to show variables like lists that require those brackets, and I feel like the junk variables could confuse people looking at the edits. Is there a way to get around this formatting? Thanks!
80243
My code is this:  \setlength{\parindent}{0ex} \texttt{ x\hspace{1ex}\hspace{1ex}\hspace{1ex}y \newline \hspace{1ex}\hspace{1ex}\hspace{1ex}\hspace{1ex}y }   What I'd like to see is:  x   y     y   What I actually see is:  x   y y   I've tried various other ways of inserting a space. So far, they've all resulted in leading whitespace being ignored.  I've also tried using \verbatim and \alltt but they eat too many of the other commands that I need preserved (not shown in the example above).  I suppose I could (in the script that emits the LaTeX) count the leading spaces in each line and use different \parindent values. I'm looking for something more elegant first.
101988
I'm embarking on a journey to create a conference abstract book using XeTeX and got stuck within five minutes:        The missing 'g' in 'somethin' influences the line height of the following line. How can I correct this?  At the end I want to be able to include the abstracts and corresponding information through our online registration system, so this should be a global setting.  My MWE:  \documentclass[10pt, a5paper]{article} \usepackage{fontspec}  %% GEOMETRY \usepackage[left=2cm, right=1.5cm]{geometry} % to change the page dimensions  \newenvironment{AbsHead} {     \fontsize{16}{22}\headfont\noindent }% {     \vspace{0.5 cm} }  \newenvironment{AbsAuthors} {     \fontsize{12}{14}\authorfont\noindent }% {    \vspace{0.5 cm} }  \begin{document}  ￼￼￼￼\setmainfont{Minion Pro} \newfontfamily\authorfont{Helvetica Neue Light} \newfontfamily\headfont{Helvetica Neue Condensed Bold}  \begin{AbsHead}The XIAP  something something something somethin somethin somethin somethin somethin somethin somethin something something\end{AbsHead}   \begin{AbsAuthors}Somebody Someone\end{AbsAuthors}   \noindent Purpose: Lorem ipsum \end{document}