ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* sections, subsections, indenting, startnarrower, alignment
@ 2009-05-22 21:40 afsmith
  2009-05-26 12:05 ` Amaël Broustet
  0 siblings, 1 reply; 3+ messages in thread
From: afsmith @ 2009-05-22 21:40 UTC (permalink / raw)
  To: ntg-context

Hi again ntg-context.

I have been working on my own CV/Resume module. Up until now I've just
been asking about specific bits of the implementation of this thing I
want to do, but perhaps that was a mistake as it hasn't really helped
progress much, so:
What I am trying to achieve is to define some three-argument command
to give a section/subject header and a date, and then a block of text.
The header and date should be on the same line, but aligned in either
direction (subject aligned left, date aligned right)
This block of text underneath it should be indented and able to
include an instance of the same command. Let me try to explain the
desired output in a little monospaced text diagram..

|(Subject)_______________________(Date)|
|__(Subsubject)__________________(Date)|
|____texttexttexttexttexttexttexttext__|
|____textmoretextmoretextmoretexttext__|
|__(Subsubject)__________________(Date)|
|____texttexttexttexttexttextexttext___|
|____textmoretextmoretextmoretexttext__|

The "subject" and "subsubject" parts don't need to literally use
"\subject" , for example I also tried to use "\start(description){..."
for this purpose as well but that failed equally. Just something that
works reasonably as a section header.

I promise I have looked in the archives before asking :) for example
http://www.mail-archive.com/ntg-context@ntg.nl/msg21111.html
http://www.mail-archive.com/ntg-context@ntg.nl/msg37664.html
http://www.mail-archive.com/ntg-context@ntg.nl/msg11337.html
http://www.mail-archive.com/ntg-context@ntg.nl/msg17276.html

And here is an example of something I was playing with...

-------------------
\definehead[mysubject][subject]

\defineframed[lrframe][
width=\localhsize,
align=normal,
rulethickness=1pt]

\setuphead[mysubject][style={\bf}]
\define[3]\CHRONSUBJ
{\mysubject{\dontleavehmode\lrframe{#1\hfill#2}}
\startnarrower[left]{#3}\stopnarrower}

\showframe[text]
\starttext
\CHRONSUBJ
  {This happened from June 08 to June 09}
  {06/08--06/09}
  {\CHRONSUBJ
    {This happened from June 08 to December 08}
    {06/08--12/08}
    {\input tufte }
  \CHRONSUBJ
    {This happened from January 09 to June 09}
    {01/09--06/09}
    {\input zapf }}
\stoptext
-------------------

-A
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: sections, subsections, indenting, startnarrower, alignment
  2009-05-22 21:40 sections, subsections, indenting, startnarrower, alignment afsmith
@ 2009-05-26 12:05 ` Amaël Broustet
  0 siblings, 0 replies; 3+ messages in thread
From: Amaël Broustet @ 2009-05-26 12:05 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Wouldn't be easier to achieve this using section personalized section
numbering ?

Best,
Amaël  


