ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Bug against minimals
@ 2010-12-16 19:46 Xan
  2010-12-17 23:35 ` Hans Hagen
  0 siblings, 1 reply; 2+ messages in thread
From: Xan @ 2010-12-16 19:46 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 273 bytes --]

Hi,

With latest stable minimals version I don't get correct output of the 
metapost article (I attach it)
But with the texlive package with ubuntu 8.04 (and only with 8.04; with 
10.10 I have the same problem), it works. I think it's a bug

Thanks,
Xan.


PS: Please Ccme

[-- Attachment #2: capcalera.contex --]
[-- Type: text/plain, Size: 4094 bytes --]

% Choose a font
\setupbodyfont [cmr,11pt]

% Be tolerant with paragraph building
\setuptolerance [horizontal,verytolerant,stretch]

% Choose a language, and associated hyphenation rules.
%\language [ca]
\mainlanguage[ca]

% Page number
\setuppagenumbering [location={footer}]

% Paper size
\setuppapersize [A4]

% Margins
%\setuplayout  [grid=yes, footer=0.5\footerheight, header=0.5\headerheight]
%\setuplayout[footer=2cm, header=2cm]
%\showlayout
%\showframe
%\showsetups
\setuplayout[topspace=1.5cm,margin=1.5cm,header=1.5cm,footer=1.5cm,width=fit,height=fit,backspace=1.5cm]


% Enable colors and activate hyperlinks
\setupcolors [state=start]
%\definecolor[lightBlue][r=0.5, g=0.5, b=1.0]
%\setupinteraction [state=start, color=lightBlue]
%\setupurl[style=small, space=yes]
\setupurl[space=yes]

% Enumerate the URLs
%\useURL[wiki][http://wiki.contextgarden.net][][\ConTeXt\ wiki]

% Fonts
%% Chapters...
\setupheads[align=flushleft]
\setuphead[chapter][style={\tfd\bf}]
\setuphead[section][style={\bfb}, header=nomarking]
\setuphead[subsection][style={\bfa}]
\setuphead[subsubsection][style={\bfa}]
%\setuphead[section][textstyle=bold]

% Bibliography options
% BIBTEX
%\usemodule[bib]
%\usemodule[bibltx]
%\setupbibtex[database=funcions,sort=author]
%\setuppublications [alternative=ams,numbering=yes, sorttype=bbl, criterium=all]%
%\setupheadtext[ca][pubs=Referències]
%\setuppublicationlist[authoretallimit=3]
%\setuppublicationlist[authoretaltext={\it\  et al.}]
%\setuppublicationlist[authoretaldisplay=1]

%Indentation
\setupheads[indentnext=yes] 
\setupindenting[yes,small,first]

% Vertical spaces between paragraphs
\setupwhitespace[none]

%Itemize
\setupitemize[each][identnext=yes,margin=2em]
\setupitemize[each][headstyle=bold]

% Mathematical packets
%\usemodule[newmat]

% Modules
\usemodule[tikz]
\usetikzlibrary[mindmap,arrows,calc]
%\usetikzlibrary[trees]

% AMSTHM
\defineenumeration
  [exercici]
  [text={Exercici},headstyle=bold,between=\blank,textdistance=1em,
stopper={.\space},location=serried,left={\bgroup\bf},right={\egroup},width=fit,headstyle=\ss,title=yes,titlestyle=\ss,titledistance=.5em]

% Table of contents
%% dots between... and subsubsubsection are not listed
\setupcombinedlist[content][level=4,alternative=c] 
%% section = bold. % width= 10mm --> less space between num-letter
%% line break after section.
\setuplist[section][style=bold,width=10mm] 
\setuplist[section][before=\blank]
%% margin = 10 mm. Put the subsection just bottom section.
\setuplist[subsection][margin=10mm,width=10mm]
\setuplist[subsubsection][margin=20mm,width=10mm]
% Set "Índex" like "Índex de continguts"
\setupheadtext [ca] [content=Índex]

% Heads and footers
\setupfootertexts[{\tfx \pagenumber/\lastpage}]
\setupfooter[text][before=\hrule]
\setupheader[text][after=\hrule]
\setupheadertexts[{\tfx IES Binissalem. Dpt. Orientació}][{\tfx 3r DIV}]

% hyphenating
\hyphenation{do-cu-ment}
\hyphenation{subs-ti-tueix}
\hyphenation{pro-ble-ma}
\hyphenation{Ma-the-ma-tics}
\hyphenation{Ma-the-ma-ti-cal}
\hyphenation{es-crip-tu-ra}
\hyphenation{ge-ne-ra-lit-za-ció}
\hyphenation{va-ria-bles}

% em = bf italic
\setupbodyfontenvironment[default][em=italic]

% underline
\setupunderbar[alternative=b]

% Virgueries
%% Quadres de text
%% Per usar-ho: \startframedtext[width=\textwidth,background=QuadreBasic,frame=off]

\startuseMPgraphic{QuadreBasic}
  picture p ; numeric w, h, o ;
  p := textext.rt(\MPstring{QuadreBasic}) ;
  w := OverlayWidth ; h := OverlayHeight ; o := BodyFontSize ;
  p := p shifted (2o,h-ypart center p) ; draw p ;
  drawoptions (withpen pencircle scaled 2pt withcolor .625red) ;
  draw (2o,h)--(0,h)--(0,0)--(w,0)--(w,h)--(xpart urcorner p,h) ;
  draw boundingbox p ;
  draw (0,0) -- (0,-5pt) ;
  draw (-5pt,0) -- (0,0);
  draw (w, h) -- (w, h+5pt);
  draw (w,h) -- (w+5pt,h);
  setbounds currentpicture to unitsquare xyscaled(w,h) ;
\stopuseMPgraphic

\defineoverlay[QuadreBasic][\useMPgraphic{QuadreBasic}]

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: problemes.tex --]
[-- Type: text/x-tex; name="problemes.tex", Size: 4633 bytes --]

% interface=en output=pdftex
% Regime
\enableregime[utf]

\input capcalera.contex

\setupheadertexts[{\tfx 3r DIV. T4 - MAT}][{\tfx {\bf FULL 1}. \currentdate}]

% Start the text
\starttext

\bigskip
\startframedtext[width=broad, location=middle]
\startalignment[middle]
{\sca Full de problemes d'equacions de 1r grau}
\stopalignment
\stopframedtext

\section{Traducció d'enunciats}

% Pàgina 132 del manual de de MetaFun
\startuniqueMPgraphic{lions a}
path p ; p := fullsquare
xyscaled (\overlaywidth,\overlayheight) superellipsed .85 ;
pickup pencircle scaled 1pt ;
fill p withcolor .850white ; draw p withcolor .625yellow ;
\stopuniqueMPgraphic
\defineoverlay[lions][\uniqueMPgraphic{lions a}]

\def\processword#1%
{\noindent\framed[frame=off,background=lions]{#1} }


\startexercici $a)$ Tradueix les frases següents a equacions i $b)$ després resoldre-les:

\startitemize[a]
\item 
\setupunderbar[alternative=c,rulecolor=middlered,rulethickness=2pt]

\placefigure
  [here,none]
  [fig:planol-Lon-NY]
  {Mapa del món}
  {\bTABLE[frame=off,align={middle,lohi}]
\bTR
\bTD
{\startframedtext[width=.4\textwidth,background=QuadreBasic,frame=off]
Trobar un nombre tal que \startcolor[middlered]\underbars{la cinquena part d'aquest nombre}\stopcolor\  menys tres és igual al \processwords{doble del nombre} més \setupunderbar[alternative=a,rulecolor=middlegreen,rulethickness=2pt]\startcolor[red]\underbars{aquest mateix nombre}\stopcolor
\stopframedtext}
\eTD
\bTD[width=2cm]

\eTD
\bTD
\setupunderbar[alternative=c,rulecolor=middlered,rulethickness=2pt]
\underbar{\dorecurse{10}~} {\dorecurse{10}~} = \processwords{\phantom{\dorecurse{15}~}}\dorecurse{5}~\setupunderbar[alternative=a,rulecolor=middlegreen,rulethickness=2pt]\underbar{\dorecurse{10}~}
\eTD
\eTR
\eTABLE}

\item \setupunderbar[alternative=c,rulecolor=middlered,rulethickness=2pt]

\placefigure
  [here,none]
  [fig:planol-Lon-NY]
  {Mapa del món}
  {\bTABLE[frame=off,align={middle,lohi}]
\bTR
\bTD
{\startframedtext[width=.4\textwidth,background=QuadreBasic,frame=off]
Trobar un nombre tal que \startcolor[middlered]\underbars{la cinquena part d'aquest nombre}\stopcolor\  menys tres és igual al \processwords{doble del nombre} més \setupunderbar[alternative=a,rulecolor=middlegreen,rulethickness=2pt]\startcolor[red]\underbars{aquest mateix nombre}\stopcolor
\stopframedtext}
\eTD
\bTD[width=2cm]

\eTD
\bTD
\setupunderbar[alternative=c,rulecolor=middlered,rulethickness=2pt]
\underbar{\dorecurse{10}~} {\dorecurse{10}~} = \processwords{\phantom{\dorecurse{15}~}}\dorecurse{5}~\setupunderbar[alternative=a,rulecolor=middlegreen,rulethickness=2pt]\underbar{\dorecurse{10}~}
\eTD
\eTR
\eTABLE}

\item \setupunderbar[alternative=c,rulecolor=middlered,rulethickness=2pt]

\placefigure
  [here,none]
  [fig:planol-Lon-NY]
  {Mapa del món}
  {\bTABLE[frame=off,align={middle,lohi}]
\bTR
\bTD
{\startframedtext[width=.4\textwidth,background=QuadreBasic,frame=off]
Trobar un nombre tal que \startcolor[middlered]\underbars{la cinquena part d'aquest nombre}\stopcolor\  menys tres és igual al \processwords{doble del nombre} més \setupunderbar[alternative=a,rulecolor=middlegreen,rulethickness=2pt]\startcolor[red]\underbars{aquest mateix nombre}\stopcolor
\stopframedtext}
\eTD
\bTD[width=2cm]

\eTD
\bTD
\setupunderbar[alternative=c,rulecolor=middlered,rulethickness=2pt]
\underbar{\dorecurse{10}~} {\dorecurse{10}~} = \processwords{\phantom{\dorecurse{15}~}}\dorecurse{5}~\setupunderbar[alternative=a,rulecolor=middlegreen,rulethickness=2pt]\underbar{\dorecurse{10}~}
\eTD
\eTR
\eTABLE}

\item

\setupunderbar[alternative=c,rulecolor=middlered,rulethickness=2pt]

\placefigure
  [here,none]
  [fig:planol-Lon-NY]
  {Mapa del món}
  {\bTABLE[frame=off,align={middle,lohi}]
\bTR
\bTD
{\startframedtext[width=.4\textwidth,background=QuadreBasic,frame=off]
Trobar un nombre tal que \startcolor[middlered]\underbars{la cinquena part d'aquest nombre}\stopcolor\  menys tres és igual al \processwords{doble del nombre} més \setupunderbar[alternative=a,rulecolor=middlegreen,rulethickness=2pt]\startcolor[red]\underbars{aquest mateix nombre}\stopcolor
\stopframedtext}
\eTD
\bTD[width=2cm]

\eTD
\bTD
\setupunderbar[alternative=c,rulecolor=middlered,rulethickness=2pt]
\underbar{\dorecurse{10}~} {\dorecurse{10}~} = \processwords{\phantom{\dorecurse{15}~}}\dorecurse{5}~\setupunderbar[alternative=a,rulecolor=middlegreen,rulethickness=2pt]\underbar{\dorecurse{10}~}
\eTD
\eTR
\eTABLE}
\stopitemize
\stopexercici

\section{Problemes clàssics}

\startcolumns


dues vegades i mitja
trobar nombres 
trobar doblers

tarifes quan són iguals


\stopcolumns



\stoptext

[-- Attachment #4: 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] 2+ messages in thread

* Re: Bug against minimals
  2010-12-16 19:46 Bug against minimals Xan
@ 2010-12-17 23:35 ` Hans Hagen
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen @ 2010-12-17 23:35 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Xan

On 16-12-2010 8:46, Xan wrote:
> Hi,
>
> With latest stable minimals version I don't get correct output of the
> metapost article (I attach it)
> But with the texlive package with ubuntu 8.04 (and only with 8.04; with
> 10.10 I have the same problem), it works. I think it's a bug
>
> Thanks,
> Xan.

next make a small example

\starttext

\unexpanded\def\processword#1{\dontleavehmode\framed{#1} }

% fails, as recurse is not unexpanded (should it be?)
%
% \processwords{\phantom{\dorecurse{15}~}}
% \processwords{x x}

% \processisolatedwords{\phantom{\dorecurse{15}~}}\processword
% \processisolatedwords{x x}\processword

\stoptext

I wonder if that ever worked as \dorecurse is expandable and 
processwords tests arguments.

Anyhow, in the latest mkiv you can use \processisolatedwords to do the 
same. (In your case there are no words so you could apply your 
\processword directly.)

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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] 2+ messages in thread

end of thread, other threads:[~2010-12-17 23:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-16 19:46 Bug against minimals Xan
2010-12-17 23:35 ` Hans Hagen

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