* split natural table @ 2013-05-21 16:55 Stephens, Kenny 2013-05-21 17:20 ` Wolfgang Schuster 0 siblings, 1 reply; 5+ messages in thread From: Stephens, Kenny @ 2013-05-21 16:55 UTC (permalink / raw) To: ntg-context [-- Attachment #1.1: Type: text/plain, Size: 2022 bytes --] I use a natural table to format my page header. I have another natural table in the body. When the body's table is split onto the second page it interferes with the formatting of the header's table, but only the header-table on the first page. I've included an example. Run as-is, the header has the correct format. Uncomment the last row of the body table to see the incorrect header formatting. This behavior also occurs using live.contextgarden.net (today, 2013-05-21). The incorrect header table format occurs with "split=yes" and "split=repeat" for the body table. If "split=no" then the header table keeps the correct format. TexLive 2012 (updated 2013-05-20 to frozen version) LuaTeX beta-0.70.2-2012052410 ConTeXt: 2012.05.30 11:26 MkIV fmt: 2012.9.13 \setuppapersize[letter][letter] \setuplayout[topspace=0pt, header=42pt, headerdistance=6pt, ] \setuppagenumbering[location=] \setupwhitespace[none] \define\syllabusheader{% \vskip0.1mm \bTABLE[frame=off,width=\textwidth] \setupTABLE[c][1][width=fit, align=raggedright,style={\bfb\ss}] \setupTABLE[c][2][width=broad,align=center, style={\bfd\ss}] \setupTABLE[c][3][width=fit, align=raggedleft, style={\bfb\ss}] \bTR \bTD Left \eTD \bTD Center \eTD \bTD Right \eTD \eTR \eTABLE } \setupheadertexts[{\framed[corner=09,width=broad,align=center,height=\headerheight]% {\syllabusheader}}] \starttext \bTABLE[split=repeat] \setupTABLE[c][1][width=10em,align={center,lohi},style={\bfx}] \setupTABLE[r][1][align={hilo,center},style={\bfx}] \setupTABLE[c][2][width=20em,style={\tfx}] \bTABLEhead \bTR\bTH Row number \eTH\bTH Content \eTH\eTR \eTABLEhead \bTABLEbody \bTR\bTC 1 \eTC\bTC \input{knuth} \eTC\eTR \bTR\bTC 2 \eTC\bTC \input{knuth} \eTC\eTR \bTR\bTC 3 \eTC\bTC \input{knuth} \eTC\eTR % \bTR\bTC 4 \eTC\bTC \input{knuth} \eTC\eTR % Uncomment this line to see wrong behavior \eTABLEbody \eTABLE \stoptext [-- Attachment #1.2: Type: text/html, Size: 5608 bytes --] [-- Attachment #2: Type: text/plain, Size: 485 bytes --] ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: split natural table 2013-05-21 16:55 split natural table Stephens, Kenny @ 2013-05-21 17:20 ` Wolfgang Schuster 2013-05-22 2:58 ` Stephens, Kenny 0 siblings, 1 reply; 5+ messages in thread From: Wolfgang Schuster @ 2013-05-21 17:20 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 2097 bytes --] Am 21.05.2013 um 18:55 schrieb "Stephens, Kenny" <kstephens@hsutx.edu>: > I use a natural table to format my page header. I have another natural table in the body. When the body’s table is split onto the second page it interferes with the formatting of the header’s table, but only the header-table on the first page. I’ve included an example. Run as-is, the header has the correct format. Uncomment the last row of the body table to see the incorrect header formatting. This behavior also occurs using live.contextgarden.net (today, 2013-05-21). > > The incorrect header table format occurs with “split=yes” and “split=repeat” for the body table. If “split=no” then the header table keeps the correct format. > > TexLive 2012 (updated 2013-05-20 to frozen version) > LuaTeX beta-0.70.2-2012052410 > ConTeXt: 2012.05.30 11:26 MkIV fmt: 2012.9.13 > > \setuppapersize[letter][letter] > \setuplayout[topspace=0pt, > header=42pt, > headerdistance=6pt, > ] > \setuppagenumbering[location=] > \setupwhitespace[none] > \define\syllabusheader{% > \vskip0.1mm > \bTABLE[frame=off,width=\textwidth] > \setupTABLE[c][1][width=fit, align=raggedright,style={\bfb\ss}] > \setupTABLE[c][2][width=broad,align=center, style={\bfd\ss}] > \setupTABLE[c][3][width=fit, align=raggedleft, style={\bfb\ss}] > \bTR \bTD Left \eTD \bTD Center \eTD \bTD Right \eTD \eTR > \eTABLE > } > \setupheadertexts[{\framed[corner=09,width=broad,align=center,height=\headerheight]% > {\syllabusheader}}] This is a known problem when you use the same table environment in the body and for the header, you can use \framed to get the same result without these problems (it’s also faster). \startsetups[header] \startframed[corner=09,width=max,height=max,align={middle,low},foregroundstyle=\ss\bfb,offset=1ex] \startoverlay {\leftaligned {Left}} {\midaligned {Middle}} {\rightaligned{Right}} \stopoverlay \stopframed \stopsetups \setupheadertexts[\texsetup{header}] Wolfgang [-- Attachment #1.2: Type: text/html, Size: 6860 bytes --] [-- Attachment #2: Type: text/plain, Size: 485 bytes --] ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: split natural table 2013-05-21 17:20 ` Wolfgang Schuster @ 2013-05-22 2:58 ` Stephens, Kenny 2013-05-22 3:17 ` Wolfgang Schuster 0 siblings, 1 reply; 5+ messages in thread From: Stephens, Kenny @ 2013-05-22 2:58 UTC (permalink / raw) To: mailing list for ConTeXt users ________________________________________ From: ntg-context-bounces@ntg.nl [ntg-context-bounces@ntg.nl] on behalf of Wolfgang Schuster [schuster.wolfgang@gmail.com] Sent: Tuesday, May 21, 2013 12:20 PM To: mailing list for ConTeXt users Subject: Re: [NTG-context] split natural table Am 21.05.2013 um 18:55 schrieb "Stephens, Kenny" <kstephens@hsutx.edu<mailto:kstephens@hsutx.edu>>: I use a natural table to format my page header. I have another natural table in the body. When the body’s table is split onto the second page it interferes with the formatting of the header’s table, but only the header-table on the first page. I’ve included an example. Run as-is, the header has the correct format. Uncomment the last row of the body table to see the incorrect header formatting. This behavior also occurs using live.contextgarden.net<http://live.contextgarden.net> (today, 2013-05-21). The incorrect header table format occurs with “split=yes” and “split=repeat” for the body table. If “split=no” then the header table keeps the correct format. TexLive 2012 (updated 2013-05-20 to frozen version) LuaTeX beta-0.70.2-2012052410 ConTeXt: 2012.05.30 11:26 MkIV fmt: 2012.9.13 \setuppapersize[letter][letter] \setuplayout[topspace=0pt, header=42pt, headerdistance=6pt, ] \setuppagenumbering[location=] \setupwhitespace[none] \define\syllabusheader{% \vskip0.1mm \bTABLE[frame=off,width=\textwidth] \setupTABLE[c][1][width=fit, align=raggedright,style={\bfb\ss}] \setupTABLE[c][2][width=broad,align=center, style={\bfd\ss}] \setupTABLE[c][3][width=fit, align=raggedleft, style={\bfb\ss}] \bTR \bTD Left \eTD \bTD Center \eTD \bTD Right \eTD \eTR \eTABLE } \setupheadertexts[{\framed[corner=09,width=broad,align=center,height=\headerheight]% {\syllabusheader}}] This is a known problem when you use the same table environment in the body and for the header, you can use \framed to get the same result without these problems (it’s also faster). \startsetups[header] \startframed[corner=09,width=max,height=max,align={middle,low},foregroundstyle=\ss\bfb,offset=1ex] \startoverlay {\leftaligned {Left}} {\midaligned {Middle}} {\rightaligned{Right}} \stopoverlay \stopframed \stopsetups \setupheadertexts[\texsetup{header}] Wolfgang ------------------------------------------------------------------------------------------------------------------ This fails for me. I commented my approach and replaced it with yours. Here is what that section of the file now looks like: %\define\syllabusheader{% % \vskip0.1mm % \bTABLE[frame=off,width=\textwidth] % \setupTABLE[c][1][width=fit, align=raggedright,style={\bfb\ss}] % \setupTABLE[c][2][width=broad,align=center, style={\bfd\ss}] % \setupTABLE[c][3][width=fit, align=raggedleft, style={\bfb\ss}] % \bTR \bTD Left \eTD \bTD Center \eTD \bTD Right \eTD \eTR % \eTABLE % } %\setupheadertexts[{\framed[corner=09,width=broad,align=center,height=\headerheight]% % {\syllabusheader}}] \startsetups[header] \startframed[corner=09,width=max,height=max,align={middle,low},foregroundstyle=\ss\bfb,offset=1ex] \startoverlay {\leftaligned {Left}} {\midaligned {Middle}} {\rightaligned{Right}} \stopoverlay \stopframed \stopsetups \setupheadertexts[\texsetup{header}] But I get the error: ! Undefined control sequence. <argument> \texsetup {header}{}{}{} \firstoftwoarguments #1#2->#1 \doattributes ...sname #1#2\@EA \endcsname \fi {#4 }\dostopattributes \dosingletexts ...atetexts {#1#2#5}{#6{}{}{}}}}}}} \egroup <argument> ...tk \v!header \v!text \c!middletext } \hss }\hskip -\makeupwidth... \dododoplacelayouttextline ...#2 #3}\hbox to #1{#4 }\stoplayoutcomponent \get... ... l.46 \eTABLE But I like your idea. It is definitely cleaner and faster is always nice. Kenny ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: split natural table 2013-05-22 2:58 ` Stephens, Kenny @ 2013-05-22 3:17 ` Wolfgang Schuster 2013-05-22 4:28 ` Stephens, Kenny 0 siblings, 1 reply; 5+ messages in thread From: Wolfgang Schuster @ 2013-05-22 3:17 UTC (permalink / raw) To: mailing list for ConTeXt users Am 22.05.2013 um 04:58 schrieb "Stephens, Kenny" <kstephens@hsutx.edu>: > This fails for me. I commented my approach and replaced it with yours. Here is what that section of the file now looks like: > %\define\syllabusheader{% > % \vskip0.1mm > % \bTABLE[frame=off,width=\textwidth] > % \setupTABLE[c][1][width=fit, align=raggedright,style={\bfb\ss}] > % \setupTABLE[c][2][width=broad,align=center, style={\bfd\ss}] > % \setupTABLE[c][3][width=fit, align=raggedleft, style={\bfb\ss}] > % \bTR \bTD Left \eTD \bTD Center \eTD \bTD Right \eTD \eTR > % \eTABLE > % } > %\setupheadertexts[{\framed[corner=09,width=broad,align=center,height=\headerheight]% > % {\syllabusheader}}] > \startsetups[header] > \startframed[corner=09,width=max,height=max,align={middle,low},foregroundstyle=\ss\bfb,offset=1ex] > \startoverlay > {\leftaligned {Left}} > {\midaligned {Middle}} > {\rightaligned{Right}} > \stopoverlay > \stopframed > \stopsetups > \setupheadertexts[\texsetup{header}] Use the normal \framed command and replace \texsetup with \setups in \setupheadertexts and it will also work with your older version of context. \startsetups[header] \framed[corner=09,width=max,height=max,align={middle,low},foregroundstyle=\ss\bfb,offset=1ex]\bgroup \startoverlay {\leftaligned {Left}} {\midaligned {Middle}} {\rightaligned{Right}} \stopoverlay \egroup \stopsetups \setupheadertexts[\setups{header}] When you have a longer text for all three fields you need a different solution because \startoverlay … \stopoverlay can only position texts which fit in a single line. \startsetups[header] \framed[corner=09,width=max,height=max,foregroundstyle=\ss\bfb,offset=1ex]\bgroup \framed[frame=off,height=\vsize,width=.33\hsize,align={low,flushleft}] {Left} \framed[frame=off,height=\vsize,width=.33\hsize,align={low,middle}] {Middle} \framed[frame=off,height=\vsize,width=.33\hsize,align={low,flushright}]{Right} \egroup \stopsetups \setupheadertexts[\setups{header}] Wolfgang ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: split natural table 2013-05-22 3:17 ` Wolfgang Schuster @ 2013-05-22 4:28 ` Stephens, Kenny 0 siblings, 0 replies; 5+ messages in thread From: Stephens, Kenny @ 2013-05-22 4:28 UTC (permalink / raw) To: mailing list for ConTeXt users Use the normal \framed command and replace \texsetup with \setups in \setupheadertexts and it will also work with your older version of context. \startsetups[header] \framed[corner=09,width=max,height=max,align={middle,low},foregroundstyle=\ss\bfb,offset=1ex]\bgroup \startoverlay {\leftaligned {Left}} {\midaligned {Middle}} {\rightaligned{Right}} \stopoverlay \egroup \stopsetups \setupheadertexts[\setups{header}] When you have a longer text for all three fields you need a different solution because \startoverlay … \stopoverlay can only position texts which fit in a single line. \startsetups[header] \framed[corner=09,width=max,height=max,foregroundstyle=\ss\bfb,offset=1ex]\bgroup \framed[frame=off,height=\vsize,width=.33\hsize,align={low,flushleft}] {Left} \framed[frame=off,height=\vsize,width=.33\hsize,align={low,middle}] {Middle} \framed[frame=off,height=\vsize,width=.33\hsize,align={low,flushright}]{Right} \egroup \stopsetups \setupheadertexts[\setups{header}] Wolfgang ___________________________________________________________________________________ I could not use \framed[corner=09,width=MAX,height=MAX,foregroundstyle=\ss\bfb,offset=1ex]\bgroup but \framed[corner=09,width=broad,height=\headerheight,foregroundstyle=\ss\bfb,offset=1ex]\bgroup worked perfectly. Many thanks. Keep up the good work on ConTeXt---it's becoming my favorite tool for creating materials for my courses, reports, letters, etc. Kenny ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-05-22 4:28 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2013-05-21 16:55 split natural table Stephens, Kenny 2013-05-21 17:20 ` Wolfgang Schuster 2013-05-22 2:58 ` Stephens, Kenny 2013-05-22 3:17 ` Wolfgang Schuster 2013-05-22 4:28 ` Stephens, Kenny
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).