ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* problem with def
@ 2010-05-12 14:46 John Culleton
  2010-05-12 14:52 ` Taco Hoekwater
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: John Culleton @ 2010-05-12 14:46 UTC (permalink / raw)
  To: mailing list for ConTeXt users

In plain pdftex I can define a string thus:
\def\booktitle{My Book Title}

and then reuse it later as
\rightline{\bf\booktitle}
 But in Context when I use
\rightaligned{\bf\booktitle}

it errors on the tag \booktitle

I tried \the\booktitle but that didn't work either.
-- 
John Culleton
Wexford Press
"Create Book Covers with Scribus"
Printable E-book 38 pages $5.95
http://www.scribd.com/doc/24676863/
http://www.booklocker.com/books/4055.html
___________________________________________________________________________________
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] 7+ messages in thread

* Re: problem with def
  2010-05-12 14:46 problem with def John Culleton
@ 2010-05-12 14:52 ` Taco Hoekwater
  2010-05-12 19:21   ` John Culleton
  2010-05-12 14:52 ` luigi scarso
  2010-05-12 17:58 ` Wolfgang Schuster
  2 siblings, 1 reply; 7+ messages in thread
From: Taco Hoekwater @ 2010-05-12 14:52 UTC (permalink / raw)
  To: mailing list for ConTeXt users

John Culleton wrote:
> In plain pdftex I can define a string thus:
> \def\booktitle{My Book Title}
> 
> and then reuse it later as
> \rightline{\bf\booktitle}
>  But in Context when I use
> \rightaligned{\bf\booktitle}
> 
> it errors on the tag \booktitle

This definitely should work, so you should post a minimal
example (are you defining \booktitle inside a group?)

> I tried \the\booktitle but that didn't work either.

This should not work.

Best wishes,
Taco
___________________________________________________________________________________
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] 7+ messages in thread

* Re: problem with def
  2010-05-12 14:46 problem with def John Culleton
  2010-05-12 14:52 ` Taco Hoekwater
@ 2010-05-12 14:52 ` luigi scarso
  2010-05-12 16:52   ` Otared Kavian
  2010-05-12 17:58 ` Wolfgang Schuster
  2 siblings, 1 reply; 7+ messages in thread
From: luigi scarso @ 2010-05-12 14:52 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Wed, May 12, 2010 at 4:46 PM, John Culleton <john@wexfordpress.com> wrote:
> In plain pdftex I can define a string thus:
> \def\booktitle{My Book Title}
>
> and then reuse it later as
> \rightline{\bf\booktitle}
>  But in Context when I use
> \rightaligned{\bf\booktitle}
>
> it errors on the tag \booktitle
>
> I tried \the\booktitle but that didn't work either.
no problem here with last current

\def\booktitle{My Book Title}
\showframe
\starttext
then reuse it later as
\rightline{\bf\booktitle}
 But in Context when I use
\rightaligned{\bf\booktitle}
\stoptext

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

* Re: problem with def
  2010-05-12 14:52 ` luigi scarso
@ 2010-05-12 16:52   ` Otared Kavian
  2010-05-12 18:07     ` luigi scarso
  0 siblings, 1 reply; 7+ messages in thread
From: Otared Kavian @ 2010-05-12 16:52 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1509 bytes --]


On 12 mai 2010, at 16:52, luigi scarso wrote:

> no problem here with last current
> 
> \def\booktitle{My Book Title}
> \showframe
> \starttext
> then reuse it later as
> \rightline{\bf\booktitle}
> But in Context when I use
> \rightaligned{\bf\booktitle}
> \stoptext
> 

Hi Luigi,

Are you sure? If I compile exactly the lines above, I don't get the intended righ aligned title: it seems that one needs a blank line before \rightalign, that is:

\def\booktitle{My Book Title}
\showframe
\starttext
then reuse it later as

\rightline{\bf\booktitle}

But in Context when I use

\rightaligned{\bf\booktitle}
\stoptext

Best regards: OK

> -- 
> luigi
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________

%%%%%%%%%%%%%%%%%%
Otared Kavian
Département de Mathématiques
Université de Versailles Saint-Quentin
Bâtiment Fermat
45 aveue des Etats Unis
78035 Versailles cedex

Téléphone: +33 1 39 25 46 42
Secrétariat: +33 1 39 25 46 44 
Secrétariat: +33 1 39 25 46 46

e-mail: Otared.Kavian@math.uvsq.fr




