General ⇒ How to write \phantom text backwards?
How to write \phantom text backwards?
$k+1,k+2,k+3,\dots,\overline{2k,\phantom{1}}\hspace{-2.8mm}\underbrace{1,2,3,\dots,k,}2k+1$
I would like to do this in a more elegant way than to use \hspace with negative value.
Of course, any other solutions which show how to combine \overline and \underbrace are welcomed, but I would also like to know whether there is "backwards phantom" for other purposes.
Thank you in advance.
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
How to write \phantom text backwards?
Code: Select all
$k+1,k+2,k+3,\dots,\overline{2k,\phantom{1}}\!\!\!\!\underbrace{1,2,3,\dots,k,}2k+1$
Best regards
Thorsten¹
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
How to write \phantom text backwards?
Code: Select all
\documentclass{article}
\usepackage{amsmath}
\begin{document}
$k+1,k+2,k+3,\dots,\overline{2k,\phantom{1}}\hspace{-2.8mm}\underbrace{1,2,3,\dots,k,}2k+1$
$k+1,k+2,k+3,\dots,\overline{2k,\phantom{1}}\!\!\!\!\underbrace{1,2,3,\dots,k,}2k+1$
$k+1,k+2,k+3,\dots,\overline{2k,\phantom{1}}\negthickspace\negthickspace\underbrace{1,2,3,\dots,k},2k+1$
\end{document}
as far as I know there are these commands for negative space:
\negthinspace (short version \!) = 3mu
\negmedspace = 4mu plus 2mu minus 4mu
\negthickspace = 5mu plus 5 mu
How to write \phantom text backwards?
Code: Select all
$k+1,k+2,k+3,\dots,\makebox[0pt][l]{$\overline{\phantom{2k,1}}$}2k,\underbrace{1,2,3,\dots,k,}2k+1$