Felix schrieb am 01.09.2024 um 20:54:
https://pastebin.com/TQdzmxeP
I am trying to make a resume in ConTeXt (to see how well my skills have gotten,
I am still quite a beginner) and Iw as able to produce what is in Pastebin.
Your next lesson is to learn how to create a minimal example which
contains only the necessary information needed to show the problem.
Though, I am having trouble with the table that goes over the big sized text
that would be my name. It has an email, a phone number, and an address but
they are all.... aligned very weirdly. I want them to be centered. Though, the
phone number has some sort of problem with alignment, and I don;t know fi the
other ones are causing it or are also aligned wrong.
I also wanted to make this code:
\startxcell[topframe=on,bottomframe=on,align=flushright]
Ability to communicate strongly and effectively, being a reliable team
member, supporting a team whenever needed, and the desire to help everyone
\stopxcell
has it so that it doesn't take up so much horizontal space (Ideally it is
taking up 1/3 of the width I am allowing for since there are three rows in
total) , but when I add width={some value} into the square brackets, it will
add a blank line after all the text, and this is not what I want.
is there a way to fix what I am experiencing? I would also not mind if I could
be told how to improve my code, whether it be by adding startxrowgroup,
startxcellgroup, or head and footer sections., or other options. Thank you for
reading.
Your problem the usage of "option=stretch" to add filler space in the
table cells.
To calculate the space which is added in each cell context takes the
widest text in each column
to calculate the current width of the table and when table is narrower
then the page it distributes
the reaming spaces equally to all rows. This results in a different
width for each row but another
problem in your case is that context takes the long text in the first
row (even though it spans
three column) as value to compute the reaming space in the table.
The fix for your case is to set a fixed width for all three column which
ensures the text
in the second column is centered. You can also simplify your setup by
moving all settings
at the start of the table and the only local change is needed for the
merged cells.
%%%% begin example
\starttext
% width=.33tw
\startxtable[frame=off,topframe=on,bottomframe=on,width=.33tw,align=middle]
\startxrow
\startxcell[nx=3]
contact information
\stopxcell
\stopxrow
\startxrow
\startxcell
email
\stopxcell
\startxcell
phone
\stopxcell
\startxcell
address
\stopxcell
\stopxrow
\stopxtable
% option=stretch
\startxtable[frame=off,topframe=on,bottomframe=on,option=stretch,align=middle]
\startxrow
\startxcell[nx=3]
contact information
\stopxcell
\stopxrow
\startxrow
\startxcell
email
\stopxcell
\startxcell
phone
\stopxcell
\startxcell
address
\stopxcell
\stopxrow
\stopxtable
\stoptext
%%%% end example
Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl /
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________