0

I want to write:

enter image description here

and give error: enter image description here

When I put

\textit${x_{min}}$

It also error

6
  • 1
    Do you want to use it in the text or inside of a mathematical formula? $x_{min}$ should work for the latter – leandriis Jan 13 '20 at 20:07
  • @leandriis, I want to use in text and also make it italic. so I added in \textit{x_{min}} – aan Jan 13 '20 at 20:09
  • 2
    You should rather use $x_{\min}$ instead of what you're currently doing. At best, you're need \textit{x\textsubscript{min}}. – Werner Jan 13 '20 at 20:09
  • 1
    @aan: _ for a subscript only works in math mode. Hence the error message when you use it in text mode. – leandriis Jan 13 '20 at 20:10
  • Related (possible duplicate?): Superscript outside math mode – leandriis Jan 13 '20 at 20:12
3

\textit(x_{min}} is an error as the content of \textit is text mode so can not have _

\textit$x_{min}$ is \textit{$}x_{min}$ with a lone $ as argument to \textit

the usual markup would be $x_{\min}$ or if you really do want min in italics $x_{\mathit{min}}$

If it is not mathematics then \textit{x\textsubscript{min}} is another possibility.

6
  • You probably mean \textit{x\textsubscript{min}} :-) – Zarko Jan 13 '20 at 20:27
  • @Zarko up, down, what's the difference:-) – David Carlisle Jan 13 '20 at 20:39
  • position of min :-) :-), however in principle there is no difference, so you are right :-) – Zarko Jan 13 '20 at 20:52
  • Maybe a less elegant suggestion but what if you put \ in front of _ given that you want to have it in text? – Dario Jan 13 '20 at 22:47
  • @Dario I'm assuming the questioner wants x with a subscript "min" not just text with a literal underscore x_min ??? – David Carlisle Jan 13 '20 at 22:55

Not the answer you're looking for? Browse other questions tagged or ask your own question.