Questions tagged [inline]
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 inline form.
318
questions
0
votes
1
answer
26
views
Even horizontal spacing in enumitem inline lists
I would like to have an equally (horizontally-)spaced inline list, like
(1) 0.4 (some spaces) (2) 12.372 (some spaces),
so that each [item and its spaces] will take account of the same ...
1
vote
0
answers
33
views
Non-breakable space before every inline math
What I don´t want: When I write a sentence like One is $1$., I don't want Latex to break the line before the inline math (that particular example is horrible cause the new line would start with 1., ...
0
votes
0
answers
37
views
structured inline enumerate problem latex
I am writing a book with a lot of tests with multiple choices. And I use inline enumerate. But it looks random and weird. I want it to look correct like in the first problem. If the answers are moved ...
3
votes
3
answers
206
views
How to measure height of inline equations
How to measure the height of the below inline equation?
Here the equation contains the fraction so its height should be beyond the normal text height so I want to measure the exact height of the ...
1
vote
1
answer
42
views
How to force inline math that would overflow, to break linebreak BEFORE the equation
I regularily encounter a situation where I have some piece of inline math that will overflow into the magin whenever it ends up on the right side of the page. Something like this:
or
I would like ...
0
votes
1
answer
32
views
Adjust horizontal space for 'inline' description*
I wanted to add an inline description as shown in the MWE. I noticed a bigger horizontal space between the optional argument and argument of \item. I've tried quite a view things like labelsep etc., ...
1
vote
1
answer
76
views
Line spacing between lines containing inline math
Honestly I give up on this. I searched for a solution to this for so long, but nothing seemed to work (well) for me.
I just want my equations to no longer look squashed together, referring to how ...
1
vote
0
answers
81
views
Bracket with multiple lines [closed]
The errors of my codes with feedback: Missing $ inserted
\documentclass{article}
\usepackage{amsmath}
\begin{document}
$[x_0: x_1: x_2]\mapsto$
\begin{cases}
$[x_0: x_1]$ & \text{ ...
2
votes
1
answer
122
views
How to align multiline math equations in ConTeXt when they are inline?
Since \eqalign no longer works in ConTeXt, I'm trying to replace it with \startalign/\stopalign as described here. It works just fine in display mode, but it doesn't seem to be designed to work in ...
2
votes
1
answer
197
views
How to frame inline text with a box?
I am trying to frame a text inline like this:
The text above is from the book Differential Geometry of Curves and Surfaces from Kristopher Tapp.
As requested by some users, some code to edit:
\...
0
votes
2
answers
58
views
baselinestretch not functioning with \tikz inline (and generally \tikz inline not taking line spacing)
When using \tikz inline, mwe below say:
\documentclass{article}
\renewcommand{\baselinestretch}{1.2}
\usepackage{tikz}
\begin{document}
He moonlight difficult engrossed an it sportsmen. Interested ...
0
votes
2
answers
75
views
Create a command for inline math, and apply color to math output
I would like to setup a command for adding inline math in text paragraphs. In that command, I want to change some style properties, like change the color of the equation. Fox example:
The value of $x =...
0
votes
0
answers
35
views
Setting `\lineskiplimit=-\maxdimen` for a single paragraph then resetting to default without breaking lines
I am trying to use \lineskiplimit=-\maxdimen for the same reasons as questions 522530 and 49072 namely I have uneven spacing between lines when including mathematical notation (specifically subscripts/...
0
votes
0
answers
48
views
Set tabular figures for inline math
I have a command to set tabular figures for the equation environment. I want the same tabular figures for inline math, preferably allowing me to keep using $$.
\documentclass{report}
\usepackage{...
1
vote
1
answer
324
views
Why the display style is not working [closed]
I have the following formula that is in display mode
\begin{equation*}
x_k = \sum\limits_{i=1}^{N_1} \sum_{j=1}^{N_2} T_{i,j,k} u_i v_j, \quad k=1,\dots,N_3.
\end{equation*}
But it is displayed in ...
15
votes
5
answers
1k
views
Inline math messes up vertical spacing
Often when I use math inside a paragraph, the spacing becomes ajar. This particularly happens when I use exponents or "choose" notation (for combinations).
Minimal working example below. The ...
3
votes
1
answer
122
views
Reference request: line breaks in inline math
I find the automatic line breaking in inline math slightly obscure. Is there a comprehensive summary of where and where not automatic line breaks may occur, what are the penalties, etc.? I suppose ...
1
vote
2
answers
57
views
Align inline maths and text
I would like to align my inline equations on the right of the text
\documentclass[12pt, A4]{article}
\begin{document}
Text: $a+b=c$
Longer Text: $x+y=z$
\end{document}
Which environment can I ...
0
votes
2
answers
57
views
Failure to create "Figure" from an Image, inserted two-column inline
I am attempting to use "in-line" images as LaTeX figures (so that they can be numbered and appear in the Table of Figures), in a two-column document created with the package << ...
1
vote
1
answer
141
views
Use `\(...\)` in `algpseudocode`
Is there a way to use the newer \(...\) math syntax in arguments for any commands from algpseudocode (algorithmicx)? The documentation and virtually any other tutorial uses the TeX-primitive $...$.
...
2
votes
1
answer
46
views
Draw connected boxes with common height around letters/words in text
(There are a few related questions, e.g. this and this.)
I want to accomplish the following:
enclose some words of the text into boxes,
with all those words vertically aligned as they were truly just ...
0
votes
1
answer
172
views
Automatically bold math symbols when \bfseries or \textbf is used
There are a lot of questions asking how to get math symbols to appear in bold, which I know that you can do with \mathbf and amsmath's \boldsymbol.
But is there a way to automatically bold my inline ...
2
votes
2
answers
113
views
Inline math in the table of contents
I use displaystyle for math expressions in all my documents but I want just the inline style just in the table of contents. Is this possible?
\documentclass{article}
\usepackage{amsmath}
\everymath{\...
0
votes
0
answers
55
views
Math in text when using definitions based on intervals and limits
Should intervals/limits that are part of a definition in a text section be written using inline math mode? And in that case, how should it be written, and should the marker (BMI) and unit (kg/m^2) be ...
1
vote
2
answers
202
views
Writing "lim" on latex [duplicate]
I am trying an inline math expression on latex
the graph is almost surely connected ($\lim_{n \to \infty} \mathrm{P}(G(n,p) \text{is connected}) \to 1 $
and it outputs the subscript term next to &...
2
votes
2
answers
226
views
Getting math expression on same line as text
I am trying to write a line on latex with a binomial distribution
...is equally likely to be one of the $\begin{pmatrix}\begin{pmatrix}
n \\ 2 \end{pmatrix}\\ m\end{pmatrix}$ graphs with $m$ edges, ...
1
vote
0
answers
73
views
What is the recommended way to write mathematical notations in inline text?
I want to write a math notation in inline text, example notations: $d$, $i$, $i'$, $i.low$, $i'.high$, $i'high \leq i.low$, example in sentences: `
\documentclass[10pt,journal,compsoc]{IEEEtran}
\...
0
votes
1
answer
248
views
\setminted and \setmintedinline commands interfere with each other?
I'm trying to use the package minted to generate documents which contain language-agnostic inline code and language-aware block code (listing). Here's a minimal working example:
\documentclass[a4paper,...
0
votes
0
answers
431
views
How to not wrap equations?
While writing a paragraph of proof containing some (inline) short equations, some of them often wrap: half of the equation stays on the line 1 and the second part of the equation comes to line 2.
Is ...
4
votes
2
answers
182
views
`\left` `\right` not working properly with `\mathchoice`
I try to define \norm which gives \left\|#1\right\| in display math, while \|#1\| in inline math. I then use \mathchoice to implement this, but the final command doesn't work properly: the position of ...
2
votes
1
answer
61
views
How to skip the item body in an inline description* list?
I am having a simple doc:
\documentclass[a4paper,12pt]{article}
\usepackage{enumitem}
\newlist{inlinedesc}{description*}{1}
\setlist[inlinedesc]{itemjoin={{ $\odot$ }}, itemjoin*={{ and }}}
\...
2
votes
0
answers
58
views
How to make inline description* list left-aligned and hyphenated?
I am having a simple doc:
\documentclass[a4paper,12pt]{article}
\usepackage{enumitem}
\newlist{inlinedesc}{description*}{1}
\setlist[inlinedesc]{itemjoin={{ $\odot$ }}, itemjoin*={{ and }}}
\...
1
vote
1
answer
278
views
How to allow break in inline equation with `\left` and `\right` in LaTeX?
I use \left and \right in an inline equation in LaTeX. However, I see the inline equation can't be broken.
My code:
\documentclass{article}
\usepackage{mhchem}
\usepackage{amsmath}
\usepackage{lipsum}
...
2
votes
2
answers
436
views
Is there a way to automatically smash all inline maths (but only vertically)?
What it says on the tin.
In case it isn't clear enough, what I would like is for $...$ to be typeset as \smash{$...$}, except \smash also affects horizontal spacing (see the question I linked to below)...
1
vote
1
answer
129
views
Is it possible to write organic chemical substance in inline math mode?
Is it possible to write organic chemical substance in inline math mode?
For example:
0
votes
2
answers
66
views
emulating line space of displayed multiline math in non-math mode
I want to use displayed style for inline math, i.e. \everymath{\displaystyle}, but the line space is too tight when, for example, fractions appear in consecutive lines.
I want to change this via \...
1
vote
1
answer
215
views
Error "Package pgf Error: No shape named `abstractse' is known." in baposter
I'm trying to construct a poster using a baposter template, it was working fine until I added some inline maths equations and labels, then I started getting this error in addition to: "! Argument ...
2
votes
1
answer
304
views
How do I write "text as fractions" without moving to the next line in the O/P?
I used this command to get (a+b+c)/2
x=\[\frac{\textrm{a+b+c}}{2}\]
However, the output has shifted it to the next line, as shown
Is there a way I can have this in-line with the text?
1
vote
3
answers
156
views
Line not breaking when combining inline math and \texttt
Sadly, I am not able to recreate a MWE since I'm working on a fairly complex template. I cannot understand how LaTeX decides to break lines, I googled but I couldn't find a clear cut answer. This is ...
0
votes
1
answer
186
views
Help required regarding using inline R commands in overleaf
I am using overleaf to compile my R codes into a pdf file. For a chunk of code, we use for example:
<<>>=
mean(reading)
max(reading)
min(reading)
@
But now I want to use these commands ...
0
votes
0
answers
63
views
Increase line spacing around inline maths (opposite of smash/strut) / Add padding around inline maths
Very simply, inline maths (particularly display style) doesn't offer much padding between lines. I know that there has been a lot of commentary on using commands such as \smash and \strut to do the ...
2
votes
1
answer
74
views
tex4ht and tex4ebook: problems when tikzcd is put in the inline math
MWE:
\documentclass[oneside]{amsart}
\usepackage{amsmath,amssymb,amsfonts, accents}
% Include the following code before \usepackage{tikz}
\ifdefined\HCode
\def\pgfsysdriver{pgfsys-dvisvgm4ht.def}
\...
0
votes
0
answers
41
views
How to display inline math display-style document-wide [duplicate]
I have a document where I want to display both inline and display math in the larger display-style. I know that for inline math I can add \displaystyle between the dollar signs, but I want to do this ...
0
votes
0
answers
24
views
hyphenating inline verbatim text at underscore [duplicate]
I can hyphenate inline verbatim text at a ':'; however, I want to hyphenate inline verbatim text at an underscore '_', but I can not find a solution. The MWE is as follows.
\documentclass{article}
\...
8
votes
4
answers
530
views
Rounded corners, dotted lines and shadow inline but without TikZ
I'm trying to draw rounded rectangles with solid or dotted lines and a shadow around arbitrary text in LaTeX. I was hopeful that my answer was in How to draw rounded corners around box with shadow, ...
1
vote
1
answer
368
views
Put \lstinline inside \chapter, \section, etc. commands
How can I place \lstinline code inside commands like \chapter, \section, \subsection, etc.?
Or it's a bad or tasteless practice?
2
votes
0
answers
248
views
Put \lstinline inside \item[] description and automatically add \item[] content to a glossary
I've implemented this solution to allow placing \lstinline code inside description \item command.
I also want to automatically add the entire \item content as a glossary entry by placing it into name ...
0
votes
0
answers
84
views
Exclude inline math from \DeclareMathSizes
I am using \DeclareMathsizes to display equations with a larger font than the rest of the text. But this is also applicable to inline math. Is there a way to exclude inline math from this command?
\...
3
votes
2
answers
258
views
Is there a way to define color directly without using named colors
I am trying to use a background color on longtblr of tabularray package within \SetCell command and it seems I only can used named colors. E.g. the ones defined before with \definecolor. I am buidling ...
0
votes
1
answer
554
views
How to fix overfull in inline math?
How do I fix this overfull warning that is caused by the inline math equation? When I used \sloppy on the paragraph related, underfull warning appeared instead. I've included a MWE below. If it helps, ...