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

6
votes
3answers
127 views

Display math gets typeset as inline math

When typesetting the below annotated equation my summations are being typeset as inline maths rather than display maths. If I wrap the sum and subscript with \smashoperator{} then they are typeset ...
3
votes
1answer
28 views

Combining different list types to work in one document

I would like to use \usepackage{enumerate} to write lists using both 1., 2., 3., and A., B., C. However, in some of my lists, I would like to save space in my paper and write, say, the first 3 items ...
1
vote
1answer
59 views

Horizontal line in the middle (text alignment)

MWE: \documentclass{article} \usepackage{amsmath,amsfonts,amssymb,amsthm} \begin{document} \begin{gather*} y=3x-6 --- {1}\\ y=-x+5 --- {2}\\ \end{gather*} \end{document} Picture: How do I join ...
3
votes
1answer
78 views

writing an enumerated list within a sentence

Can you please help me write an enumerated list which is in the same line and there is no line change between that and the rest of the text. E.g., We use three broad geographical regions, i.e., ...
5
votes
2answers
62 views

Breaking inline math within longtable or tabular

So, I've got the following code: \documentclass{memoir} \usepackage{longtable} \begin{document} \begin{longtable}{p{0.4in}cp{2.75in}p{1.8in}} Symbol & Unit & Describes & Equivalent ...
5
votes
1answer
106 views

Calculations in PGFplots \addplot3 inline table

Plotting a rectangular patch with the code \documentclass{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis} \addplot3[patch,patch ...
3
votes
1answer
52 views

How to prevent inline math from entering the margins on the right?

I'm writing a document (double columned, if it matters), and it seems that while normal text wraps just fine to fit the structure, when I use inline math, it tends to violate the page margins. For ...
6
votes
1answer
107 views

Can I have a pipe character inside the argument of \lstinline?

I'm using the Listings package and I wanted to ask whether it is possible to use the pipe character | with the \lstinline command as it uses the pipe as beginning and ending character. ...
8
votes
1answer
121 views

Using a backslash and the following by it non-ASCII char

I'm writing a text with a special char of backslash (\), the text requires to containt the char and the following non-ASCII symbol (cyrillic), so for example I type: text \ц other text and I have ...
4
votes
1answer
55 views

Using hyperref's autoref function with todonotes messes up reference names

I used \autoref throughout my thesis and when doing corrections and needing to keep track of them using the todonotes package, I noticed that the \autoref function generates wrong labels. To show ...
1
vote
0answers
96 views

Extra space in \lstinline

When using the \lstinline macro from listings, like \lstinline|subl| some extra whitespace is added to the intended text. It is especially painful at the end of the line: it behaves as if it were ...
4
votes
1answer
58 views

Shorthand for \lstinline{ … }?

I'm finding that I need to use \lstinline{...} a lot. I rather like the way that SX does inline code. Just enclose in back-ticks. Is this functionality available in LaTeX, or is it possible for ...
0
votes
0answers
37 views

Issue with multiple in-line references by some author using bibtex + natbib + apacite

When I have multiple papers to refer to in the same breath by the same author, the second reference year always prints as 0 and with no space after the comma, even though the full reference is indeed ...
3
votes
3answers
69 views

Optimizing this cases-command for inline expresions

I'd like to optimize the following command \documentclass{standalone} \usepackage{amsmath} \newcommand{\casos}[2]{\left.\begin{cases} #1 \\ #2 ...
2
votes
2answers
381 views

Latex todonotes package set default to inline

Is it possible to set the default style of todo notes by the latex todonotes package to inline to avoid mentioning inline everytime? I imported the package into my latex document like this: ...
3
votes
1answer
49 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
49 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 $ ?
7
votes
1answer
562 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 ...
0
votes
0answers
19 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
155 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?
0
votes
2answers
81 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 ...
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
1answer
437 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!
3
votes
1answer
210 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 ...
2
votes
2answers
170 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 ...
9
votes
2answers
404 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
33 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 ...
3
votes
1answer
1k 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, ...
0
votes
0answers
17 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
174 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
263 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 ...
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 ...
1
vote
1answer
105 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)$ ...
14
votes
5answers
797 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
138 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
92 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
145 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
414 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
104 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
354 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 ...
21
votes
3answers
4k 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
92 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
327 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, ...
2
votes
1answer
113 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 ...
6
votes
3answers
277 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} ...
2
votes
1answer
147 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
2answers
470 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 ...
5
votes
2answers
314 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
285 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:
6
votes
1answer
473 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 ...