Re: [NTG-context] Left justify numbers on left margin edge
Aditya Mahajan wrote: > On Sun, 9 Jul 2006, Mojca Miklavec wrote: > > >> On 7/9/06, Aditya Mahajan wrote: >> Perhas a left=,right= pair of keywords could solve the problem (left= and right= surrounding the number; but then we would also have to surround the label with something as well), where the default of left= would be a space. \[whatever]commad= could also solve the problem. >>> left=Q works. The label is >>> >> Sigh! A prisoner sitting in the cell thinking about how to escape >> never realizes that the door is not locked at all. Thanks a lot. >> >> >>> , so this works >>> >> I won't ask where this is documented. >> > > I learnt it the hard way --- trial and error :) > > >>> \defineenumeration >>> [question] >>> [text=Question, >>> left=Q] >>> >>> \starttext >>> \startquestion[abc] >>> Why are there so many spaces in \in[abc]? >>> \stopquestion >>> \stoptext >>> >> If we're talking about \in-s, references, ... It would simplify my >> style file considerably if I was able to get the chapters labelled as >> C1, C1, ... instead of only 1, 2, ... I could get rid of left= which I >> do need when referencing to the questions. >> > > I would also like such a feature. I frequently have > > \defineitemgroup[features] > \setupitemgroup[features][each][left=(F,right=),stopper=] > \setupitemgroup[features][each][n,2*broad] > > and the I usually do > > \definereferenceformat[infeature][left=(F,right=)] > > and use \infeature. It would be nice if one could have > referenceleft and referenceright in most setup commands. > we can think of using labels; deep down the core: \setuplabeltext[\s!itemcount1={{I(},{)}}] \def\labeledcountervalue#1{\labeltexts{#1}{\countervalue{#1}}} etc etc; not that hard, but we need some rainy days and such (with instead if itemcount item:1 item:2 etc) this needs some work because itemize has its own numbering (historic reasons) so ... you can file a feature request and remind me every now and then 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 - ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Left justify numbers on left margin edge
On Sun, 9 Jul 2006, Mojca Miklavec wrote: > On 7/9/06, Aditya Mahajan wrote: >>> Perhas a >>>left=,right= >>> pair of keywords could solve the problem (left= and right= surrounding >>> the number; but then we would also have to surround the label with >>> something as well), where the default of left= would be a space. >>> \[whatever]commad= could also solve the problem. >>> >> >> left=Q works. The label is > > Sigh! A prisoner sitting in the cell thinking about how to escape > never realizes that the door is not locked at all. Thanks a lot. > >> , so this works > > I won't ask where this is documented. I learnt it the hard way --- trial and error :) >> \defineenumeration >> [question] >> [text=Question, >> left=Q] >> >> \starttext >> \startquestion[abc] >> Why are there so many spaces in \in[abc]? >> \stopquestion >> \stoptext > > If we're talking about \in-s, references, ... It would simplify my > style file considerably if I was able to get the chapters labelled as > C1, C1, ... instead of only 1, 2, ... I could get rid of left= which I > do need when referencing to the questions. I would also like such a feature. I frequently have \defineitemgroup[features] \setupitemgroup[features][each][left=(F,right=),stopper=] \setupitemgroup[features][each][n,2*broad] and the I usually do \definereferenceformat[infeature][left=(F,right=)] and use \infeature. It would be nice if one could have referenceleft and referenceright in most setup commands. Aditya > That means: > > \defineenumeration >[question] >[text=Question, > way=bychapter, > sectionnumber=yes, > separator={Q.}] > > \chapter{About Something} > > \section{First Section} > > \placeformula > \startformula > f(x)=x^2 > \stopformula > > \startquestion > Is it easy to do that? > \stopquestion > > \chapter{About Something Else} > > should give > > C1 About Something > C1.1First section > f(x)=x^2 (C1.1) > question C1Q.1 > > C2 About Something Else > > Mojca > > > PS: To David (and Aditya): why not simply > > \defineenumeration > [question] > [text=, > left=\labeltext{question}] > ___ > ntg-context mailing list > ntg-context@ntg.nl > http://www.ntg.nl/mailman/listinfo/ntg-context > > > -- Aditya Mahajan, EECS Systems, University of Michigan http://www.eecs.umich.edu/~adityam || Ph: 7342624008 ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Left justify numbers on left margin edge
On 7/9/06, Aditya Mahajan wrote: > > Perhas a > >left=,right= > > pair of keywords could solve the problem (left= and right= surrounding > > the number; but then we would also have to surround the label with > > something as well), where the default of left= would be a space. > > \[whatever]commad= could also solve the problem. > > > > left=Q works. The label is Sigh! A prisoner sitting in the cell thinking about how to escape never realizes that the door is not locked at all. Thanks a lot. > , so this works I won't ask where this is documented. > \defineenumeration > [question] > [text=Question, > left=Q] > > \starttext > \startquestion[abc] > Why are there so many spaces in \in[abc]? > \stopquestion > \stoptext If we're talking about \in-s, references, ... It would simplify my style file considerably if I was able to get the chapters labelled as C1, C1, ... instead of only 1, 2, ... I could get rid of left= which I do need when referencing to the questions. That means: \defineenumeration [question] [text=Question, way=bychapter, sectionnumber=yes, separator={Q.}] \chapter{About Something} \section{First Section} \placeformula \startformula f(x)=x^2 \stopformula \startquestion Is it easy to do that? \stopquestion \chapter{About Something Else} should give C1 About Something C1.1First section f(x)=x^2 (C1.1) question C1Q.1 C2 About Something Else Mojca PS: To David (and Aditya): why not simply \defineenumeration [question] [text=, left=\labeltext{question}] ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Left justify numbers on left margin edge
On Fri, 7 Jul 2006, David Arnold wrote: > All, > > Why is it I cannot get my numbers to abut up against the left margin > edge? They are always a few points indented. I guess that this is because the text not empty. > \setuplabeltext[question=] > > \defineenumeration > [question] > [text=\labeltext{question}] This works, \defineenumeration [question] [text=] Or \defineeneumeration [question] [text=\labeltext{question}, left=\unskip] But both will behave incorrectly if you decide to set the label to something else in the future. Aditya > > \setupenumerations > [question] > [location=left, > width=broad, > hang=1, > headcolor=green, > right=., > way=bysection, > sectionnumber=no] > > \starttext > > \noindent Now is the time for all good men to come to the aid of > their county. Now is the time for all good men to come to the aid of > their county. Now is the time for all good men to come to the aid of > their county. Now is the time for all good men to come to the aid of > their county. Now is the time for all good men to come to the aid of > their county. Now is the time for all good men to come to the aid of > their county. > > \startquestion > An icon is a representation of an action or the name of a computer > program. Icons are frequently used in operating systems on several > computer platforms. > \stopquestion > > \startquestion > An icon is a representation of an action or the name of a computer > program. Icons are frequently used in operating systems on several > computer platforms. > \stopquestion > > \startquestion > An icon is a representation of an action or the name of a computer > program. Icons are frequently used in operating systems on several > computer platforms. > \stopquestion > > \startquestion > An icon is a representation of an action or the name of a computer > program. Icons are frequently used in operating systems on several > computer platforms. > \stopquestion > > \startquestion > An icon is a representation of an action or the name of a computer > program. Icons are frequently used in operating systems on several > computer platforms. > \stopquestion > > \startquestion > An icon is a representation of an action or the name of a computer > program. Icons are frequently used in operating systems on several > computer platforms. > \stopquestion > > > \stoptext > > ___ > ntg-context mailing list > ntg-context@ntg.nl > http://www.ntg.nl/mailman/listinfo/ntg-context > > > -- Aditya Mahajan, EECS Systems, University of Michigan http://www.eecs.umich.edu/~adityam || Ph: 7342624008 ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Left justify numbers on left margin edge
On Sun, 9 Jul 2006, Mojca Miklavec wrote: > On 7/7/06, David Arnold wrote: >> All, >> >> Why is it I cannot get my numbers to abut up against the left margin >> edge? They are always a few points indented. >> >> \setuplabeltext[question=] >> >> \defineenumeration >> [question] >> [text=\labeltext{question}] >> >> \setupenumerations >> [question] >> [location=left, >> width=broad, >> hang=1, >> headcolor=green, >> right=., >> way=bysection, >> sectionnumber=no] >> >> \starttext >> >> \startquestion >> An icon is a representation of an action or the name of a computer >> program. Icons are frequently used in operating systems on several >> computer platforms. >> \stopquestion >> >> \stoptext > > It seems that you're reading my mind. I guess that it must be > approximately the same reason as why I can't get > > Question Q1 > Question Q2 > > With >\defineenumeration > [question] > [text=Question Q] >\startquestion >Why are there so many spaces? >\stopquestion > I get Question Q 1 (but I can't find a way to get Q1 as is possible in > sections - the space seems to be there by default). > > I thought that >headcommand=\myquestioncommand > (command spotted when I took a look at texshow, it's not in the manual) and >\def\myquestioncommand#1{Question Q#1} > would solve that, but I don't see any evidence of \myquestioncommand > ever being called/executed. > > I would be very happy if this issue was solved as well. Perhas a >left=,right= > pair of keywords could solve the problem (left= and right= surrounding > the number; but then we would also have to surround the label with > something as well), where the default of left= would be a space. > \[whatever]commad= could also solve the problem. > left=Q works. The label is , so this works \defineenumeration [question] [text=Question, left=Q] \starttext \startquestion[abc] Why are there so many spaces in \in[abc]? \stopquestion \stoptext ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Left justify numbers on left margin edge
On 7/7/06, David Arnold wrote: > All, > > Why is it I cannot get my numbers to abut up against the left margin > edge? They are always a few points indented. > > \setuplabeltext[question=] > > \defineenumeration > [question] > [text=\labeltext{question}] > > \setupenumerations > [question] > [location=left, > width=broad, > hang=1, > headcolor=green, > right=., > way=bysection, > sectionnumber=no] > > \starttext > > \startquestion > An icon is a representation of an action or the name of a computer > program. Icons are frequently used in operating systems on several > computer platforms. > \stopquestion > > \stoptext It seems that you're reading my mind. I guess that it must be approximately the same reason as why I can't get Question Q1 Question Q2 With \defineenumeration [question] [text=Question Q] \startquestion Why are there so many spaces? \stopquestion I get Question Q 1 (but I can't find a way to get Q1 as is possible in sections - the space seems to be there by default). I thought that headcommand=\myquestioncommand (command spotted when I took a look at texshow, it's not in the manual) and \def\myquestioncommand#1{Question Q#1} would solve that, but I don't see any evidence of \myquestioncommand ever being called/executed. I would be very happy if this issue was solved as well. Perhas a left=,right= pair of keywords could solve the problem (left= and right= surrounding the number; but then we would also have to surround the label with something as well), where the default of left= would be a space. \[whatever]commad= could also solve the problem. Mojca ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context