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.
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- 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$