ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Changing margins mid-page?
@ 2008-10-14  5:31 Rory Molinari
  2008-10-14  6:50 ` Wolfgang Schuster
  0 siblings, 1 reply; 7+ messages in thread
From: Rory Molinari @ 2008-10-14  5:31 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi,

I'm sorry that the subject isn't clearer.

I'm learning ConTeXt at the moment by trying to typeset a copy of my  
resume.

I'd like the format to be something like this (view in fixed width):



                                     <Address line 1>     <phone number>
                                     <Address line 2>     <email  
address>

<MY NAME IN LARGE SIZE>
---------------------------------------------------------------------------

EDUCATION               <Details>
                         <of Degree 1>

                         <Details>
                         <of Degree 2>



WORK EXPERIENCE         <Details>
                         <of>
                         <most>
                         <recent>
                         <job>
                         <many lines here>


                         <Details>
                         <of>
                         <another>
                         <job>


                         <Yet another job>



ANOTHER SECTION         <More information>
                         <appropriate for this>
                         <section>



My first thought was to have "EDUCATION", "WORK EXPERIENCE", etc as  
unnumbered sections, and to arrange that section titles would appear  
in a (very large) left margin.  But then I couldn't work out how to  
have "normal" margins for the top of the page containing my contact  
information and name.  Margins appear to apply to the whole document.


So I tried a hack using paragraphs in two columns.  The left column is  
the section heading and the right column is the information.

Example:

\defineparagraphs[TwoColumns][n=2]
\setupparagraphs[TwoColumns][1][width=1.5in]

\startTwoColumns
\tfb\ss Education
\TwoColumns

%% details for one degree here

\blank[medium]

%% details of another degree here
\stopTwoColumns


The problem with this is that this setup cannot break across pages, so  
when a section becomes too long it first starts on a new page and then  
runs off the bottom of that page.


What is the right way to typeset this?

Cheers,
Rory Molinari
___________________________________________________________________________________
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] 7+ messages in thread

* Re: Changing margins mid-page?
  2008-10-14  5:31 Changing margins mid-page? Rory Molinari
@ 2008-10-14  6:50 ` Wolfgang Schuster
  2008-10-14 14:59   ` Rory Molinari
  2008-10-14 20:28   ` Alexandros Frantzis
  0 siblings, 2 replies; 7+ messages in thread
From: Wolfgang Schuster @ 2008-10-14  6:50 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Tue, Oct 14, 2008 at 7:31 AM, Rory Molinari
<context@quokka70.fastmail.fm> wrote:
> Hi,
>
> I'm sorry that the subject isn't clearer.
>
> I'm learning ConTeXt at the moment by trying to typeset a copy of my
> resume.
>
> I'd like the format to be something like this (view in fixed width):
>
>
>
>                                     <Address line 1>     <phone number>
>                                     <Address line 2>     <email
> address>
>
> <MY NAME IN LARGE SIZE>
> ---------------------------------------------------------------------------
>
> EDUCATION               <Details>
>                         <of Degree 1>
>
>                         <Details>
>                         <of Degree 2>
>
>
>
> WORK EXPERIENCE         <Details>
>                         <of>
>                         <most>
>                         <recent>
>                         <job>
>                         <many lines here>
>
>
>                         <Details>
>                         <of>
>                         <another>
>                         <job>
>
>
>                         <Yet another job>
>
>
>
> ANOTHER SECTION         <More information>
>                         <appropriate for this>
>                         <section>
>
>
>
> My first thought was to have "EDUCATION", "WORK EXPERIENCE", etc as
> unnumbered sections, and to arrange that section titles would appear
> in a (very large) left margin.  But then I couldn't work out how to
> have "normal" margins for the top of the page containing my contact
> information and name.  Margins appear to apply to the whole document.
>
>
> So I tried a hack using paragraphs in two columns.  The left column is
> the section heading and the right column is the information.
>
> Example:
>
> \defineparagraphs[TwoColumns][n=2]
> \setupparagraphs[TwoColumns][1][width=1.5in]
>
> \startTwoColumns
> \tfb\ss Education
> \TwoColumns
>
> %% details for one degree here
>
> \blank[medium]
>
> %% details of another degree here
> \stopTwoColumns
>
>
> The problem with this is that this setup cannot break across pages, so
> when a section becomes too long it first starts on a new page and then
> runs off the bottom of that page.
>
>
> What is the right way to typeset this?

