I'm trying to write a list of word. More precisely a table of 6x50 words. The words are different are are compose by 3 to 6 letters. Thus teire are differente length. But I need to equalize length of words without changing the font size. The solution is to adjust the inter-letter space but I can't do it. Can you please help me?
Asked
Active
Viewed 278 times
1 Answers
1
It is possible, but I don't think your readers will be happy:
\documentclass{article}
\usepackage{collcell,xparse,calc}
\ExplSyntaxOn
\NewDocumentCommand{\equalize}{m}
{
\makebox[\widthof{mmmmmm}][s]
{
\equalize_word:n { #1 }
}
}
\cs_new_protected:Nn \equalize_word:n
{
\seq_set_split:Nnn \l_tmpa_seq {} { #1 }
\seq_use:Nn \l_tmpa_seq { \hfil }
}
\ExplSyntaxOff
\begin{document}
\begin{tabular}{|*{3}{>{\collectcell\equalize}c<{\endcollectcell}|}}
\hline
abc & defghi & uvwx \\
\hline
xyz & mmmmmm & vwxyz \\
\hline
\end{tabular}
\end{document}
I usually don't approve jailed tables, in this case I just wanted to clearly show the cells.
egreg
- 1,121,712
-
Thank you. Looks exactly what I want. And I don't care about the reader ;). – user158498 Mar 18 '18 at 17:29
-
Thanks again egreg,
I've try your code which works perfectly. But I don't really understand it and so it is difficult for me to change it. Do you think it's possible to equalize line by line instead of considering the same width for all the table?
– user158498 Mar 20 '18 at 05:14 -
-
by row. I mean same length for "abc", "defghi" and "uvwx" and same length (maybe different) for "xyz" "mmmmmmm" and "vwxyz". I know it's strange but it is for a research purpose. – user158498 Mar 21 '18 at 05:51

WWWvs.iiiii.) Are you willing to accept huge differences in intraword tracking (i.e., the whitespace inserted between letters within a word)? – Mico Mar 18 '18 at 13:41