Using the width of the page with start/stop tabulate
I am using the following code: \starttabulate[|l|l|] \HL \NC {\bf Primair} \NC {\bf Secundair} \NC\NR \HL \NC C en C++ \NC Java \NC\NR \NC Python \NC Perl \NC\NR \NC shell-script \NC Lisp \NC\NR \NC SQL \NC HTML-4 en JavaScript \NC\NR \NC \NC PHP \NC\NR \NC \NC Pascal \NC\NR \HL \stoptabulate But this uses only the necessary space. I would like to have the table using the width of the page and both columns having the same size. Is this possible? -- Cecil Westerhof
2011/8/3 Cecil Westerhof
I am using the following code: \starttabulate[|l|l|] \HL \NC {\bf Primair} \NC {\bf Secundair} \NC\NR \HL \NC C en C++ \NC Java \NC\NR \NC Python \NC Perl \NC\NR \NC shell-script \NC Lisp \NC\NR \NC SQL \NC HTML-4 en JavaScript \NC\NR \NC \NC PHP \NC\NR \NC \NC Pascal \NC\NR \HL \stoptabulate
But this uses only the necessary space. I would like to have the table using the width of the page and both columns having the same size. Is this possible?
I found it. I should start the table with: \starttabulate[|lw(.5\textwidth)|lw(.5\textwidth)|] -- Cecil Westerhof
Am 03.08.2011 um 10:51 schrieb Cecil Westerhof:
2011/8/3 Cecil Westerhof
I am using the following code: \starttabulate[|l|l|] \HL \NC {\bf Primair} \NC {\bf Secundair} \NC\NR \HL \NC C en C++ \NC Java \NC\NR \NC Python \NC Perl \NC\NR \NC shell-script \NC Lisp \NC\NR \NC SQL \NC HTML-4 en JavaScript \NC\NR \NC \NC PHP \NC\NR \NC \NC Pascal \NC\NR \HL \stoptabulate But this uses only the necessary space. I would like to have the table using the width of the page and both columns having the same size. Is this possible?
I found it. I should start the table with: \starttabulate[|lw(.5\textwidth)|lw(.5\textwidth)|]
\starttabulate[|p|p|] Wolfgang
2011/8/3 Wolfgang Schuster
I am using the following code:
\starttabulate[|l|l|]
\HL \NC {\bf Primair} \NC {\bf Secundair} \NC\NR \HL \NC C en C++ \NC Java \NC\NR \NC Python \NC Perl \NC\NR \NC shell-script \NC Lisp \NC\NR \NC SQL \NC HTML-4 en JavaScript \NC\NR \NC \NC PHP \NC\NR \NC \NC Pascal \NC\NR \HL \stoptabulate
But this uses only the necessary space. I would like to have the table using the width of the page and both columns having the same size. Is this possible?
I found it. I should start the table with: \starttabulate[|lw(.5\textwidth)|lw(.5\textwidth)|]
\starttabulate[|p|p|]
That is in this case a better solution. For one in my solution the table became to wide. (Do not know why.) -- Cecil Westerhof
Am 03.08.2011 um 18:47 schrieb Cecil Westerhof:
That is in this case a better solution. For one in my solution the table became to wide. (Do not know why.)
The combined width of the columns in your table had been \textwidth but there is also a space between the columns which makes the table wider than the normal text. Wolfgang
2011/8/3 Wolfgang Schuster
That is in this case a better solution. For one in my solution the table became to wide. (Do not know why.)
The combined width of the columns in your table had been \textwidth but there is also a space between the columns which makes the table wider than the normal text.
Is it know how much spave this is? For another table I now use: \starttable[|w(.10\textwidth)|p(.82\textwidth)|] This looks about right, but if there is a better way to do it … -- Cecil Westerhof
Am 03.08.2011 um 19:18 schrieb Cecil Westerhof:
2011/8/3 Wolfgang Schuster
That is in this case a better solution. For one in my solution the table became to wide. (Do not know why.)
The combined width of the columns in your table had been \textwidth but there is also a space between the columns which makes the table wider than the normal text.
Is it know how much spave this is? For another table I now use: \starttable[|w(.10\textwidth)|p(.82\textwidth)|]
This looks about right, but if there is a better way to do it …
Set only a width for the first column, the width of the “p” column is calculated by ConTeXt. Wolfgang
2011/8/3 Wolfgang Schuster
That is in this case a better solution. For one in my solution the table became to wide. (Do not know why.)
The combined width of the columns in your table had been \textwidth but there is also a space between the columns which makes the table wider than the normal text.
Is it know how much spave this is? For another table I now use: \starttable[|w(.10\textwidth)|p(.82\textwidth)|]
This looks about right, but if there is a better way to do it …
Set only a width for the first column, the width of the “p” column is calculated by ConTeXt.
That does not work. The p column will become as long as the first column: \starttext \starttable[|w(.10\textwidth)|p(.82\textwidth)|] \HL \NC Field one \NC A quit long field to show what goes wrong \NC\AR \HL \stoptable \starttable[|w(.10\textwidth)|p|] \HL \NC Field one \NC A quit long field to show what goes wrong \NC\AR \HL \stoptable \stoptext -- Cecil Westerhof
Am 03.08.2011 um 19:54 schrieb Cecil Westerhof:
2011/8/3 Wolfgang Schuster
That is in this case a better solution. For one in my solution the table became to wide. (Do not know why.)
The combined width of the columns in your table had been \textwidth but there is also a space between the columns which makes the table wider than the normal text.
Is it know how much spave this is? For another table I now use: \starttable[|w(.10\textwidth)|p(.82\textwidth)|]
This looks about right, but if there is a better way to do it …
Set only a width for the first column, the width of the “p” column is calculated by ConTeXt.
That does not work. The p column will become as long as the first column: \starttext
I hadn’t noticed you switched from tabulate to table in your example. Look into the wiki, maybe you find some info or use natural tables which don’t use a space between columns. Wolfgang
2011/8/3 Wolfgang Schuster
That is in this case a better solution. For one in my solution the table became to wide. (Do not know why.)
The combined width of the columns in your table had been \textwidth but there is also a space between the columns which makes the table wider than the normal text.
Is it know how much spave this is? For another table I now use: \starttable[|w(.10\textwidth)|p(.82\textwidth)|]
This looks about right, but if there is a better way to do it …
Set only a width for the first column, the width of the “p” column is calculated by ConTeXt.
That does not work. The p column will become as long as the first column: \starttext
I hadn’t noticed you switched from tabulate to table in your example.
\stoptabulate can not be handled by macros. So I had to switch. Look into the wiki, maybe you find some info or use natural tables
which don’t use a space between columns.
I'll continue my search. ;-} -- Cecil Westerhof
2011/8/3 Cecil Westerhof
Look into the wiki, maybe you find some info or use natural tables
which don’t use a space between columns.
I'll continue my search. ;-}
I came up with the following: \setupbodyfont[10pt] \define[1]\ActivityWorkTable{ \bTR \RowWorkTable{}{\bullet\space #1} \eTR } \define[2]\RowWorkTable{ \bTD #1 \eTD \bTD #2 \eTD } \define[2]\StartWorkTable{ \blank[2*big] \setupTABLE[frame=off] \setupTABLE[c][1][width=.14\textwidth] \setupTABLE[c][2][width=.87\textwidth] \bTABLE \bTR[topframe=on, bottomframe=on] \RowWorkTable{#1}{#2} \eTR \bTR \RowWorkTable{}{\bf Gedaan} \eTR } \define[1]\StopWorkTable{ \bTR[topframe=on]\RowWorkTable{}{\bf Gebruikt} \eTR \bTR[bottomframe=on]\RowWorkTable{}{\bullet\space #1} \eTR \eTABLE } \starttext \StartWorkTable{Huidig}{Senior software engineer bij Artex} \ActivityWorkTable{Teamleader voor een groep van 5 PHP-programmeurs die werken volgens scrum/agile principes. Dit team ontwikkeld grootschalige web applicaties met gebruikmaking van PHP/AJAX/Zend en HTML5. } \ActivityWorkTable{Quality Management} \ActivityWorkTable{Schrijven documentatie, zowel technische als gebruikers} \ActivityWorkTable{Definieren nieuwe functionaliteiten} \ActivityWorkTable{Installeren subversion server en definiëren werkwijze} \StopWorkTable{Linux, Windows, \ConTeXt, PHP, shell-scripting, MySql, phpMyAdmin} \StartWorkTable{2008 - 2009}{Senior software engineer bij het Kadaster} \ActivityWorkTable{Bij het Kadaster was men bezig met de migratie van TRU64 naar HP-UX. Ik heb hierbij geholpen met het overzetten van systeemdelen geschreven in C\high{++} en het overzetten van shell-scripts. } \StopWorkTable{Linux, Windows, OpenVMS, C en C\high{++}, shell-scripting, Emacs, Lisp, Fortran } \stoptext Work reasonable good. And it is now very easy to change the tables. I only have two problems: - I like the alignment to be filled. (The default in normal text not in a table.) How can I do this? - I use bullets before my points. But when a line is to long it and it wraps around, the next line starts at the same place as the bullet. I would like it to be indented in the same way as with \startitemize (or this point). How would I do this? -- Cecil Westerhof
Though older, there is an article in MAPS22 (see ntg-website) explaining what tabulate can do. Willi On 3 Aug 2011, at 10:37, Cecil Westerhof wrote:
I am using the following code: \starttabulate[|l|l|] \HL \NC {\bf Primair} \NC {\bf Secundair} \NC\NR \HL \NC C en C++ \NC Java \NC\NR \NC Python \NC Perl \NC\NR \NC shell-script \NC Lisp \NC\NR \NC SQL \NC HTML-4 en JavaScript \NC\NR \NC \NC PHP \NC\NR \NC \NC Pascal \NC\NR \HL \stoptabulate
But this uses only the necessary space. I would like to have the table using the width of the page and both columns having the same size. Is this possible?
-- Cecil Westerhof ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
participants (3)
-
Cecil Westerhof
-
Willi Egger
-
Wolfgang Schuster