Use descriptions, it's possible to set a left margin and break the text
across pages.

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


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

* Re: Changing margins mid-page?
  2008-10-14  6:50 ` Wolfgang Schuster
@ 2008-10-14 14:59   ` Rory Molinari
  2008-10-14 20:28   ` Alexandros Frantzis
  1 sibling, 0 replies; 7+ messages in thread
From: Rory Molinari @ 2008-10-14 14:59 UTC (permalink / raw)
  To: mailing list for ConTeXt users


On Oct 13, 2008, at 11:50 PM, Wolfgang Schuster wrote:

> On Tue, Oct 14, 2008 at 7:31 AM, Rory Molinari
> <context@quokka70.fastmail.fm> wrote:
>>

[Description of my problem, and a failed solution using paragraphs]
>> The problem with this is that this setup cannot break across pages,  
>> so
>> when a section becomes too long it first starts on a new page and  
>> then
>> runs off the bottom of that page.
>>
>>
>> What is the right way to typeset this?
>
> Use descriptions, it's possible to set a left margin and break the  
> text
> across pages.

Thanks Wolfgang!  That is exactly what I needed.

Cheers,
Rory

>
>
> 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  : 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] 7+ messages in thread

* Re: Changing margins mid-page?
  2008-10-14  6:50 ` Wolfgang Schuster
  2008-10-14 14:59   ` Rory Molinari
@ 2008-10-14 20:28   ` Alexandros Frantzis
  2008-10-15 19:13     ` Roars
                       ` (2 more replies)
  1 sibling, 3 replies; 7+ messages in thread
From: Alexandros Frantzis @ 2008-10-14 20:28 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Tue, Oct 14, 2008 at 08:50:20AM +0200, Wolfgang Schuster wrote:
> On Tue, Oct 14, 2008 at 7:31 AM, Rory Molinari
> <context@quokka70.fastmail.fm> wrote:
> > Hi,
> >
> > I'm sorry that the subject isn't clearer.
> >
> > I'm learning ConTeXt at the moment by trying to typeset a copy of my
> > resume.
> >
> > I'd like the format to be something like this (view in fixed width):
> >
> >
> >
> >                                     <Address line 1>     <phone number>
> >                                     <Address line 2>     <email
> > address>
> >
> > <MY NAME IN LARGE SIZE>
> > ---------------------------------------------------------------------------
> >
> > EDUCATION               <Details>
> >                         <of Degree 1>
> >
> >                         <Details>
> >                         <of Degree 2>
> >
> >
> >
> > WORK EXPERIENCE         <Details>
> >                         <of>
> >                         <most>
> >                         <recent>
> >                         <job>
> >                         <many lines here>
> >
> >
> >                         <Details>
> >                         <of>
> >                         <another>
> >                         <job>
> >
> >
> >                         <Yet another job>
> >
> >
> >
> > ANOTHER SECTION         <More information>
> >                         <appropriate for this>
> >                         <section>
> >
> >
> >
> > My first thought was to have "EDUCATION", "WORK EXPERIENCE", etc as
> > unnumbered sections, and to arrange that section titles would appear
> > in a (very large) left margin.  But then I couldn't work out how to
> > have "normal" margins for the top of the page containing my contact
> > information and name.  Margins appear to apply to the whole document.
> >

[snip]

> >
> > What is the right way to typeset this?
> 
> Use descriptions, it's possible to set a left margin and break the text
> across pages.
> 

Hello,

I, too, am trying to create a similar CV layout. As I have already
reported in other emails to the list, I have been having trouble when
the first thing after the title is an enumeration. More specifically,
the first item of the enumeration is not aligned with the title in the
margin (it is always placed a bit below). Unfortunately, this still
happens when using descriptions.

A way around this is to use something like \setupitemize[before=\vskip -20pt].
But this is specific to the font sizes I am using and a bit ugly. I have tried
suppressing the whitespace around itemizations (nowhite, joinedup) and/or using
stuff like \blank[disable] and \blank[back] but to no avail.

Does anyone know of a better, more generic way of doing this or even if
it is possible (judging from the lack of answers to my previous posts I
am guessing this is not something trivial)?

Thanks,
Alexandros

