* Hello world title not flush left - beginner question? @ 2011-11-02 16:38 Grant William (ST-CO/ENG3.11) 2011-11-03 13:36 ` Wolfgang Schuster 0 siblings, 1 reply; 5+ messages in thread From: Grant William (ST-CO/ENG3.11) @ 2011-11-02 16:38 UTC (permalink / raw) To: ntg-context [-- Attachment #1.1: Type: text/plain, Size: 837 bytes --] Hi all, I am a novice user of latex and have always wanted to have more control over how things look and are set up. Context is perfect! But now I am stuck on a frustrating bug I can't seem to figure out. Maybe this is not a bug at all... Nontheless, in the Hello World http://wiki.contextgarden.net/Hello_world example page, upon building my own version and looking closely, the title text is not lined up to the left edge of the text area, whereas the following line for the A. U. Thor is flushed over correctly. The example pdf on the page is like this as well, but when I turn on \showframe and look at in on my computer, the offset is just screaming at me! I can't seem to figure out what portion of the \setuphead[title] code is causing this. Is this a bug or what is going on here? Thanks. William Grant [-- Attachment #1.2: Type: text/html, Size: 1712 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: Hello world title not flush left - beginner question? 2011-11-02 16:38 Hello world title not flush left - beginner question? Grant William (ST-CO/ENG3.11) @ 2011-11-03 13:36 ` Wolfgang Schuster [not found] ` <20111103141534.GC1412@iram-ha-003840.extra.cea.fr> 0 siblings, 1 reply; 5+ messages in thread From: Wolfgang Schuster @ 2011-11-03 13:36 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 1635 bytes --] Am 02.11.2011 um 17:38 schrieb Grant William (ST-CO/ENG3.11): > Hi all, > > I am a novice user of latex and have always wanted to have more control over how things look and are set up. Context is perfect! > > But now I am stuck on a frustrating bug I can't seem to figure out. Maybe this is not a bug at all… > > Nontheless, in the Hello World http://wiki.contextgarden.net/Hello_world example page, upon building my own version and looking closely, the title text is not lined up to the left edge of the text area, whereas the following line for the A. U. Thor is flushed over correctly. > > The example pdf on the page is like this as well, but when I turn on \showframe and look at in on my computer, the offset is just screaming at me! I can't seem to figure out what portion of the \setuphead[title] code is causing this. > > Is this a bug or what is going on here? I can’t say without testing the code but it’s something you should try to avoid, especially because MkIV provides a better mechanism to place material after a heading: \def\startdictum {\dostartbuffer[dictum][startdictum][stopdictum]} \setuphead [title] [insidesection=\texsetup{dictum}] \startsetups dictum \doifelsebuffer{dictum} {\startframedtext[right][frame=off,offset=none,width=.5\textwidth,foregroundstyle=\itx] \getbuffer [dictum] \resetbuffer[dictum] \stopframedtext} {\donothing} \stopsetups \starttext \startdictum \input ward \stopdictum \starttitle[title=This is a heading with a epgigraph below] \input knuth \stoptitle \stoptext Wolfgang [-- Attachment #1.2: Type: text/html, Size: 3337 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
[parent not found: <20111103141534.GC1412@iram-ha-003840.extra.cea.fr>]
* Re: Hello world title not flush left - beginner question? [not found] ` <20111103141534.GC1412@iram-ha-003840.extra.cea.fr> @ 2011-11-03 14:33 ` Wolfgang Schuster 2011-11-03 14:51 ` Alan Braslau 0 siblings, 1 reply; 5+ messages in thread From: Wolfgang Schuster @ 2011-11-03 14:33 UTC (permalink / raw) To: Alan Braslau; +Cc: mailing list for ConTeXt users Am 03.11.2011 um 15:15 schrieb Alan Braslau: > On Thu, Nov 03, 2011 at 02:36:06PM +0100, Wolfgang Schuster wrote: >> >> \def\startdictum >> {\dostartbuffer[dictum][startdictum][stopdictum]} >> >> \setuphead >> [title] >> [insidesection=\texsetup{dictum}] >> >> \startsetups dictum >> >> \doifelsebuffer{dictum} >> {\startframedtext[right][frame=off,offset=none,width=.5\ >> textwidth,foregroundstyle=\itx] >> \getbuffer [dictum] >> \resetbuffer[dictum] >> \stopframedtext} >> {\donothing} >> >> \stopsetups >> >> \starttext >> >> \startdictum >> \input ward >> \stopdictum >> >> \starttitle[title=This is a heading with a epgigraph below] >> >> \input knuth >> >> \stoptitle >> >> \stoptext > > Wolfgang, > > Looking at your message above, > I do not really understand why it is best to set a buffer > for a one-time use: to be typeset after the title and then reset. This was just a example to demonstrate the “insidesection” key to add something after the heading. When you want to use it only one time the above is overkill but it’s useful when you want a epigraph for each chapter. With \doifelsebuffer I can check if there the user set a epigraph and only when there is one i want the framedtext but I have to reset the buffer for the next chapter. > Would it not be better (or more logical, in fact) to simply use: > > \setupframedtext [frame=off,offset=none,width=.5\textwidth, > foregroundstyle=\itx] > % I did not check, but I imagine that this works... > > \starttitle [title=This is a heading with an epigraph below] > > \startframedtext [right] > \input ward > \stopframedtext > > > Of course, one could (and probably should) define a special sort > of framed text? > I don't remember the proper syntax for this, though. How is a framedtext more logical than a dictum or epigraph environment, with my solution you can also change the definition of the code to place the epigraph format without any change in the text while your framed text is always a framedtext (I know you can avoid this with a named framedtext) and changes to the layout require more work. > I am interested, as in one of my documents, I do something like this > (without any special typesetting, for the moment) stupidly as: > > \def\sectionbis#1{{\it #1}\blank} > > \startsection [title=Section title] > > \sectionbis{\input ward} > > \input tufte \definestartstop[sectionbis][style=italic,inbetween=\blank] 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: Hello world title not flush left - beginner question? 2011-11-03 14:33 ` Wolfgang Schuster @ 2011-11-03 14:51 ` Alan Braslau 2011-11-03 15:38 ` Wolfgang Schuster 0 siblings, 1 reply; 5+ messages in thread From: Alan Braslau @ 2011-11-03 14:51 UTC (permalink / raw) To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users On Thu, Nov 03, 2011 at 03:33:48PM +0100, Wolfgang Schuster wrote: > > How is a framedtext more logical than a dictum or epigraph environment, > with my solution you can also change the definition of the code to place > the epigraph format without any change in the text while your framed text > is always a framedtext (I know you can avoid this with a named framedtext) > and changes to the layout require more work. > Thanks for the explanation. It is not too logical, however, to define a dictum or epigraph *before* the start of a new section or chapter. An author does not really think this way. Of course, it is logical to define a dictum or epigraph environment that can be used as in: \startchapter [title=Chapter title] \startepigraph \input ward \stopepigraph \stopchapter It is indeed overkill to use a buffer as in your example. However, there may be a very good reason to more closely tie the epigraph to the typesetting of the chapter title. I could then see something like: \startchapter [title={Chapter title},epigraph={\input ward}] although I'm sure that the above (untested) syntax would cause problems with \input... (and probably a \par would be needed somewhere). Alan ___________________________________________________________________________________ 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: Hello world title not flush left - beginner question? 2011-11-03 14:51 ` Alan Braslau @ 2011-11-03 15:38 ` Wolfgang Schuster 0 siblings, 0 replies; 5+ messages in thread From: Wolfgang Schuster @ 2011-11-03 15:38 UTC (permalink / raw) To: Alan Braslau; +Cc: mailing list for ConTeXt users Am 03.11.2011 um 15:51 schrieb Alan Braslau: > On Thu, Nov 03, 2011 at 03:33:48PM +0100, Wolfgang Schuster wrote: >> >> How is a framedtext more logical than a dictum or epigraph environment, >> with my solution you can also change the definition of the code to place >> the epigraph format without any change in the text while your framed text >> is always a framedtext (I know you can avoid this with a named framedtext) >> and changes to the layout require more work. >> > > Thanks for the explanation. > > It is not too logical, however, to define a dictum or epigraph *before* the start of a new section or chapter. An author does not really think this way. Of course, it is logical to define a dictum or epigraph environment that can be used as in: > > \startchapter [title=Chapter title] > > \startepigraph > \input ward > \stopepigraph > > \stopchapter The are reasons to put the epigraph environment before and after \startchapter but the purpose of my example was the inside section key and for this i needed to before \startchapter. > It is indeed overkill to use a buffer as in your example. However, there may be a very good reason to more closely tie the epigraph to the typesetting of the chapter title. I could then see something like: > > \startchapter [title={Chapter title},epigraph={\input ward}] > > although I'm sure that the above (untested) syntax would cause problems > with \input... (and probably a \par would be needed somewhere). For a longer text \startchapter isn’t prefect but you can load a text with a reference from \startchapter, e.g. with this modification of my former example you can load a previously set buffer with the dictum key. \def\startdictum {\dosingleempty\dostartdictum} \def\dostartdictum[#1]% {\dostartbuffer[dictum\iffirstargument:#1\fi][startdictum][stopdictum]} \setuphead [title] [insidesection=\texsetup{dictum}] \startsetups dictum \doifelsebuffer{dictum:\structureuservariable{dictum}} {\startframedtext[right][frame=off,offset=none,width=.5\textwidth,foregroundstyle=\itx] \getbuffer[dictum:\structureuservariable{dictum}] \stopframedtext} {\doifelsebuffer{dictum} {\startframedtext[right][frame=off,offset=none,width=.5\textwidth,foregroundstyle=\itx] \getbuffer [dictum] \resetbuffer[dictum] \stopframedtext} {\donothing}} \stopsetups \startdictum[zapf] \input zapf \stopdictum \starttext \starttitle[title=This is a heading with a epgigraph below][dictum=zapf] \input knuth \stoptitle \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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-11-03 15:38 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2011-11-02 16:38 Hello world title not flush left - beginner question? Grant William (ST-CO/ENG3.11) 2011-11-03 13:36 ` Wolfgang Schuster [not found] ` <20111103141534.GC1412@iram-ha-003840.extra.cea.fr> 2011-11-03 14:33 ` Wolfgang Schuster 2011-11-03 14:51 ` Alan Braslau 2011-11-03 15:38 ` 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).