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

2
votes
1answer
41 views

Inline python code in latex

I am trying to add some inline python code into my report with color in an box like following: As you can see "matrix text is red coloured embedded in a box" I can add inline colour code using the ...
3
votes
1answer
55 views

Use \int\limits by default, except for inline math

How can you instruct latex to use \int\limits as default for \int except when it's in inline math mode? Example: In display math: \int is replaced by \int\limits In inline math: \int should stay ...
2
votes
2answers
82 views

insert code keywords inline

What is the command to insert inline code words into the text like this? I know there are packages for inserting snippets into the code, but I only words within the main text. I was wondering if ...
1
vote
1answer
41 views

Avoid splitting of math expressions in text [duplicate]

I am writing a math expression, $P = \omega \tau$, in the middle of my text, and LaTeX splits it such that "P =" is on one line and "\omega \tau" is on the next line. I would like the whole expression ...
1
vote
1answer
66 views

how to make the in-line math equation as shown in the figure beautifully arranged in text?

When discussing and explaining some math equations, I sometimes prefer to use in-line equations (created by use $ ... $ in the text) in the text environment, as shown ONLY in the last two lines. ...
4
votes
1answer
40 views

Nested enumerate and inlineitem leads to inconsistent label spacing

I've typed an exam up, and my nested enumerates seem to cause a problem with the separation between my label and the actual line item. This happens specifically when using the inlineitem command, ...
2
votes
1answer
24 views

Cross reference of an inline equation

Consider the equation \begin{align*} \dot{x}_i(t)=f_i\left(x_1(t),\ldots,x_N(t)\right) \\ + g_i(x_1(t),\ldots&,x_N(t))u_i(t),\tag{$\Sigma_i(u_i)$}\label{eq:subsystem} \end{align*} ...
0
votes
1answer
32 views

Error using inline preview in texstudio

I use texstudio as my editor and on one of my computers (the other one works fine) I get the following error message when doing inline preview (by highlighting text, right clicking and pressing ...
1
vote
0answers
37 views

Inline math in tables not working? [closed]

The inline math in the cells of the table does not work? Does anyone know why this could be the case? \begin{table}[h!] \centering \begin{tabular}{|c|c|} \hline \textbf{Income y (£)} & ...
1
vote
1answer
70 views

Changing inline math symbols throughout a whole document

I have a document at hand that was written by using an old template and now I want to copy it to a new one. However, when I do this and execute the code I am facing the error Missing $ inserted. ...
1
vote
1answer
45 views

how to write centered plus minus 1 in inline math mode in latex

I want to write y belongs to plus minus 1 but i do not know how to write it. My code is as below: \begin{document} $y\in$ +- 1 \end{document but it is not giving centered plus minus 1.
5
votes
2answers
97 views

Typesetting inline row vector

I have (another) question on typesetting inline row vectors. I'm using amsmath and mathtools. I'm aware of the smallmatrix environment. Unfortunately, the elements of the vector get scaled. This ...
2
votes
2answers
80 views

How can I suppress the line break before the first item of a list?

Using enumitem, I can typeset inline lists with the following \documentclass{article} \usepackage[inline]{enumitem} \begin{document} % Text before list. \begin{enumerate*} \item My first item. ...
0
votes
1answer
43 views

Font size of inline code-listings too small

I'm using the listings package and am satisfied with how my code listings look. The font in my inline-listings however is too small compared to the rest of the text. How can I only increase the font ...
1
vote
2answers
57 views

Handwrite letter V in Inline Math Mode [duplicate]

What package and command do I have to insert to write letter V in a handwriting style using Inline Math Mode? Below is the result I want to obtain:
2
votes
1answer
64 views

Latex typesetting, continue writing text not in new line [duplicate]

I have a very simple question that how to write SCR_life within text. Not write in the new line. I tried \[SCR_{life} \].
6
votes
1answer
95 views

Can I mark when there is a line break in inline math?

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 ...
0
votes
0answers
28 views

Overfull hbox in lstinline

I have defined new command like this: def\inline#1{\lstinline[breaklines=true, basicstyle=\ttfamily]{#1}} Now I can say something like this in my document: \inline{my_file.cpp} But here is the ...
4
votes
1answer
90 views

remove first label in inline enumitem

I'm using an inline enumitem with bullets, but I would like there to be no bullet before the first item. After reading the manual, I tried the following, but it still leaves an unwanted space before ...
3
votes
2answers
207 views

Printing out a colored play icon inline with text

Problem: I have been trying to figure out how to replicate a button without success. I want to achieve to replicate the following button in LaTex. Control buttons don't seem to be available in the ...
7
votes
3answers
195 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
56 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
291 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
239 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
85 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
188 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
95 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
178 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
141 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 ...
5
votes
1answer
95 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
164 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
73 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
85 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
83 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 ...
5
votes
2answers
2k 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
71 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
56 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 $ ?
12
votes
1answer
2k 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
234 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
90 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 ...
40
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
539 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
307 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
275 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 ...
10
votes
2answers
567 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
35 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 ...
5
votes
1answer
3k 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
219 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 ...