* Page breaking problem @ 2006-06-19 9:39 Helin Gai 2006-06-19 10:20 ` Hans Hagen 0 siblings, 1 reply; 8+ messages in thread From: Helin Gai @ 2006-06-19 9:39 UTC (permalink / raw) Hi, I'm new to ConTeXt and I'm preparing a document for my own reference. The source code is below. I came across a few weird issues: 1) I don't quite understand why the page break occurs on pages 4 and 6; 2) Why are the first two items in the table of contents in red instead of green? Thanks so much!! % The source starts here: \setupcolors[state=start] \setuppapersize[letter][letter] \setupbodyfont[10pt] \setupbackground [background=screen,corner=round,leftoffset=10pt,topoffset=3pt,rightoffse t=10pt,bottomoffset=3pt] \setuptyping[before={\startbackground},after=\stopbackground] \setuphead[chapter][page=no,style={\bfb\ss},] \setupheadertexts[][chapter] \setuppagenumbering[location={header,margin},left=--~,right=~--] \setupinteraction[state=start] \starttext \completecontent \chapter{Logic Structure of a Project} \starttyping \startproject name_of_project \environment name_of_environ \product name_of_product \stopproject A product could be composed of different ``components.'' \stoptyping \chapter{Page Dimensions} \starttyping \setuppapersize[..1..][..2.._] 1. A3 A4_ A5 A6 letter ... CD landscape mirrored rotated 90 180 270 2. A3 A4_ A5 A6 letter ... landscape mirrored rotated negative 90 180 270 \definepapersize[name][..=..] width, height, offset: dimension scale: number \stoptyping \chapter{Layout} \starttyping \showframe[text,margin,edge] \showsetups \showlayout \setuplayout[..=..] HORIZONTAL: leftedge, leftmargin, leftmargindistance = backspace width: dimension/fit/middle rightmargindistance, rightmargin, rightedget = cutspace VERTICAL: topsapce, header, headerdistance height: dimension/fit/middle (=header+text+footer) footerdistance, footer, bottomspace OTHER grid=yes/no_ horoffset, veroffset style: normal, bold, slanted, boldslanted, type, cap, small ...command marking: on/off_/color location: left, middle, right, bottom, top, singlesided_, doublesided scale: dimen \adaptlayout[page_numbers][height,lines] \makeupwidth, \makeupheight, \textwidth, \textheight (=height-header- footer) \stoptyping \chapter{Logo} \starttyping \definelogo[name][2][3][..=..] 2. top header footer bottom 3. none page leftedge leftmargin left middle right rightmargin rightedge command state \stoptyping \chapter{Spacing} \starttyping \setupinterlinespace[..._][..=..] ..._ reset small_ medium big on off height, depth, top, bottom: number line: dimen \setupwhitespace[...] none_, small, medium, big, line, fixed, fix, dimen \whitespace \nowhitespace \blank[..] n*small n*medium n*big nowhite back white disable force reset line halfline formula fixed flexible \setupblank[..] normal_ standard line dimen big medium small fixed flexible \defineblank[name][...] same as \setupblank \packed \startpacked ... \stoppacked \startunpacked ... \stopunpacked \setupspacing[broad,packed] \space, \nospace, fixedspaces \stoptyping \chapter{Indentation} \starttyping \setupindenting[...] none_, small, medium, big, yes, next, first \noindenting \indenting[..] never_, not, no yes, always, first, next \startnarrower[...] ... \stopnarrower n*left n*middle n*right \setupnarrower[..=...] left, right, middle \stoptyping \chapter{Header and Footer} \starttyping \setupheadertexts[.1._][.2.][.3.] 1. text_ margin edge 2. <text> <section> date <mark> pagenumber 3. same as 2. \setupfootertexts \setupheader[.._][..=..] ._ text_ margin edge state=normal_/stop/start/empty/high/none/nomarking/<name> strut=yes/no style leftstyle rightstyle leftwidth rightwidth before after \setupfooter \stoptyping \chapter{Page Numbers} \starttyping \setuppagenumber[..=..] number: number state=start/stop/keep \setuppagenumbering[..=..] alternative=singlesided/doublesided location=header/footer/left/right/middle/margin/marginedge/inleft/ inright converstion=numbers/characters/Characters/romannumerals/Romannumerals style left: text right: text way: bytext/by<section>/bypart_ text: text numberseparator: text textseparator: text sectionnumber: yes/no separator: text strut: yes_/no state: start_/stop command: \command#1 \stoptyping \chapter{Columns} \starttyping \setupcolumns[..=..] n: number ntop: number rule=on/off_ height: dimen tolerance=verystrict/strict/tolerant_/verytolerant/stretch distance: dimen balance=yes_/no align=yes/no/text blank=fixed_/halfline/line_/flexible/big/medium/small option=background direction=left/right Those of \setupframed \defineparagraphs[name][..=..] n: number rule=on/off_ height=fit/dimen before: command after: command inner: command distance: dimen tolerance align=left/right/middle \setupparagraphs[name][2.._][..=..] 2. <number>/each style width height align=left/right/middle/width/breedte_ tolerance distance before after inner command rule=on/off \start<paragraph> ...\<paragraph> \stop<paragraph> \stoptyping \chapter{Marginal Text} \starttyping \inmargin[.._][ref_]{...} + - low \inright \inleft \inothermargin \margintext \setupinmargin[..._][..=..] ..._ left right number location=left/right/both_ style before after align=inner_/outer/left/right/middle/normal/no/yes line: number distance separator: text those of \setupframed \startcolumns .. \column .. \stopcolumns \stoptyping \chapter{Alignment} \starttyping \leftaligned{...} \midaligned{...} \rightaligned{...} \wordright{...} \startalignment ... \stopalignment \setupalign[...] width left right middle inner outer wide broad height bottom line reset hanging nothanging hyphenated nothyphenated \stoptyping \chapter{Lines} \starttyping \crlf \startlines ... \stoplines \setuplines[..=..] before, after, inbetween, indenting=yes/no_/even/odd \startlinenumbering[...] ... \stoplinenumbering continue \setuplinenumbering[..=..] conversion=numbers/characters/Characters/romannumerals/Romannumerals/ text start: number step: number width: dimen location=intext/inmargin_ style prefix: text referencing=on/off \stoptyping \chapter{Pages} \starttyping \page[..] yes_ makeup no preference bigpreference left right disable last quadruple even odd blank empty reset \stoptyping \stoptext ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Page breaking problem 2006-06-19 9:39 Page breaking problem Helin Gai @ 2006-06-19 10:20 ` Hans Hagen 2006-06-19 10:45 ` Helin Gai 2006-06-19 19:05 ` nico 0 siblings, 2 replies; 8+ messages in thread From: Hans Hagen @ 2006-06-19 10:20 UTC (permalink / raw) Helin Gai wrote: > Hi, I'm new to ConTeXt and I'm preparing a document for my own > reference. The source code is below. I came across a few weird > issues: 1) I don't quite understand why the page break occurs on because of \startbackground, best use textbackgrounds > > pages 4 and 6; 2) Why are the first two items in the table of > contents in red instead of green? > try: \setupinteraction[color=red,contrastcolor=blue] the contrastcolor is used whet the ref is on the same page > Thanks so much!! > > % The source starts here: > \setupcolors[state=start] > \setuppapersize[letter][letter] > \setupbodyfont[10pt] > \setupbackground > [background=screen,corner=round,leftoffset=10pt,topoffset=3pt,rightoffse > t=10pt,bottomoffset=3pt] > \setuptyping[before={\startbackground},after=\stopbackground] > \setuphead[chapter][page=no,style={\bfb\ss},] > \setupheadertexts[][chapter] > \setuppagenumbering[location={header,margin},left=--~,right=~--] > > > \setupinteraction[state=start] > > > > > \starttext > \completecontent > \chapter{Logic Structure of a Project} > > \starttyping > \startproject name_of_project > \environment name_of_environ > \product name_of_product > \stopproject > > A product could be composed of different ``components.'' > \stoptyping > > > \chapter{Page Dimensions} > \starttyping > \setuppapersize[..1..][..2.._] > 1. A3 A4_ A5 A6 letter ... CD landscape mirrored rotated 90 180 270 > 2. A3 A4_ A5 A6 letter ... landscape mirrored rotated negative 90 180 > 270 > > \definepapersize[name][..=..] > width, height, offset: dimension > scale: number > \stoptyping > > \chapter{Layout} > > \starttyping > \showframe[text,margin,edge] > \showsetups > \showlayout > > \setuplayout[..=..] > HORIZONTAL: > leftedge, leftmargin, leftmargindistance = backspace > width: dimension/fit/middle > rightmargindistance, rightmargin, rightedget = cutspace > VERTICAL: > topsapce, header, headerdistance > height: dimension/fit/middle (=header+text+footer) > footerdistance, footer, bottomspace > OTHER > grid=yes/no_ > horoffset, veroffset > style: normal, bold, slanted, boldslanted, type, cap, > small ...command > marking: on/off_/color > location: left, middle, right, bottom, top, singlesided_, doublesided > scale: dimen > > \adaptlayout[page_numbers][height,lines] > \makeupwidth, \makeupheight, \textwidth, \textheight (=height-header- > footer) > \stoptyping > > \chapter{Logo} > > \starttyping > \definelogo[name][2][3][..=..] > 2. top header footer bottom > 3. none page leftedge leftmargin left middle right rightmargin rightedge > command > state > \stoptyping > > \chapter{Spacing} > > \starttyping > \setupinterlinespace[..._][..=..] > ..._ reset small_ medium big on off > height, depth, top, bottom: number > line: dimen > > \setupwhitespace[...] > none_, small, medium, big, line, fixed, fix, dimen > \whitespace > \nowhitespace > > \blank[..] > n*small n*medium n*big nowhite back white disable force reset line > halfline formula fixed flexible > > \setupblank[..] > normal_ standard line dimen big medium small fixed flexible > > \defineblank[name][...] > same as \setupblank > > \packed > \startpacked ... \stoppacked > \startunpacked ... \stopunpacked > > \setupspacing[broad,packed] > \space, \nospace, fixedspaces > \stoptyping > > \chapter{Indentation} > > \starttyping > \setupindenting[...] > none_, small, medium, big, yes, next, first > > \noindenting > > \indenting[..] > never_, not, no yes, always, first, next > > \startnarrower[...] ... \stopnarrower > n*left n*middle n*right > \setupnarrower[..=...] > left, right, middle > \stoptyping > > \chapter{Header and Footer} > \starttyping > \setupheadertexts[.1._][.2.][.3.] > 1. text_ margin edge > 2. <text> <section> date <mark> pagenumber > 3. same as 2. > > \setupfootertexts > > \setupheader[.._][..=..] > ._ text_ margin edge > state=normal_/stop/start/empty/high/none/nomarking/<name> > strut=yes/no > style > leftstyle > rightstyle > leftwidth > rightwidth > before > after > > \setupfooter > \stoptyping > > \chapter{Page Numbers} > \starttyping > \setuppagenumber[..=..] > number: number > state=start/stop/keep > > \setuppagenumbering[..=..] > alternative=singlesided/doublesided > location=header/footer/left/right/middle/margin/marginedge/inleft/ > inright > converstion=numbers/characters/Characters/romannumerals/Romannumerals > style > left: text > right: text > way: bytext/by<section>/bypart_ > text: text > numberseparator: text > textseparator: text > sectionnumber: yes/no > separator: text > strut: yes_/no > state: start_/stop > command: \command#1 > \stoptyping > > > > > \chapter{Columns} > > \starttyping > \setupcolumns[..=..] > n: number > ntop: number > rule=on/off_ > height: dimen > tolerance=verystrict/strict/tolerant_/verytolerant/stretch > distance: dimen > balance=yes_/no > align=yes/no/text > blank=fixed_/halfline/line_/flexible/big/medium/small > option=background > direction=left/right > Those of \setupframed > > \defineparagraphs[name][..=..] > n: number > rule=on/off_ > height=fit/dimen > before: command > after: command > inner: command > distance: dimen > tolerance > align=left/right/middle > \setupparagraphs[name][2.._][..=..] > 2. <number>/each > style > width > height > align=left/right/middle/width/breedte_ > tolerance > distance > before > after > inner > command > rule=on/off > > \start<paragraph> ...\<paragraph> \stop<paragraph> > \stoptyping > > \chapter{Marginal Text} > \starttyping > \inmargin[.._][ref_]{...} > + - low > \inright > \inleft > \inothermargin > \margintext > > \setupinmargin[..._][..=..] > ..._ left right number > location=left/right/both_ > style > before > after > align=inner_/outer/left/right/middle/normal/no/yes > line: number > distance > separator: text > those of \setupframed > > \startcolumns .. \column .. \stopcolumns > \stoptyping > > > \chapter{Alignment} > \starttyping > \leftaligned{...} > \midaligned{...} > \rightaligned{...} > \wordright{...} > > \startalignment ... \stopalignment > \setupalign[...] > width left right middle inner outer wide broad height bottom line > reset hanging nothanging hyphenated nothyphenated > \stoptyping > > > \chapter{Lines} > \starttyping > \crlf > \startlines ... \stoplines > \setuplines[..=..] > before, after, inbetween, indenting=yes/no_/even/odd > > \startlinenumbering[...] ... \stoplinenumbering > continue > \setuplinenumbering[..=..] > conversion=numbers/characters/Characters/romannumerals/Romannumerals/ > text > start: number > step: number > width: dimen > location=intext/inmargin_ > style > prefix: text > referencing=on/off > \stoptyping > > \chapter{Pages} > \starttyping > \page[..] > yes_ makeup no preference bigpreference left right disable last > quadruple even odd blank empty reset > \stoptyping > > \stoptext > _______________________________________________ > ntg-context mailing list > ntg-context@ntg.nl > http://www.ntg.nl/mailman/listinfo/ntg-context > -- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl ----------------------------------------------------------------- ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Page breaking problem 2006-06-19 10:20 ` Hans Hagen @ 2006-06-19 10:45 ` Helin Gai 2006-06-19 18:51 ` nico 2006-06-19 19:05 ` nico 1 sibling, 1 reply; 8+ messages in thread From: Helin Gai @ 2006-06-19 10:45 UTC (permalink / raw) Thanks Hans for the prompt reply. I tried the following code: \definetextbackground[A] [frame=off,location=paragraph,backgroundcolor=gray] \setuptyping[before={\starttextbackground[A]},after= {\stoptextbackground}] But this resulted in tons of errors. Could you give some instruction as to how to proceed? Thanks so much! Colin On Jun 19, 2006, at 6:20 PM, Hans Hagen wrote: > Helin Gai wrote: >> Hi, I'm new to ConTeXt and I'm preparing a document for my own >> reference. The source code is below. I came across a few weird >> issues: 1) I don't quite understand why the page break occurs on > because of \startbackground, best use textbackgrounds >> >> pages 4 and 6; 2) Why are the first two items in the table of >> contents in red instead of green? >> > try: > > \setupinteraction[color=red,contrastcolor=blue] > > the contrastcolor is used whet the ref is on the same page > >> Thanks so much!! >> >> % The source starts here: >> \setupcolors[state=start] >> \setuppapersize[letter][letter] >> \setupbodyfont[10pt] >> \setupbackground >> [background=screen,corner=round,leftoffset=10pt,topoffset=3pt,rightof >> fse >> t=10pt,bottomoffset=3pt] >> \setuptyping[before={\startbackground},after=\stopbackground] >> \setuphead[chapter][page=no,style={\bfb\ss},] >> \setupheadertexts[][chapter] >> \setuppagenumbering[location={header,margin},left=--~,right=~--] >> >> >> \setupinteraction[state=start] >> >> >> >> >> \starttext >> \completecontent >> \chapter{Logic Structure of a Project} >> >> \starttyping >> \startproject name_of_project >> \environment name_of_environ >> \product name_of_product >> \stopproject >> >> A product could be composed of different ``components.'' >> \stoptyping >> >> >> \chapter{Page Dimensions} >> \starttyping >> \setuppapersize[..1..][..2.._] >> 1. A3 A4_ A5 A6 letter ... CD landscape mirrored rotated 90 180 270 >> 2. A3 A4_ A5 A6 letter ... landscape mirrored rotated negative 90 180 >> 270 >> >> \definepapersize[name][..=..] >> width, height, offset: dimension >> scale: number >> \stoptyping >> >> \chapter{Layout} >> >> \starttyping >> \showframe[text,margin,edge] >> \showsetups >> \showlayout >> >> \setuplayout[..=..] >> HORIZONTAL: >> leftedge, leftmargin, leftmargindistance = backspace >> width: dimension/fit/middle >> rightmargindistance, rightmargin, rightedget = cutspace >> VERTICAL: >> topsapce, header, headerdistance >> height: dimension/fit/middle (=header+text+footer) >> footerdistance, footer, bottomspace >> OTHER >> grid=yes/no_ >> horoffset, veroffset >> style: normal, bold, slanted, boldslanted, type, cap, >> small ...command >> marking: on/off_/color >> location: left, middle, right, bottom, top, singlesided_, >> doublesided >> scale: dimen >> >> \adaptlayout[page_numbers][height,lines] >> \makeupwidth, \makeupheight, \textwidth, \textheight (=height-header- >> footer) >> \stoptyping >> >> \chapter{Logo} >> >> \starttyping >> \definelogo[name][2][3][..=..] >> 2. top header footer bottom >> 3. none page leftedge leftmargin left middle right rightmargin >> rightedge >> command >> state >> \stoptyping >> >> \chapter{Spacing} >> >> \starttyping >> \setupinterlinespace[..._][..=..] >> ..._ reset small_ medium big on off >> height, depth, top, bottom: number >> line: dimen >> >> \setupwhitespace[...] >> none_, small, medium, big, line, fixed, fix, dimen >> \whitespace >> \nowhitespace >> >> \blank[..] >> n*small n*medium n*big nowhite back white disable force reset line >> halfline formula fixed flexible >> >> \setupblank[..] >> normal_ standard line dimen big medium small fixed flexible >> >> \defineblank[name][...] >> same as \setupblank >> >> \packed >> \startpacked ... \stoppacked >> \startunpacked ... \stopunpacked >> >> \setupspacing[broad,packed] >> \space, \nospace, fixedspaces >> \stoptyping >> >> \chapter{Indentation} >> >> \starttyping >> \setupindenting[...] >> none_, small, medium, big, yes, next, first >> >> \noindenting >> >> \indenting[..] >> never_, not, no yes, always, first, next >> >> \startnarrower[...] ... \stopnarrower >> n*left n*middle n*right >> \setupnarrower[..=...] >> left, right, middle >> \stoptyping >> >> \chapter{Header and Footer} >> \starttyping >> \setupheadertexts[.1._][.2.][.3.] >> 1. text_ margin edge >> 2. <text> <section> date <mark> pagenumber >> 3. same as 2. >> >> \setupfootertexts >> >> \setupheader[.._][..=..] >> ._ text_ margin edge >> state=normal_/stop/start/empty/high/none/nomarking/<name> >> strut=yes/no >> style >> leftstyle >> rightstyle >> leftwidth >> rightwidth >> before >> after >> >> \setupfooter >> \stoptyping >> >> \chapter{Page Numbers} >> \starttyping >> \setuppagenumber[..=..] >> number: number >> state=start/stop/keep >> >> \setuppagenumbering[..=..] >> alternative=singlesided/doublesided >> location=header/footer/left/right/middle/margin/marginedge/inleft/ >> inright >> converstion=numbers/characters/Characters/romannumerals/Romannumerals >> style >> left: text >> right: text >> way: bytext/by<section>/bypart_ >> text: text >> numberseparator: text >> textseparator: text >> sectionnumber: yes/no >> separator: text >> strut: yes_/no >> state: start_/stop >> command: \command#1 >> \stoptyping >> >> >> >> >> \chapter{Columns} >> >> \starttyping >> \setupcolumns[..=..] >> n: number >> ntop: number >> rule=on/off_ >> height: dimen >> tolerance=verystrict/strict/tolerant_/verytolerant/stretch >> distance: dimen >> balance=yes_/no >> align=yes/no/text >> blank=fixed_/halfline/line_/flexible/big/medium/small >> option=background >> direction=left/right >> Those of \setupframed >> >> \defineparagraphs[name][..=..] >> n: number >> rule=on/off_ >> height=fit/dimen >> before: command >> after: command >> inner: command >> distance: dimen >> tolerance >> align=left/right/middle >> \setupparagraphs[name][2.._][..=..] >> 2. <number>/each >> style >> width >> height >> align=left/right/middle/width/breedte_ >> tolerance >> distance >> before >> after >> inner >> command >> rule=on/off >> >> \start<paragraph> ...\<paragraph> \stop<paragraph> >> \stoptyping >> >> \chapter{Marginal Text} >> \starttyping >> \inmargin[.._][ref_]{...} >> + - low >> \inright >> \inleft >> \inothermargin >> \margintext >> >> \setupinmargin[..._][..=..] >> ..._ left right number >> location=left/right/both_ >> style >> before >> after >> align=inner_/outer/left/right/middle/normal/no/yes >> line: number >> distance >> separator: text >> those of \setupframed >> >> \startcolumns .. \column .. \stopcolumns >> \stoptyping >> >> >> \chapter{Alignment} >> \starttyping >> \leftaligned{...} >> \midaligned{...} >> \rightaligned{...} >> \wordright{...} >> >> \startalignment ... \stopalignment >> \setupalign[...] >> width left right middle inner outer wide broad height bottom line >> reset hanging nothanging hyphenated nothyphenated >> \stoptyping >> >> >> \chapter{Lines} >> \starttyping >> \crlf >> \startlines ... \stoplines >> \setuplines[..=..] >> before, after, inbetween, indenting=yes/no_/even/odd >> >> \startlinenumbering[...] ... \stoplinenumbering >> continue >> \setuplinenumbering[..=..] >> conversion=numbers/characters/Characters/romannumerals/Romannumerals/ >> text >> start: number >> step: number >> width: dimen >> location=intext/inmargin_ >> style >> prefix: text >> referencing=on/off >> \stoptyping >> >> \chapter{Pages} >> \starttyping >> \page[..] >> yes_ makeup no preference bigpreference left right disable last >> quadruple even odd blank empty reset >> \stoptyping >> >> \stoptext >> _______________________________________________ >> ntg-context mailing list >> ntg-context@ntg.nl >> http://www.ntg.nl/mailman/listinfo/ntg-context >> > > > -- > > ----------------------------------------------------------------- > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com > | www.pragma-pod.nl > ----------------------------------------------------------------- > > _______________________________________________ > ntg-context mailing list > ntg-context@ntg.nl > http://www.ntg.nl/mailman/listinfo/ntg-context ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Page breaking problem 2006-06-19 10:45 ` Helin Gai @ 2006-06-19 18:51 ` nico 2006-06-19 23:28 ` Helin Gai 0 siblings, 1 reply; 8+ messages in thread From: nico @ 2006-06-19 18:51 UTC (permalink / raw) On Mon, 19 Jun 2006 18:45:32 +0800, Helin Gai <hg9@duke.edu> wrote: > Thanks Hans for the prompt reply. > > I tried the following code: > > \definetextbackground[A] > [frame=off,location=paragraph,backgroundcolor=gray] > \setuptyping[before={\starttextbackground[A]},after= > {\stoptextbackground}] > > But this resulted in tons of errors. Could you give some instruction > as to how to proceed? I don't know if it's the mailer that wrapped the text, but you should stuck option=value, like this: \setuptyping[before={\starttextbackground[A]}, after={\stoptextbackground}] With a "old" release (2006.05.23), it works fine. Regards, BG ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Page breaking problem 2006-06-19 18:51 ` nico @ 2006-06-19 23:28 ` Helin Gai 0 siblings, 0 replies; 8+ messages in thread From: Helin Gai @ 2006-06-19 23:28 UTC (permalink / raw) [-- Attachment #1: Type: text/plain, Size: 157 bytes --] Hi, The wrapping was indeed caused by the mail program. I attached source code and the log file below. BTW, I'm using the 6/17/06 distribution. Thanks! [-- Attachment #2.1: Commands.tex --] [-- Type: application/applefile, Size: 72 bytes --] [-- Attachment #2.2: Commands.tex --] [-- Type: application/octet-stream, Size: 7201 bytes --] \setupcolors[state=start] \setuppapersize[letter][letter] \setupbodyfont[10pt] %\setupbackground[textbackgrounds=screen,corner=round,leftoffset=10pt,topoffset=3pt,rightoffset=10pt,bottomoffset=3pt] %\setuptyping[before={\startbackground},after=\stopbackground] \definetextbackground[A][frame=off,location=paragraph,backgroundcolor=gray] \setuptyping[before={\starttextbackground[A]},after={\stoptextbackground}] \setuphead[chapter][page=no,style={\bfb\ss},] \setupheadertexts[][chapter] \setuppagenumbering[location={header,margin},left=--~,right=~--] \setupinteraction[state=start,color=red,contrastcolor=blue] \starttext \completecontent \chapter{Logic Structure of a Project} \starttyping \startproject name_of_project \environment name_of_environ \product name_of_product \stopproject A product could be composed of different ``components.'' \stoptyping \chapter{Page Dimensions} \starttyping \setuppapersize[..1..][..2.._] 1. A3 A4_ A5 A6 letter ... CD landscape mirrored rotated 90 180 270 2. A3 A4_ A5 A6 letter ... landscape mirrored rotated negative 90 180 270 \definepapersize[name][..=..] width, height, offset: dimension scale: number \stoptyping \chapter{Layout} \starttyping \showframe[text,margin,edge] \showsetups \showlayout \setuplayout[..=..] HORIZONTAL: leftedge, leftmargin, leftmargindistance = backspace width: dimension/fit/middle rightmargindistance, rightmargin, rightedget = cutspace VERTICAL: topsapce, header, headerdistance height: dimension/fit/middle (=header+text+footer) footerdistance, footer, bottomspace OTHER grid=yes/no_ horoffset, veroffset style: normal, bold, slanted, boldslanted, type, cap, small ...command marking: on/off_/color location: left, middle, right, bottom, top, singlesided_, doublesided scale: dimen \adaptlayout[page_numbers][height,lines] \makeupwidth, \makeupheight, \textwidth, \textheight (=height-header-footer) \stoptyping \chapter{Logo} \starttyping \definelogo[name][2][3][..=..] 2. top header footer bottom 3. none page leftedge leftmargin left middle right rightmargin rightedge command state \stoptyping \chapter{Spacing} \starttyping \setupinterlinespace[..._][..=..] ..._ reset small_ medium big on off height, depth, top, bottom: number line: dimen \setupwhitespace[...] none_, small, medium, big, line, fixed, fix, dimen \whitespace \nowhitespace \blank[..] n*small n*medium n*big nowhite back white disable force reset line halfline formula fixed flexible \setupblank[..] normal_ standard line dimen big medium small fixed flexible \defineblank[name][...] same as \setupblank \packed \startpacked ... \stoppacked \startunpacked ... \stopunpacked \setupspacing[broad,packed] \space, \nospace, fixedspaces \stoptyping \chapter{Indentation} \starttyping \setupindenting[...] none_, small, medium, big, yes, next, first \noindenting \indenting[..] never_, not, no yes, always, first, next \startnarrower[...] ... \stopnarrower n*left n*middle n*right \setupnarrower[..=...] left, right, middle \stoptyping \chapter{Header and Footer} \starttyping \setupheadertexts[.1._][.2.][.3.] 1. text_ margin edge 2. <text> <section> date <mark> pagenumber 3. same as 2. \setupfootertexts \setupheader[.._][..=..] ._ text_ margin edge state=normal_ (visible) none (invisible, no whitespace) empty (one page visible, whitespace) high (one page visible, no whitespace) start (visible) nomarking (leave out marks) stop (invisible, whitespace) strut=yes/no style leftstyle rightstyle leftwidth rightwidth before after \setupfooter \noheaderandfooterlines \stoptyping \chapter{Page Numbers} \starttyping \setuppagenumber[..=..] number: number state=start/stop/keep \setuppagenumbering[..=..] alternative=singlesided/doublesided location=header/footer/left/right/middle/margin/marginedge/inleft/inright converstion=numbers/characters/Characters/romannumerals/Romannumerals style left: text right: text way: bytext/by<section>/bypart_ text: text numberseparator: text textseparator: text sectionnumber: yes/no separator: text strut: yes_/no state: start_/stop command: \command#1 \stoptyping \chapter{Footnotes} \starttyping \setupfootnotes[..=..] conversion=numbers/characters/Characters/romannumerals/Romannumerals way=bytext/by<section> location=page_/text/columns/high/none rule=on/off_ before after width height bodyfont=5pt..12pt/small_/big style distance columndistance margindistance n: number split=tolerant/strict/verystrict/<number> Those of \framed \startlocalfootnotes[n=0] ... \footnote ... \placefootnotes \stoplocalfootnotes \setupfootnotedefinition[..=..] Those of \definedescription \stoptyping \chapter{Columns} \starttyping \setupcolumns[..=..] n: number ntop: number rule=on/off_ height: dimen tolerance=verystrict/strict/tolerant_/verytolerant/stretch distance: dimen balance=yes_/no align=yes/no/text blank=fixed_/halfline/line_/flexible/big/medium/small option=background direction=left/right Those of \setupframed \defineparagraphs[name][..=..] n: number rule=on/off_ height=fit/dimen before: command after: command inner: command distance: dimen tolerance align=left/right/middle \setupparagraphs[name][2.._][..=..] 2. <number>/each style width height align=left/right/middle/width/breedte_ tolerance distance before after inner command rule=on/off \start<paragraph> ...\<paragraph> \stop<paragraph> \stoptyping \chapter{Marginal Text} \starttyping \inmargin[.._][ref_]{...} + - low \inright \inleft \inothermargin \margintext \setupinmargin[..._][..=..] ..._ left right number location=left/right/both_ style before after align=inner_/outer/left/right/middle/normal/no/yes line: number distance separator: text those of \setupframed \startcolumns .. \column .. \stopcolumns \stoptyping \chapter{Alignment} \starttyping \leftaligned{...} \midaligned{...} \rightaligned{...} \wordright{...} \startalignment ... \stopalignment \setupalign[...] width left right middle inner outer wide broad height bottom line reset hanging nothanging hyphenated nothyphenated \stoptyping \chapter{Lines} \starttyping \crlf \startlines ... \stoplines \setuplines[..=..] before, after, inbetween, indenting=yes/no_/even/odd \startlinenumbering[...] ... \stoplinenumbering continue \setuplinenumbering[..=..] conversion=numbers/characters/Characters/romannumerals/Romannumerals/text start: number step: number width: dimen location=intext/inmargin_ style prefix: text referencing=on/off \stoptyping \chapter{Pages} \starttyping \page[..] yes_ makeup no preference bigpreference left right disable last quadruple even odd blank empty reset \stoptyping \chapter{Aligned Boxes} \starttyping \hbox \vbox \vtop \cbox \lbox \rbox \sbox \tbox \bbox \setbox0=... \makecutbox0\box0 \stoptyping \chapter{Makeup} \starttyping \startstandardmakeup .. \stopstandardmakeup \setupmakeup[name][..=..] width height voffset hoffset: dimen page=left/yes/right commands doublesided=yes/no/empty_ headerstate=normal/stop/start/empty_/none/nomarking footerstate textstate topstate=stop/start bottomstate pagestate color: name \definemakeup[name][..=..] \start<name>makeup ... \stop<name>makeup \stoptyping \stoptext [-- Attachment #3: Commands.log --] [-- Type: application/octet-stream, Size: 4096 bytes --] This is pdfeTeX, Version 3.141592-1.30.4-2.2 (Web2C 7.5.5) (format=cont-en 2006.6.19) 20 JUN 2006 07:24 entering extended mode (/usr/local/teTeX/share/texmf.tetex/web2c/natural.tcx) **&cont-en Commands.tex (./Commands.tex ConTeXt ver: 2006.06.15 09:05 fmt: 2006.6.19 int: english mes: english language : language en is active <protectionstate 0> system : cont-new loaded (/usr/local/teTeX/share/texmf.tetex/tex/context/base/cont-new.tex systems : beware: some patches loaded from cont-new.tex color : palette rollover is available ) system : cont-old loaded (/usr/local/teTeX/share/texmf.tetex/tex/context/base/cont-old.tex loading : Context Old Macros ) system : cont-fil loaded (/usr/local/teTeX/share/texmf.tetex/tex/context/base/cont-fil.tex loading : Context File Synonyms ) system : cont-sys loaded (/usr/local/teTeX/share/texmf.tetex/tex/context/user/cont-sys.tex (/usr/local/teTeX/share/texmf.tetex/tex/context/base/type-exa.tex) (/usr/local/teTeX/share/texmf.tetex/tex/context/base/type-syn.tex) (/usr/local/teTeX/share/texmf.tetex/tex/context/base/type-enc.tex) (/usr/local/teTeX/share/texmf.tetex/tex/context/base/type-siz.tex) (/usr/local/teTeX/share/texmf.tetex/tex/context/base/type-map.tex) (/usr/local/teTeX/share/texmf.tetex/tex/context/base/type-spe.tex) (/usr/local/teTeX/share/texmf.tetex/tex/context/base/type-akb.tex)) bodyfont : 12pt rm is loaded language : patterns en->ec:ec->1->2:3 uk->ec:ec->2->2:3 de->texnansi:tex nansi->3->2:3 de->ec:ec->4->2:3 fr->texnansi:texnansi->5->2:3 fr->ec:ec->6->2:3 es->ec:ec->7->2:3 pt->texnansi:texnansi->8->2:3 pt->ec:ec->9->2:3 it->texnansi :texnansi->10->2:3 it->ec:ec->11->2:3 nl->texnansi:texnansi->12->2:3 nl->ec:ec- >13->2:3 cz->il2:il2->14->2:3 cz->ec:ec->15->2:3 sk->il2:il2->16->2:3 sk->ec:ec ->17->2:3 pl->pl0:pl0->18->2:3 pl->ec:ec->19->2:3 pl->qx:qx->20->2:3 loaded specials : tex,postscript,rokicki loaded \openout2 = `Commands.tui'. system : Commands.top loaded (./Commands.top specials : loading definition file tpd (/usr/local/teTeX/share/texmf.tetex/tex/context/base/spec-tpd.tex specials : loading definition file fdf (/usr/local/teTeX/share/texmf.tetex/tex/context/base/spec-fdf.tex) specials : fdf loaded ) specials : fdf,tpd loaded ) \openout0 = `Commands-mpgraph.mp'. \openout0 = `mpgraph.mp'. systems : system commands are disabled color : mpcmyk color space is supported color : mpspot color space is supported color : system rgb is global activated (/usr/local/teTeX/share/texmf.tetex/tex/context/base/pdfr-ec.tex) interaction : active (./Commands.tuo) (./Commands.tuo) (./Commands.tuo) (./Commands.tuo) (./Commands.tuo) (./Commands.tuo) (./Commands.tuo) (./Commands.tuo) (./Commands.tuo) (./Commands.tuo) (/usr/local/teTeX/share/texmf.tetex/tex/context/base/sort-def.tex) (/usr/local/teTeX/share/texmf.tetex/tex/context/base/sort-lan.tex) (./Commands.tuo) (./Commands.tuo) systems : begin file Commands at line 21 title : - \headtext {content} (./Commands.tuo) chapter : 1 Logic Structure of a Project chapter : 2 Page Dimensions chapter : 3 Layout fonts : using map file: lm-texnansi fonts : using map file: original-base fonts : using map file: ec-public-lm fonts : using map file: ec-base fonts : using map file: 8r-base fonts : using map file: t5-base fonts : using map file: original-ams-base fonts : using map file: original-ams-euler fonts : using map file: original-public-lm \openout6 = `Commands-mpgraph.mp'. Runaway argument? {boxgridtype := 0 ; ! Paragraph ended before \flushTeXtexts was complete. <to be read again> \par <argument> boxgridtype := 0 ;\par boxlinetype := 0 ;\par boxfilltype := 1 ;\... \writecheckedMPgraphic ...aphic \flushTeXtexts {#1 }\writeMPgraph [-- Attachment #4: Type: text/plain, Size: 877 bytes --] On Jun 20, 2006, at 2:51 AM, nico wrote: > On Mon, 19 Jun 2006 18:45:32 +0800, Helin Gai <hg9@duke.edu> wrote: > >> Thanks Hans for the prompt reply. >> >> I tried the following code: >> >> \definetextbackground[A] >> [frame=off,location=paragraph,backgroundcolor=gray] >> \setuptyping[before={\starttextbackground[A]},after= >> {\stoptextbackground}] >> >> But this resulted in tons of errors. Could you give some instruction >> as to how to proceed? > > I don't know if it's the mailer that wrapped the text, but you should > stuck option=value, like this: > > \setuptyping[before={\starttextbackground[A]}, > after={\stoptextbackground}] > > With a "old" release (2006.05.23), it works fine. > > Regards, > BG > _______________________________________________ > ntg-context mailing list > ntg-context@ntg.nl > http://www.ntg.nl/mailman/listinfo/ntg-context [-- Attachment #5: Type: text/plain, Size: 139 bytes --] _______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Page breaking problem 2006-06-19 10:20 ` Hans Hagen 2006-06-19 10:45 ` Helin Gai @ 2006-06-19 19:05 ` nico 2006-06-20 8:55 ` Hans Hagen 1 sibling, 1 reply; 8+ messages in thread From: nico @ 2006-06-19 19:05 UTC (permalink / raw) On Mon, 19 Jun 2006 12:20:05 +0200, Hans Hagen <pragma@wxs.nl> wrote: > Helin Gai wrote: >> Hi, I'm new to ConTeXt and I'm preparing a document for my own >> reference. The source code is below. I came across a few weird >> issues: 1) I don't quite understand why the page break occurs on > because of \startbackground, best use textbackgrounds Hi Hans, since textbackground seems now the default background feature to use, do you plan to fix the textbackground overlapping trouble i submitted some time ago? Regards, BG ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Page breaking problem 2006-06-19 19:05 ` nico @ 2006-06-20 8:55 ` Hans Hagen 2006-06-20 19:46 ` nico 0 siblings, 1 reply; 8+ messages in thread From: Hans Hagen @ 2006-06-20 8:55 UTC (permalink / raw) nico wrote: > On Mon, 19 Jun 2006 12:20:05 +0200, Hans Hagen <pragma@wxs.nl> wrote: > > >> Helin Gai wrote: >> >>> Hi, I'm new to ConTeXt and I'm preparing a document for my own >>> reference. The source code is below. I came across a few weird >>> issues: 1) I don't quite understand why the page break occurs on >>> >> because of \startbackground, best use textbackgrounds >> > > Hi Hans, since textbackground seems now the default background feature to > use, do you plan to fix the textbackground overlapping trouble i submitted > some time ago? > remind me what it was ... Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl ----------------------------------------------------------------- ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Page breaking problem 2006-06-20 8:55 ` Hans Hagen @ 2006-06-20 19:46 ` nico 0 siblings, 0 replies; 8+ messages in thread From: nico @ 2006-06-20 19:46 UTC (permalink / raw) On Tue, 20 Jun 2006 10:55:43 +0200, Hans Hagen <pragma@wxs.nl> wrote: > nico wrote: >> >> Hi Hans, since textbackground seems now the default background feature >> to >> use, do you plan to fix the textbackground overlapping trouble i >> submitted >> some time ago? >> > remind me what it was ... In the case of mail [1] textbackground overlapped bottom footnote texts or top floats if the backgrounded stuff covered two pages. You suggested to use \chardef\kindofpagetextareas\plusone to prevent from this behaviour. Using this setting fixed it, but introduced some kind of vertical stretchiness failure so that page text can overlap a bottom footnote text as shown in the case of mail [2]. So, both textbackground/page modes have their limitation that makes textbackground use not satisfying. So, it would be great if it could be fixed. I haven't installed the latest context release yet, but there's the same behaviour with context live. Thanks, BG [1]: http://archive.contextgarden.net/message/20060523.101005.80b07059.en.html The test case: \definecolor[ScreenGray][s=.95] \definetextbackground[grayback] [background=color, backgroundcolor=ScreenGray, frame=on, strut=yes, width=broad, location=paragraph, framecolor=ScreenGray, leftoffset=\topskipgap, before=\blank, after=\blank, align=right] \starttext A footnote\footnote{Covered by the background, right?}. \input tufte \input tufte \input tufte \input tufte \starttextbackground[grayback] \input tufte \stoptextbackground \stoptext [2]: http://archive.contextgarden.net/message/20060524.162941.8a054666.en.html The test case: \chardef\kindofpagetextareas\plusone \setupcolors[state=start] \setupwhitespace[medium] % needed to activate the buggy stuff... \definetextbackground[listing][background=color] \starttext \input tufte\footnote{A footnote} blah blah blah blah blah \section{Section} \input tufte blah blah \startitemize \item a \item a \item a \item a \item a \item a \stopitemize \stoptext ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2006-06-20 19:46 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2006-06-19 9:39 Page breaking problem Helin Gai 2006-06-19 10:20 ` Hans Hagen 2006-06-19 10:45 ` Helin Gai 2006-06-19 18:51 ` nico 2006-06-19 23:28 ` Helin Gai 2006-06-19 19:05 ` nico 2006-06-20 8:55 ` Hans Hagen 2006-06-20 19:46 ` nico
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).