[-- Attachment #1.2: Type: text/html, Size: 2674 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 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] 7+ messages in thread

* Re: problem with def
  2010-05-12 14:46 problem with def John Culleton
  2010-05-12 14:52 ` Taco Hoekwater
  2010-05-12 14:52 ` luigi scarso
@ 2010-05-12 17:58 ` Wolfgang Schuster
  2 siblings, 0 replies; 7+ messages in thread
From: Wolfgang Schuster @ 2010-05-12 17:58 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Am 12.05.10 16:46, schrieb John Culleton:
> In plain pdftex I can define a string thus:
> \def\booktitle{My Book Title}
>
> and then reuse it later as
> \rightline{\bf\booktitle}
>   But in Context when I use
> \rightaligned{\bf\booktitle}
>
> it errors on the tag \booktitle
>
> I tried \the\booktitle but that didn't work either.
>    

I suggest to use ConTeXt’s \setvariables

\setvariables[book][title=My Book Title]

\starttext
\rightaligned{\bf\getvariable{book}{title}}
\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] 7+ messages in thread

* Re: problem with def
  2010-05-12 16:52   ` Otared Kavian
@ 2010-05-12 18:07     ` luigi scarso
  0 siblings, 0 replies; 7+ messages in thread
From: luigi scarso @ 2010-05-12 18:07 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Wed, May 12, 2010 at 6:52 PM, Otared Kavian <otared@gmail.com> wrote:
>
> On 12 mai 2010, at 16:52, luigi scarso wrote:
>
> no problem here with last current
>
> \def\booktitle{My Book Title}
> \showframe
> \starttext
> then reuse it later as
> \rightline{\bf\booktitle}
> But in Context when I use
> \rightaligned{\bf\booktitle}
> \stoptext
>
>
> Hi Luigi,
> Are you sure? If I compile exactly the lines above, I don't get the intended
> righ aligned title: it seems that one needs a blank line before \rightalign,
> that is:
> \def\booktitle{My Book Title}
> \showframe
> \starttext
> then reuse it later as
> \rightline{\bf\booktitle}
> But in Context when I use
> \rightaligned{\bf\booktitle}
> \stoptext
> Best regards: OK
Yes, can be.  I meant  "no errors" not "it looks ok"

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

* Re: problem with def
  2010-05-12 14:52 ` Taco Hoekwater
@ 2010-05-12 19:21   ` John Culleton
  0 siblings, 0 replies; 7+ messages in thread
From: John Culleton @ 2010-05-12 19:21 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Wednesday 12 May 2010 10:52:03 Taco Hoekwater wrote:
> John Culleton wrote:
> > In plain pdftex I can define a string thus:
> > \def\booktitle{My Book Title}
> >
> > and then reuse it later as
> > \rightline{\bf\booktitle}
> >  But in Context when I use
> > \rightaligned{\bf\booktitle}
> >
> > it errors on the tag \booktitle
>
> This definitely should work, so you should post a minimal
> example (are you defining \booktitle inside a group?)
>
> > I tried \the\booktitle but that didn't work either.
>
> This should not work.
>
> Best wishes,
> Taco
> 
___________________________________________________________________________
>________ 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
> 
___________________________________________________________________________
>________

When I put together an example in a single file it works. In my 
more extended example the fonts are defined in fonts.tex, the
value of the string is defined in macros.tex and the usage is 
defined in half.tex. There is a \startstandardmakeup 
\stopstandardmakeup. Here is my master file:
----------------------------------%Example book.tex file for novel.

\input macros.tex
\input fonts.tex
\starttext
\startfrontmatter
\startstandardmakeup
\input half.tex
\input title.tex
\input copy.tex
%\input ded.tex
%\input ack.tex
%\input content.tex
\stopstandardmakeup
\stopfrontmatter
\startbodytext
\input body.tex
\stopbodytext
\startbackmatter
\stopbackmatter
\stoptext
---------------------------------
 
Since I can't come up with a brief example of the problem I will 
start commenting things out, moving things from file to file and 
see what happens.

This feature is a nice to have and not a got to have. I can always 
just retype the title wherever it occurs. But it is a head scratcher. 
-- 
John Culleton
Wexford Press
"Create Book Covers with Scribus"
Printable E-book 38 pages $5.95
http://www.scribd.com/doc/24676863/
http://www.booklocker.com/books/4055.html
___________________________________________________________________________________
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] 7+ messages in thread

end of thread, other threads:[~2010-05-12 19:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-12 14:46 problem with def John Culleton
2010-05-12 14:52 ` Taco Hoekwater
2010-05-12 19:21   ` John Culleton
2010-05-12 14:52 ` luigi scarso
2010-05-12 16:52   ` Otared Kavian
2010-05-12 18:07     ` luigi scarso
2010-05-12 17:58 ` 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).