
Me gustaría usarlo \hfill
en un entorno de pestañas, pero parece no tener ningún efecto. ¿Cómo puedo hacerlo?
MWE:
\documentclass{article}
\setlength{\parindent}{0pt}
\begin{document}
\begin{tabbing}
Foo bar baz: \= Lib \hfill Bizim\\
Foo: \> Kip\\
\end{tabbing}
Foo bar baz: Lib \hfill Bizim
Foo: Kip
\end{document}
(Por alguna razón no puedo cargar una captura de pantalla, ya que aparece el mensaje de error "Error al cargar la imagen; ocurrió un error en el servidor")
Respuesta1
Sugiero utilizar un entorno tabular de algún tipo. Aquí un ejemplo con el tabularray
paquete:
\documentclass{article}
\setlength{\parindent}{0pt}
\usepackage[showframe]{geometry} % just to show that the text is aligned with the margin
\usepackage{tabularray}
\begin{document}
\begin{tblr}{@{}lX@{}}
Foo bar baz: & Lib \hfill Bizim\\
Foo: & Kip\\
\end{tblr}
\end{document}
Respuesta2
Puede medir el texto por \tabset
macro y utilizar el texto para medir el ancho por \tabuse
. No es necesario tabular el entorno.
\newdimen\tabw
\def\tabset#1{\par \setbox0=\hbox{#1}\tabw=\wd0 \leavevmode\box0 }
\def\tabuse#1{\par \leavevmode\hbox to\tabw{#1\hss}}
\tabset {Foo bar baz:} \ Lib \hfill Bizim
\tabuse {Foo:} \ Kip