In typesetting math in LaTeX, there is inline mode (math inside text) and display mode (separate equations outside text). This tag is used for inline mode. It should also be used for other structures that provide a similar distinction between its usage, like the {listings} package's environment and ...

learn more… | top users | synonyms

44
votes
6answers
16k views

Prevent LaTeX to break an inline math equation

I hope this question was not asked before. At least I haven't found it. I have an inline math equation and LaTeX is breaking it into two parts. In this case I'd prefer to have the whole and short ...
3
votes
1answer
34 views

Enter 2 by n matrix (permutation notation) as inline math without taking up much space [duplicate]

I need to use something that looks like a 2 by n matrix as inline math. How can I achieve this without it pushing the lines apart? Example: \left(\begin{array}{cccc} 1 & 2 & \dots & N ...
0
votes
1answer
40 views

What is \( used for? [duplicate]

I have seen the following syntax in a LaTeX example : \( Inline math formula \) What is the difference between those delimiters and $ ?
5
votes
1answer
178 views

How can I typeset function names as they appear in algorithmic environments?

I'm using the algorithmicx package and I'd like to mention a function in common text. Is there a way to do that, or do I have to make a format that mimics the one used in the algorithm (all caps ...
39
votes
4answers
3k views

What is the Necessity of $…$ Around Numbers?

I typed up an assignment with a lot of numbers in LaTeX and turned it in to my adviser. When he returned it to me with some corrections, one of which was a lot of $ around my numbers. I understand ...
3
votes
3answers
3k views

Numbering side-by-side equations or inline equations

I am trying to produce a two-column table of math equations, where each cell contains its own left-justified, numbered equation. I tried using \begin{equation} \end{equation} inside the tabular ...
10
votes
2answers
187 views

Different symbols in $…$ and align environments

Is there a way to force LaTeX to produce different symbols either in $...$ or \begin{align}...\end{align} environments? For example $ \mymacro $ should lead to A while \begin{align} \mymacro ...
0
votes
0answers
18 views

In-line math symbol convention [duplicate]

I know it's much better to use \[ \] over $$ $$ when typesetting math equations on their own line (I believe this is called display math?) But is it also inappropriate to use $ $ for in-line math over ...
0
votes
0answers
66 views

LaTeX for word style divide?

In microsoft word equation, it's possible to write a / b in a format that a is slightly upper than normal text, the / can be entered using \ldivide. Is it possible to do so in LaTeX?
1
vote
1answer
559 views

Include a lstlistings keyword in lstlistings caption

I'm writing a small summary for my fellow students about VB in LaTeX. I have to cover the basic loops and found the \lstlistnigs package to be the best for writing colored code. I have already added ...
0
votes
2answers
64 views

Display inline sums

I am writing my thesis and I have some sums which are inline, and others which are part of equations. My questions is: is there a convention, an unwritten rule about how inline equations should be ...
3
votes
1answer
317 views

How to squeeze a formula inside a text in latex?

I type some formula in latex inside my text, but When I make it pdf I see it is not squeezed. How I can make it squeeze? See the attached, which shows the problem!
2
votes
1answer
92 views

AucTeX - Turning inline mode into displaymath and vice versa

Usually, when redacting math stuff, I deal many times with the following situation : I have written some formula in a displaymath environment and, when compiling, realize it should look better inline ...
1
vote
2answers
106 views

How can I invoke a macro inside minted inline code?

How can I use a command inside a minted one-liner? This code \newcommand{\HADOOPUSER}{hduser} \mint{console}|sudo groupadd \HADOOPUSER| currently produces sudo groupadd \HADOOPUSER whereas ...
8
votes
2answers
234 views

Include PDF via \pdfliteral

The pdfinlimg package and perl script allow to include ("binary") images directly into the LaTeX source code via the \pdfliteral command. For example, \documentclass[margin=1cm]{standalone} ...
0
votes
0answers
29 views

Override the spacing on the right of an in-line equation when followed by a punctuation mark

I set \mathsurround to 2pt in order to have a bit more horizontal spacing between text and in-line equations. Is there a way to set it to 0pt on the right whenever the in-line equation is followed by ...
2
votes
1answer
123 views

$$, \[ \] and equation environment alignment

I'm using scrreprt class and I'm having troubles with different behavior of $$ and \[ \]-written equations and equation environment. The problem is that alignment is not the same: $$ equations are ...
3
votes
1answer
480 views

positioning table inline with text

I have following piece of code: \section{Skills} \begin{CV} \item[Computing:] C/C++, Python and Matlab \item[CAD Tools:] GNU Radio, Xilinx ISE, Active HDL, MikroC, Keil uVision, Altium Designer, ...
1
vote
1answer
97 views

I can't find/fix the errors in order to be able to compile it

\documentclass{article} \usepackage{amsmath} \begin{document} $These are two truth tables for the following: $\neg (p \vee q)$ is logically equivalent to $(\neg p) \wedge (\neg q)$ ...
0
votes
0answers
16 views

Is there a way to change behaviour of a (math)command depending on the display style? [duplicate]

I want to define a command that changes behaviour depending on weather it is written in inline or disply mode. For example I want to define \backlim, such that it prints \lim_\leftarrow when used in ...
5
votes
2answers
128 views

Best way to deal with overfull inline listings

I am typesetting inline code listings using the listings package. Since I'm using C# syntax, oftentimes listings contain long words (type names/variable names). Since words in listings won't be ...
4
votes
2answers
132 views

How to denote adjacent vertices?

Background I'm trying to write a rapport that relies on some rudimentary graph theory and as such I'd like to write a section explaining the basics of it. Trying to do I've run into a bit of a snag ...
2
votes
3answers
330 views

How can I have inline code (delimited by |) in a footnote or in a caption?

I've defined | as a "short inline character", using \lstMakeShortInline| I'd like to use that delimiter to typeset inline code in a footnote or a caption, e.g. \footnote{Java uses the |break| ...
0
votes
0answers
19 views

Place figure just as you would a glyph/character [duplicate]

I would like to use a figure inline - and by that I literally mean having it inside the line of text. I want to display it in parentheses to illustrate what symbol I am referring to - these symbols ...
13
votes
5answers
684 views

Alignment in inline math

I want to enclose a tabular environment with a bracket, inside an enumerate environment, and be aligned to top. In the following example: \documentclass[a4paper]{article} \begin{document} ...
3
votes
1answer
100 views

How do I make an inline list respect margins without hyphenation?

I'm using the enumitem package to create inline lists in my resume. I currently have a snippet of code that looks like \begin{description} \item[Frameworks/Libraries:] ...
1
vote
0answers
75 views

Using oldstyle numbers in XeLaTeX math mode for ONLY inline math

Is there any way to use OldStyle numbers for text and inline math only, while using Lining in the align and equation environments? Ideally via mathspec, but I'm open to other solutions.
6
votes
1answer
113 views

Spacing around inline equations

What is the parameter determining spacing and stretchability around inline equations? I want to tweak spacing exactly but cannot find where the parameters are.
7
votes
1answer
274 views

Embed image data (png or pdf) inside tex document [duplicate]

Is there a way to include (or "inline") raw image data or pdf data inside the tex document itself, such that it becomes stand-alone? Something like this: ...
2
votes
1answer
92 views

Can I make lyx produce double dollar signs instead of \[ and \] it currently produces for inline math?

I am using LyX to type answers and questions for Math.SE and many times I need to use use inline math (by writing two dollars signs instead of just the one, i.e $$). After finishing typing I copy the ...
2
votes
1answer
89 views

Using math symbols inside mbox

I am trying to write something like r=1m or r~1m inlined in my text. Currently i am using $\mbox{r=1m}$. However this gives me problems if I use $\mbox{r \approx 1m}$ it is not working and ...
3
votes
1answer
277 views

Fill in the blank: text wrapping & math mode

I am making notes with blanks to fill in and would like to produce an instructor version with blanks filled in and a student version with blanks unfilled. I would like a \fillin{ . . . } command that ...
16
votes
3answers
2k views

How to make horizontal lists?

This might seem like a very simple question, but what is the easiest way to turn a normal vertical list into a horizontal one?
1
vote
1answer
88 views

Avoid inline equations starting on left the margin

I would like to avoid that ANY inline equation starts on left the margin. The solution I have for that right now is to compile the document, check where this happened and add a ~ in front of the ...
4
votes
1answer
214 views

Making Inline Code Printing Pretty

I have to include small code snippets like method and class names within continuous text. I do not want to display those snippets as complete seperated listings, they should be displayed inline, ...
23
votes
3answers
1k views

maths nested superscripts and subscripts displayed incorrectly inline

I am having a strange bug when using nested superscripts and subscripts in inline math (displaystyle works fine). This behaviour is the same independently of the font used or the compiler (orginally ...
6
votes
3answers
178 views

How to set an Inline figure matching the text height?

I want to put a very small figure inline with text. The figure must have the same height as the line it is positioned in. I have this: Some text... \includegraphics[height=\baselineskip]{picture.png} ...
3
votes
2answers
238 views

How to highlight all inline math in document?

As the title says, I would like to highlight all the content of $...$, \(...\), \begin{math}...\end{math} in my document. My last trial, however not really well asked was: Background color for ...
4
votes
2answers
219 views

Inline underset spilling over to next line

The underset of my "xdim" command is touching characters in the line underneath. How to correct? \documentclass[12pt]{minimal} \usepackage{amsmath} ...
6
votes
2answers
198 views

Object Formatting: Graphics as In-line Symbols

I'm trying to create an in-line symbol that is a specific shape. I'm wondering how I can have something like this in my document:
4
votes
2answers
318 views

Automatically adjusting layout of inparaenum

I am trying to customize an inline list in the following ways: I would like an item that doesn't fit entirely on one line to be moved to the next line. Increase the vertical space between ...
5
votes
1answer
297 views

How can I make \lstinline function normally inside math mode?

\lstinline of the listings package doesn't work in math mode. When I try to use it, I get the error that \ttfamily is invalid in math mode. However, when reasoning about program semantics, it is ...
8
votes
1answer
119 views

Change spacing around binary operators

I'd like to change spacing around binary operators and this issue is discussed there: How to change default for spacing around binary relations? Is there way how to change spacing in math and ...
3
votes
1answer
262 views

Package minted: \mint Command Not Working Inside tabularx Environment

The question, How to embed a minted environment inside a tabular environment?, addresses a similar issue, but I am using: the tabularx package, and the inline \mint command Is there a workaround ...
7
votes
2answers
711 views

How to force normal line spacing when inline math in text

I have trouble in writing my latex document : I have a lot of inline short math formulas in my text, and latex keep growing line spacing because of it. I'd like to force latex to keep a normal line ...
9
votes
2answers
452 views

How do I typeset continued fractions in Pringsheim's concise notation?

I would like to obtain the following formatting so as to write continued fractions in my equations without wasting vertical space. What I need is one command named \cFrac which writes one fraction ...
5
votes
1answer
145 views

Background color for inline math with linebreaks?

What's the simplest way to achieve coloured background for the inline equation in the following example: \documentclass{article} \begin{document} Completely unimportant text $ABC_{1234} = ABC_{1234} ...
2
votes
1answer
85 views

Is it possible to break the following aligned?

I don't want to use the displayed math environment for which \allowdisplaybreak is designed. Shortly speaking, is it possible to break the following alined by defining something like ...
5
votes
0answers
545 views

How to have inline code and line numbering with minted?

I'm using the code found in this answer to allow minted to provide inline code. But, unfortunately, this breaks line numbering, which is not shown anymore. How can I have both inline code and line ...
3
votes
1answer
886 views

LaTeX - Using commands inside inline code

I want to be able to have inline code (printed in typewriter or something) where I can also use LaTeX commands like \myinlinecode{here comes a backslash: <\textbackslash>}. So it should be ...