Le vendredi 22 mai 2009 à 14:40 -0700, afsmith a écrit :
> Hi again ntg-context.
> 
> I have been working on my own CV/Resume module. Up until now I've just
> been asking about specific bits of the implementation of this thing I
> want to do, but perhaps that was a mistake as it hasn't really helped
> progress much, so:
> What I am trying to achieve is to define some three-argument command
> to give a section/subject header and a date, and then a block of text.
> The header and date should be on the same line, but aligned in either
> direction (subject aligned left, date aligned right)
> This block of text underneath it should be indented and able to
> include an instance of the same command. Let me try to explain the
> desired output in a little monospaced text diagram..
> 
> |(Subject)_______________________(Date)|
> |__(Subsubject)__________________(Date)|
> |____texttexttexttexttexttexttexttext__|
> |____textmoretextmoretextmoretexttext__|
> |__(Subsubject)__________________(Date)|
> |____texttexttexttexttexttextexttext___|
> |____textmoretextmoretextmoretexttext__|
> 
> The "subject" and "subsubject" parts don't need to literally use
> "\subject" , for example I also tried to use "\start(description){..."
> for this purpose as well but that failed equally. Just something that
> works reasonably as a section header.
> 
> I promise I have looked in the archives before asking :) for example
> http://www.mail-archive.com/ntg-context@ntg.nl/msg21111.html
> http://www.mail-archive.com/ntg-context@ntg.nl/msg37664.html
> http://www.mail-archive.com/ntg-context@ntg.nl/msg11337.html
> http://www.mail-archive.com/ntg-context@ntg.nl/msg17276.html
> 
> And here is an example of something I was playing with...
> 
> -------------------
> \definehead[mysubject][subject]
> 
> \defineframed[lrframe][
> width=\localhsize,
> align=normal,
> rulethickness=1pt]
> 
> \setuphead[mysubject][style={\bf}]
> \define[3]\CHRONSUBJ
> {\mysubject{\dontleavehmode\lrframe{#1\hfill#2}}
> \startnarrower[left]{#3}\stopnarrower}
> 
> \showframe[text]
> \starttext
> \CHRONSUBJ
>   {This happened from June 08 to June 09}
>   {06/08--06/09}
>   {\CHRONSUBJ
>     {This happened from June 08 to December 08}
>     {06/08--12/08}
>     {\input tufte }
>   \CHRONSUBJ
>     {This happened from January 09 to June 09}
>     {01/09--06/09}
>     {\input zapf }}
> \stoptext
> -------------------
> 
> -A
> ___________________________________________________________________________________
> 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  : https://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________

___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* sections, subsections, indenting, startnarrower, alignment
@ 2009-05-26 20:53 afsmith
  0 siblings, 0 replies; 3+ messages in thread
From: afsmith @ 2009-05-26 20:53 UTC (permalink / raw)
  To: ntg-context

I do not understand what you mean. Could you explain?

I stopped trying to use sections because I read somewhere in the
archives that sections cannot be used 'recursively' like this.
I have instead been trying to use definitions.


With regards to other approaches,  I have been trying to use several
different dimensions to solve this problem  but none of them seem to
work as expected inside the head of a definition inside a "narrowed",
such as \localhsize and \makeupwidth, which mangle things in
unexpected ways.

Can anyone tell me however if there is some dimension that corresponds
to the local amount of indentation (made with narrower)?

-A




> Wouldn't be easier to achieve this using section personalized section
> numbering ?
>
> Best,
> Amaël
>
>
> Le vendredi 22 mai 2009 à 14:40 -0700, afsmith a écrit :
> > Hi again ntg-context.
> >
> > I have been working on my own CV/Resume module. Up until now I've just
> > been asking about specific bits of the implementation of this thing I
> > want to do, but perhaps that was a mistake as it hasn't really helped
> > progress much, so:
> > What I am trying to achieve is to define some three-argument command
> > to give a section/subject header and a date, and then a block of text.
> > The header and date should be on the same line, but aligned in either
> > direction (subject aligned left, date aligned right)
> > This block of text underneath it should be indented and able to
> > include an instance of the same command. Let me try to explain the
> > desired output in a little monospaced text diagram..
> >
> > |(Subject)_______________________(Date)|
> > |__(Subsubject)__________________(Date)|
> > |____texttexttexttexttexttexttexttext__|
> > |____textmoretextmoretextmoretexttext__|
> > |__(Subsubject)__________________(Date)|
> > |____texttexttexttexttexttextexttext___|
> > |____textmoretextmoretextmoretexttext__|
> >
> > The "subject" and "subsubject" parts don't need to literally use
> > "\subject" , for example I also tried to use "\start(description){..."
> > for this purpose as well but that failed equally. Just something that
> > works reasonably as a section header.
> >
> > I promise I have looked in the archives before asking :) for example
> > http://www.mail-archive.com/ntg-context@ntg.nl/msg21111.html
> > http://www.mail-archive.com/ntg-context@ntg.nl/msg37664.html
> > http://www.mail-archive.com/ntg-context@ntg.nl/msg11337.html
> > http://www.mail-archive.com/ntg-context@ntg.nl/msg17276.html
> >
> > And here is an example of something I was playing with...
> >
> > -------------------
> > \definehead[mysubject][subject]
> >
> > \defineframed[lrframe][
> > width=\localhsize,
> > align=normal,
> > rulethickness=1pt]
> >
> > \setuphead[mysubject][style={\bf}]
> > \define[3]\CHRONSUBJ
> > {\mysubject{\dontleavehmode\lrframe{#1\hfill#2}}
> > \startnarrower[left]{#3}\stopnarrower}
> >
> > \showframe[text]
> > \starttext
> > \CHRONSUBJ
> >   {This happened from June 08 to June 09}
> >   {06/08--06/09}
> >   {\CHRONSUBJ
> >     {This happened from June 08 to December 08}
> >     {06/08--12/08}
> >     {\input tufte }
> >   \CHRONSUBJ
> >     {This happened from January 09 to June 09}
> >     {01/09--06/09}
> >     {\input zapf }}
> > \stoptext
> > -------------------
> >
> > -A
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-05-26 20:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-22 21:40 sections, subsections, indenting, startnarrower, alignment afsmith
2009-05-26 12:05 ` Amaël Broustet
2009-05-26 20:53 afsmith

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).