ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: Example from FAQ not working
@ 2013-02-06 14:04 P. Hanák
  2013-02-06 14:09 ` Wolfgang Schuster
  0 siblings, 1 reply; 3+ messages in thread
From: P. Hanák @ 2013-02-06 14:04 UTC (permalink / raw)
  To: ntg-context

Hi,

now I noticed that I can even use some non-existing alignment:


   \setuppapersize[A5]
    
   \setuplayout[location=middle,
                header=0pt,
                footer=0pt,
                height=fit,
                width=109mm
                ]
    
   \setupindenting[next,\baselineskip]
    
   \indenting[yes]
    
   \setupalign[nonexisting]
      
   \starttext
    
   Today, automated typesetting is quite popular, which is partly due to the fact that
   document coding standards have evolved, in particular XML. For instance, when you
   navigate the internet, a typesetting engine is at work to render the pages. When you
   ask for a print preview, you often get a different rendering. So, one document source
   can result in different views.
    
   The vehicle that we use for automated typesetting of books is called CONTEXT. This
   system is based on the well known typesetting engine and language TEX and the
   graphic programming environment METAPOST.
    
   \stoptext

This example is processed without errors although there is no definition
of the alignment "nonexisting". Is it not strange?

Pavel


   > Hi,
   >  
   > I tried this example from Context FAQ but without success:
   >  
   > \installalign
   >   {block}
   >   {\parfillskip=\hsize
   >    \advance\parfillskip by -1.5\parindent
   >    \advance\parfillskip by 0pt minus \parfillskip
   >    \advance\parfillskip by 0pt minus -1em}
   >  
   > % followed by
   > \setupalign[block]
   >  
   > I expected no last line will be shorter than the paragraph indenting,
   > but it didn't work.
   >  
   > If I used the plainTeX commands directly (without trying to install and
   > use the new alignment) everything worked as expected:
   >  
   > \parfillskip=\hsize
   > \advance\parfillskip by -1.5\parindent
   > \advance\parfillskip by 0pt minus \parfillskip
   > \advance\parfillskip by 0pt minus -1em
   >  
   > Has anybody the explanation for this?
   >  
   > My luatex version is beta-0.74.0-2012122510 (TeX Live 2013/dev)(rev 4541).
   >  
   > Best regards
   >  
   > Pavel
___________________________________________________________________________________
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] 3+ messages in thread

* Re: Example from FAQ not working
  2013-02-06 14:04 Example from FAQ not working P. Hanák
@ 2013-02-06 14:09 ` Wolfgang Schuster
  0 siblings, 0 replies; 3+ messages in thread
From: Wolfgang Schuster @ 2013-02-06 14:09 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 06.02.2013 um 15:04 schrieb P. Hanák <hanak@wpb.cz>:

> Hi,
> 
> now I noticed that I can even use some non-existing alignment:
> 
> 
>   \setuppapersize[A5]
> 
>   \setuplayout[location=middle,
>                header=0pt,
>                footer=0pt,
>                height=fit,
>                width=109mm
>                ]
> 
>   \setupindenting[next,\baselineskip]
> 
>   \indenting[yes]
> 
>   \setupalign[nonexisting]
> 
>   \starttext
> 
>   Today, automated typesetting is quite popular, which is partly due to the fact that
>   document coding standards have evolved, in particular XML. For instance, when you
>   navigate the internet, a typesetting engine is at work to render the pages. When you
>   ask for a print preview, you often get a different rendering. So, one document source
>   can result in different views.
> 
>   The vehicle that we use for automated typesetting of books is called CONTEXT. This
>   system is based on the well known typesetting engine and language TEX and the
>   graphic programming environment METAPOST.
> 
>   \stoptext
> 
> This example is processed without errors although there is no definition
> of the alignment "nonexisting". Is it not strange?

When ConTeXt parses the \setupalign command it looks if the keyword is defined
and executes it but when the keyword isn’t defined its just ignored.

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

* Re: Example from FAQ not working
@ 2013-02-06 16:46 P. Hanák
  0 siblings, 0 replies; 3+ messages in thread
From: P. Hanák @ 2013-02-06 16:46 UTC (permalink / raw)
  To: ntg-context

Hi,

  >> Hi,
  >> 
  >> now I noticed that I can even use some non-existing alignment:
  >> 
  >> 
  >>   \setuppapersize[A5]
  >> 
  >>   \setuplayout[location=middle,
  >>                header=0pt,
  >>                footer=0pt,
  >>                height=fit,
  >>                width=109mm
  >>                ]
  >> 
  >>   \setupindenting[next,\baselineskip]
  >> 
  >>   \indenting[yes]
  >> 
  >>   \setupalign[nonexisting]
  >> 
  >>   \starttext
  >> 
  >>   Today, automated typesetting is quite popular, which is partly due to the fact that
  >>   document coding standards have evolved, in particular XML. For instance, when you
  >>   navigate the internet, a typesetting engine is at work to render the pages. When you
  >>   ask for a print preview, you often get a different rendering. So, one document source
  >>   can result in different views.
  >> 
  >>   The vehicle that we use for automated typesetting of books is called CONTEXT. This
  >>   system is based on the well known typesetting engine and language TEX and the
  >>   graphic programming environment METAPOST.
  >> 
  >>   \stoptext
  >> 
  >> This example is processed without errors although there is no definition
  >> of the alignment "nonexisting". Is it not strange?
  > 
  > When ConTeXt parses the \setupalign command it looks if the keyword is defined
  > and executes it but when the keyword isn?t defined its just ignored.
  > 
  > Wolfgang

thank you for your explanation. So probably my definition of new
alignment "block" was not successful and when using \setupalign the
alignment with the keyword "block" is simply ignored.

Is there any possibility to find out if the new alignment was really
defined and exists?

\installalign
   {block}
   {\parfillskip=\hsize
    \advance\parfillskip by -1.5\parindent
    \advance\parfillskip by 0pt minus \parfillskip
    \advance\parfillskip by 0pt minus -1em}

% Next command is probably ignored? Can I test if the alignment "block"
% really exists?

\setupalign[block]

Best regards

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

end of thread, other threads:[~2013-02-06 16:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-06 14:04 Example from FAQ not working P. Hanák
2013-02-06 14:09 ` Wolfgang Schuster
2013-02-06 16:46 P. Hanák

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