------------------- START CODE ------------------------
\definedescription[desc][location=inmargin,width=broad]

\starttext

\startdesc{Description1}
This is the text of desc1.
This is the text of desc1.
This is the text of desc1.
This is the text of desc1.
This is the text of desc1.
This is the text of desc1.
This is the text of desc1.
\stopdesc

\startdesc{Description2}

\startitemize[packed,nowhite,joinedup]
\item First item (should be right next to title)
\item Second item
\item Third item
\stopitemize

\stopdesc

\stoptext
-------------------- END CODE ------------------------

___________________________________________________________________________________
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] 7+ messages in thread

* Re: Changing margins mid-page?
  2008-10-14 20:28   ` Alexandros Frantzis
@ 2008-10-15 19:13     ` Roars
  2008-10-16  7:17     ` Wolfgang Schuster
  2008-10-21  8:27     ` Wolfgang Schuster
  2 siblings, 0 replies; 7+ messages in thread
From: Roars @ 2008-10-15 19:13 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Alexandros Frantzis wrote:

> Hello,
> 
> I, too, am trying to create a similar CV layout. As I have already
> reported in other emails to the list, I have been having trouble when
> the first thing after the title is an enumeration. More specifically,
> the first item of the enumeration is not aligned with the title in the
> margin (it is always placed a bit below). Unfortunately, this still
> happens when using descriptions.


Have you tried turning on some of TeX's tracing features to see what 
boxes and glue appear in the vertical list just before the itemize?  (My 
copy of the TeXbook is not with me right now and I don't remember how to 
turn on tracing.)  ConTeXt has \showboxes and \showskips, but I'm not 
sure how to interpret the results in your case.

If you add \showboxes just before your second \startdesc you'll see that 
the top left corner of the itemize section coincides with the bottom 
right of the description text.  I'm not sure what this means, though, 
and why normal text (or a \vrule) appears on the same line as the 
description.

Cheers,
Rory

___________________________________________________________________________________
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] 7+ messages in thread

* Re: Changing margins mid-page?
  2008-10-14 20:28   ` Alexandros Frantzis
  2008-10-15 19:13     ` Roars
@ 2008-10-16  7:17     ` Wolfgang Schuster
  2008-10-21  8:27     ` Wolfgang Schuster
  2 siblings, 0 replies; 7+ messages in thread
From: Wolfgang Schuster @ 2008-10-16  7:17 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Tue, Oct 14, 2008 at 10:28 PM, Alexandros Frantzis
<alfius@freemail.gr> wrote:
>
> I, too, am trying to create a similar CV layout. As I have already
> reported in other emails to the list, I have been having trouble when
> the first thing after the title is an enumeration. More specifically,
> the first item of the enumeration is not aligned with the title in the
> margin (it is always placed a bit below). Unfortunately, this still
> happens when using descriptions.
>
> A way around this is to use something like \setupitemize[before=\vskip -20pt].
> But this is specific to the font sizes I am using and a bit ugly. I have tried
> suppressing the whitespace around itemizations (nowhite, joinedup) and/or using
> stuff like \blank[disable] and \blank[back] but to no avail.
>
> Does anyone know of a better, more generic way of doing this or even if
> it is possible (judging from the lack of answers to my previous posts I
> am guessing this is not something trivial)?
>
> Thanks,
> Alexandros
>
> ------------------- START CODE ------------------------
> \definedescription[desc][location=inmargin,width=broad]
>
> \starttext
>
> \startdesc{Description1}
> This is the text of desc1.
> This is the text of desc1.
> This is the text of desc1.
> This is the text of desc1.
> This is the text of desc1.
> This is the text of desc1.
> This is the text of desc1.
> \stopdesc
>
> \startdesc{Description2}
>
> \startitemize[packed,nowhite,joinedup]
> \item First item (should be right next to title)
> \item Second item
> \item Third item
> \stopitemize
>
> \stopdesc

\startdesc{Description2}
%
\quad\startitemize[text,packed,nowhite,joinedup]
\item First item (should be right next to title)\par
\item Second item\par
\item Third item
\stopitemize

\stopdesc

> \stoptext
> -------------------- END CODE ------------------------

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


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

