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?
1 Answer
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.
-
Thank you. Looks exactly what I want. And I don't care about the reader ;). Mar 18, 2018 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? Mar 20, 2018 at 5: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. Mar 21, 2018 at 5:51
WWW
vs.iiiii
.) Are you willing to accept huge differences in intraword tracking (i.e., the whitespace inserted between letters within a word)?