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

3
votes
1answer
30 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
36 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
155 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
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
61 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
60 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
285 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
78 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
101 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
208 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
23 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
350 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
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
123 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
116 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
95 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)$ ...
13
votes
5answers
671 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
96 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
73 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
99 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.
6
votes
1answer
120 views

Use dimensions \totalheight \depth for inline TikZ drawing

I want to use the current text's dimensional properties for constructing an inline TikZ image, such as an icon. The properties I have in mind for use are \height \depth \totalheight as described ...
7
votes
1answer
243 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
84 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
256 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
87 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
203 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
87 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
165 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
121 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
223 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
199 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
190 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:
5
votes
1answer
275 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 ...
4
votes
2answers
295 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 ...
8
votes
1answer
116 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
256 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
664 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 ...
5
votes
1answer
144 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
84 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
531 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
840 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 ...
1
vote
1answer
155 views

LyX: Vertical spacing only some lines in a paragraph/ only the inline formulas

I have the following problem in LyX: I get many paragraphs with awfully long in-line formulas, which by multi-lining come to be vertically adjacent. The aesthetic effect is quite awful, so I would ...
7
votes
1answer
144 views

Grouping items onto the same line to avoid wrapping

I am authoring a poker-related document and am using the following commands to allow me to display cards: % Suit image adjustments: \newcommand{\suit}[1]{\includegraphics[width=8pt, height=8pt]{#1}} ...
6
votes
2answers
227 views

Inline math spacing and varying interword spacing

Say I want to reduce the space between two letters in math mode by 2/18 quad. Going all Die Hard 3, I put together 2 -3/18 quad \! and add 4/18 quad with \:. The problem is, though, that apparently ...
2
votes
1answer
128 views

Inline math: Line breaking and stretching only in specified places

Is it possible to have document-wide solution for all inline formulas was breakable and stretchable only in pointed positions? Like $longformula1 \/ longformula2 \/ longformula3$ was able to break ...
1
vote
1answer
84 views

Create commands each of the text aligned horizontally?

I am using exam document class as my guide in creating my own documentclass but i have encountered a problem.How will i create a command for each of the four texts in a line. here is a sample image: ...
4
votes
1answer
197 views

Inlining aligned tabular material in block of text

Edit. Some comments might be outdated. I would like to do the following: The blue parts should be treated as normal paragraph text, with normal automatic hyphenation. The green part is what you ...