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

0
votes
1answer
16 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
40 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
42 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
81 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
18 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
45 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
117 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 ...
6
votes
3answers
145 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
37 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
111 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
114 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
64 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
140 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
62 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
125 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
131 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
73 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
107 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
61 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
54 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
76 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 ...
3
votes
2answers
586 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
52 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
53 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 $ ?
9
votes
1answer
802 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
161 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
85 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
470 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
230 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
194 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
455 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
34 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
2k 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
182 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
310 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
107 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
828 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
151 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
94 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
152 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
458 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
117 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
368 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 ...
23
votes
3answers
5k 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
93 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
346 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, ...