* Re: Changing margins mid-page?
  2008-10-14 20:28   ` Alexandros Frantzis
  2008-10-15 19:13     ` Roars
  2008-10-16  7:17     ` Wolfgang Schuster
@ 2008-10-21  8:27     ` Wolfgang Schuster
  2 siblings, 0 replies; 7+ messages in thread
From: Wolfgang Schuster @ 2008-10-21  8:27 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Tue, Oct 14, 2008 at 10:28 PM, Alexandros Frantzis
<alfius@freemail.gr> wrote:
> On Tue, Oct 14, 2008 at 08:50:20AM +0200, Wolfgang Schuster wrote:
>> On Tue, Oct 14, 2008 at 7:31 AM, Rory Molinari
>> <context@quokka70.fastmail.fm> wrote:
>> > Hi,
>> >
>> > I'm sorry that the subject isn't clearer.
>> >
>> > I'm learning ConTeXt at the moment by trying to typeset a copy of my
>> > resume.
>> >
>> > I'd like the format to be something like this (view in fixed width):
>> >
>> >
>> >
>> >                                     <Address line 1>     <phone number>
>> >                                     <Address line 2>     <email
>> > address>
>> >
>> > <MY NAME IN LARGE SIZE>
>> > ---------------------------------------------------------------------------
>> >
>> > EDUCATION               <Details>
>> >                         <of Degree 1>
>> >
>> >                         <Details>
>> >                         <of Degree 2>
>> >
>> >
>> >
>> > WORK EXPERIENCE         <Details>
>> >                         <of>
>> >                         <most>
>> >                         <recent>
>> >                         <job>
>> >                         <many lines here>
>> >
>> >
>> >                         <Details>
>> >                         <of>
>> >                         <another>
>> >                         <job>
>> >
>> >
>> >                         <Yet another job>
>> >
>> >
>> >
>> > ANOTHER SECTION         <More information>
>> >                         <appropriate for this>
>> >                         <section>
>> >
>> >
>> >
>> > My first thought was to have "EDUCATION", "WORK EXPERIENCE", etc as
>> > unnumbered sections, and to arrange that section titles would appear
>> > in a (very large) left margin.  But then I couldn't work out how to
>> > have "normal" margins for the top of the page containing my contact
>> > information and name.  Margins appear to apply to the whole document.
>> >
>
> [snip]
>
>> >
>> > What is the right way to typeset this?
>>
>> Use descriptions, it's possible to set a left margin and break the text
>> across pages.
>>
>
> Hello,
>
> I, too, am trying to create a similar CV layout. As I have already
> reported in other emails to the list, I have been having trouble when
> the first thing after the title is an enumeration. More specifically,
> the first item of the enumeration is not aligned with the title in the
> margin (it is always placed a bit below). Unfortunately, this still
> happens when using descriptions.
>
> A way around this is to use something like \setupitemize[before=\vskip -20pt].
> But this is specific to the font sizes I am using and a bit ugly. I have tried
> suppressing the whitespace around itemizations (nowhite, joinedup) and/or using
> stuff like \blank[disable] and \blank[back] but to no avail.
>
> Does anyone know of a better, more generic way of doing this or even if
> it is possible (judging from the lack of answers to my previous posts I
> am guessing this is not something trivial)?
>
> Thanks,
> Alexandros
>
> ------------------- START CODE ------------------------
> \definedescription[desc][location=inmargin,width=broad]
>
> \starttext
>
> \startdesc{Description1}
> This is the text of desc1.
> This is the text of desc1.
> This is the text of desc1.
> This is the text of desc1.
> This is the text of desc1.
> This is the text of desc1.
> This is the text of desc1.
> \stopdesc
>
> \startdesc{Description2}
>
> \startitemize[packed,nowhite,joinedup]

\settrue\concatnextitem

> \item First item (should be right next to title)
> \item Second item
> \item Third item
> \stopitemize
>
> \stopdesc
>
> \stoptext

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


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

end of thread, other threads:[~2008-10-21  8:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-14  5:31 Changing margins mid-page? Rory Molinari
2008-10-14  6:50 ` Wolfgang Schuster
2008-10-14 14:59   ` Rory Molinari
2008-10-14 20:28   ` Alexandros Frantzis
2008-10-15 19:13     ` Roars
2008-10-16  7:17     ` Wolfgang Schuster
2008-10-21  8:27     ` Wolfgang Schuster

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