
Eu gostaria de usar \hfill
em um ambiente de tabulação, mas parece não surtir efeito. Como eu posso fazer isso?
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 algum motivo, não consigo fazer upload de uma captura de tela, pois recebo uma mensagem de erro "Falha ao fazer upload da imagem; ocorreu um erro no servidor")
Responder1
Sugiro usar algum tipo de ambiente tabular. Aqui um exemplo com o tabularray
pacote:
\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}
Responder2
Você pode medir o texto por \tabset
macro e usar o texto para medir a largura em \tabuse
. Você não precisa tabular o ambiente.
\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