[NTG-context] synbol not beingoa

2014-07-28 Thread Hwitloc

I want a degree sign so I use the other graniod.
Below the \prime symbol getdires

\starttext

  77\degree ~4f4\prime

\stoptext

The prime character gets
___
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
___


Re: [NTG-context] synbol not beingoa

2014-07-28 Thread Wolfgang Schuster

Am 28.07.2014 um 08:27 schrieb Hwitloc hwit...@gmail.com:

 I want a degree sign so I use the other graniod.
 Below the \prime symbol getdires
 
 \starttext
 
  77\degree ~4f4\prime
 
 \stoptext
 
 The prime character gets

Are you looking for the unit command?

%\setupbodyfont[cambria]

\starttext
\unit{77 degree} \unit{4 arcminute} \unit{4 arcsecond}
\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
___


Re: [NTG-context] Strange Behaviour of \mathop

2014-07-28 Thread Tobias Columbus
On Fri, Jul 25, 2014 at 11:08:17AM -0400, Aditya Mahajan wrote:
 On Fri, 25 Jul 2014, Tobias Columbus wrote:
 
 Dear list,
 
 I stumpled upon a very strange effect that \mathop has on the vertical
 positioning of characters.
 
 \mathop applied to a single character results in the character's baseline 
 being
 lower than the baseline of all other characters. This does neither depend on 
 the
 font (checked with Lucida OT, Pagella and LatinModern) nor on the specific
 character.
 
 A minimal example for LatinModern and Pagella is attached.
 
 This is a feature of \mathop: for one letter arguments, \mathop centers the
 symbol on the math-axis. If you don't want this, use:
 
   \mathop{P\kern\zeropoint}
 
 etc.
 
 Aditya

Thank you.

Tobias
___
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
___


[NTG-context] snappedmath is now dropped?

2014-07-28 Thread Xan
Hi,

Are you delete the command \snappedmath?

I get that:


! Undefined control sequence.

system   tex  error on line 834 in file 
/home/xan/SYNC/cepasud-raw/classe/ESPA3/planificació/Tema2-Àlgebra/80-juntat.conTeXt:
 Undefined control sequence ...

824 % TODO: acabar les solucions
825 TODO
826 (Solucions: \startitemize[a,text] \item $x = -1$ \item $x = -1$ \item 
$x = -2$ \item $x = 3$\stopitemize)
827 \stopmode
828 \stopexercici
829 
830 \startexercici Resol:
831 
832 \startitemize[a,columns]
833 
834   \item \snappedmath {\displaystyle 3x- (x-2) = 4x + 1}
835 
836 \item \snappedmath {\displaystyle 4\left(x+3\right)-\left(2x-7\right) = 
6x + 18}
837 
838 \item \snappedmath {\displaystyle 5-(3-x) = 2(x+2) -3}
839 
840 \item \snappedmath {\displaystyle 2x-\left(9x+2\right)+4x = 43-x+8-x-13}
841 
842 \item \snappedmath {\displaystyle 2(x-2) -(5-x)=3x+2-6(x+2)}
843 
844 \item \snappedmath {\displaystyle 2x-\left(x-3\right) 
-2\left(5-x\right) = 6-x +8x-1}

recently read \snappedmath 
 
l.834 \item \snappedmath
   {\displaystyle 3x- (x-2) = 4x + 1}
? 


Thanks,
___
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
___


Re: [NTG-context] Problem with the verbosity of XML

2014-07-28 Thread Hans Hagen

On 7/27/2014 7:24 PM, Xan wrote:

hi,

I have this context file:

\environment ../../../../plantilles/entorn-simple-estructurals
\environment ../../../../plantilles/entorn-simple-visuals
\environment entorn-simple-xml

\xmlprocessfile{demo}{80-activitats.xml}{}

this XML file (80-activitats.xml):

?xml version=1.0 encoding=UTF-8 standalone='yes'?
activitats
   activitat id=1
 tipusexercici/tipus
 enunciat sintaxi=context![CDATA[
Resol:
\startitemize[a]
\item $6(x+2)-x + 2 - 8x = 7x -2 -(7-2x)+35$
\item $-(x+2)-2(-3-x) +5x -3 = 5(x +2) -6x -16$
\item $-3(x+2) -1 +5(-x -4) = -7(-5x -2) + x -(-x +2) + 51$
\item $5(5x -2) -30 - 20(-3x +2) = 5- (10x -2) + 5x+183$
\item $8(x-3) + 5 -40x = 5 - (8x -5) + 13$
\item $5-3(4x-1) + 6(x-10) +3 = 5 + 2(x+2) -(10x -5)-64$
\item $5(x-2) + 5x -(2-5x) +1 = 3(x-2) + 3$
\item $12-12(2 -3x) +120 = -48(x + 2)+239$
\item $1 - (x-4) -(5-2x) -(-3-4x) = 6(2x-3) -7(-2x+3)$
\stopitemize
]]
 /enunciat
 solucio
\startitemize[a,text] \item $x = -1$ \item $x = -1$ \item $x = -2$ \item $x = 
3$\stopitemize
 /solucio
   /activitat
/activitats

and this environment:

\startxmlsetups xml:demo:base
  \xmlsetsetup{demo}{*}{-}
  \xmlsetsetup{demo}{activitats|tipus|activitat|enunciat|solucio}{xml:demo:*}
\stopxmlsetups

\xmlregisterdocumentsetup{demo}{xml:demo:base}

\startxmlsetups xml:demo:activitats
   \title{Activitats}
   \xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:demo:activitat
   \xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:demo:enunciat
   \startexercici\xmltext{#1}{/text()}\stopexercici
\stopxmlsetups


But I get the PDF with the verbose text, not processing (I attach them)

What fails?


are the environments loaded?

--

-
  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
___


[NTG-context] Question to \startlines

2014-07-28 Thread Tomas Hala
Hello,

I found out that the \startlines does not work if it is defined in a body 
of some other macro. Is it expected behaviour, or not?

Thanks in advance,

Tomáš Hála

---

Minimal example: (CTX from TL2014)

\starttext
\def\{\startlines
text
text
\stoplines}

\
\stoptext

%% Gives text text instead of 
text
text



___
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
___


[NTG-context] filter module: before print, it puts new line

2014-07-28 Thread Xan
Hi,

I run this code:

\usemodule[filter]

\defineexternalfilter
[python]
[filtercommand={python \externalfilterinputfile\space  
\externalfilteroutputfile},cache=force]


\starttext


Resol les equacions següents i comprova'n la solució
\startitemize[a,columns]
\item $3x + 2 = 35$
\item $11x – 18 = 4$
\item $56x + 33 = -23$
\item $5x + 25 = 125$
\stopitemize

\starttextrule{Solucions}

\startitemize[a,text]
\item \startpython
from sympy.solvers import solve
from sympy import Symbol
from sympy import Eq

x = Symbol('x')
for solucio in solve(Eq(3*x + 2, 35), x):
print(solucio)

\stoppython
\stopitemize
\stoptextrule


\stoptext


with the result of new line after (a). and 11 (the solution of the 
equation).

I attach the pdf.

How can avoid this behaviour?


Thanks,
Xan


j.pdf
Description: Adobe PDF document
___
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
___

Re: [NTG-context] Question to \startlines

2014-07-28 Thread Wolfgang Schuster

Am 28.07.2014 um 13:29 schrieb Tomas Hala tomas.h...@mendelu.cz:

 Hello,
 
 I found out that the \startlines does not work if it is defined in a body 
 of some other macro. Is it expected behaviour, or not?

This is normal for TeX and you have to use other mechanism like buffers.

\starttext

\startbuffer[]
\startlines
text
text
\stoplines
\stopbuffer

\getbuffer[]

\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
___


Re: [NTG-context] filter module: before print, it puts new line

2014-07-28 Thread Wolfgang Schuster

Am 28.07.2014 um 13:29 schrieb Xan dxpubl...@telefonica.net:

 Hi,
 
 I run this code:
 
 \usemodule[filter]
 
 \defineexternalfilter
[python]
[filtercommand={python \externalfilterinputfile\space  
 \externalfilteroutputfile},cache=force]
 
 […]
 
 with the result of new line after (a). and 11 (the solution of the 
 equation).
 
 I attach the pdf.
 
 How can avoid this behavior?

Adding “location=text” to \defineexternalfilter should help (untested).

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
___


Re: [NTG-context] filter module: before print, it puts new line

2014-07-28 Thread Xan
On Mon, 28 Jul 2014 13:29:58 +0200
Xan dxpubl...@telefonica.net ha escrit:

 Hi,
 
 I run this code:
 
 \usemodule[filter]
 
 \defineexternalfilter
 [python]
 [filtercommand={python \externalfilterinputfile\space  
 \externalfilteroutputfile},cache=force]
 
 
 \starttext
 
 
 Resol les equacions següents i comprova'n la solució
 \startitemize[a,columns]
 \item $3x + 2 = 35$
 \item $11x – 18 = 4$
 \item $56x + 33 = -23$
 \item $5x + 25 = 125$
 \stopitemize
 
 \starttextrule{Solucions}
 
 \startitemize[a,text]
 \item \startpython
 from sympy.solvers import solve
 from sympy import Symbol
 from sympy import Eq
 
 x = Symbol('x')
 for solucio in solve(Eq(3*x + 2, 35), x):
   print(solucio)
 
 \stoppython
 \stopitemize
 \stoptextrule
 
 
 \stoptext
 
 
 with the result of new line after (a). and 11 (the solution of the 
 equation).
 
 I attach the pdf.
 
 How can avoid this behaviour?
 
 
 Thanks,
 Xan
 Am 28.07.2014 um 13:29 schrieb Xan dxpublica at telefonica.net:
 
  Hi,
  
  I run this code:
  
  \usemodule[filter]
  
  \defineexternalfilter
 [python]
 [filtercommand={python \externalfilterinputfile\space  
  \externalfilteroutputfile},cache=force]
  
  […]
  
  with the result of new line after (a). and 11 (the solution of the 
  equation).
  
  I attach the pdf.
  
  How can avoid this behavior?
 
 Adding “location=text” to \defineexternalfilter should help (untested).
 
 Wolfgang

It works (tested! ;)

Thanks,

___
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
___

[NTG-context] Anyone could help me with this error in filter module?

2014-07-28 Thread Xan
Hi,

Any hint on that [https://github.com/adityam/filter/issues/17], please?

Thanks,
___
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
___


Re: [NTG-context] Anyone could help me with this error in filter module?

2014-07-28 Thread Wolfgang Schuster

Am 28.07.2014 um 16:15 schrieb Xan dxpubl...@telefonica.net:

 Hi,
 
 Any hint on that [https://github.com/adityam/filter/issues/17], please?

Don’t use \doifmode{…}{…} etc. with buffers or environments which rely on a 
buffer because you disable the function to keep end of lines in the input.

What you have to do in this case is to use the \startmode or \startnotmode 
commands.

\usemodule[filter]

\defineexternalfilter
[python]
[filtercommand={python \externalfilterinputfile\space  
\externalfilteroutputfile},cache=force]

\starttext

\startmode[solucions]

\starttextrule{Solucions}

\startpython
from sympy.solvers import solve
from sympy import Symbol
from sympy import Eq

x = Symbol('x')
print(solve(Eq(3*x + 2, 35), x))
\stoppython

\stoptextrule

\stopmode

\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
___


Re: [NTG-context] \startitemize Step 1: Step 2:

2014-07-28 Thread Gerben Wierda
On 25 Jul 2014, at 19:55, Wolfgang Schuster schuster.wolfg...@gmail.com wrote:

 
 Am 25.07.2014 um 18:53 schrieb Gerben Wierda gerben.wie...@rna.nl:
 
 Here is something simple that cannot be found in the manual (at least not by 
 me). How do I create a list that is numbered like this:
 
 Step 1: foo foo foo foo foo foo foo foo foo
  foo foo foo foo foo
 Step 2: bar bar bar bar bar bar bar bar bar
  bar bar bar bar bar
 
 etc. (Indenting each item after the first line of course)
 
 \defineenumeration[Step][alternative=hanging,width=fit,stopper=:]
 
 \starttext
 
 \Step \input ward
 
 \Step \input weisman
 
 \stoptext

Doesn’t work. I’ve added the \defineenumeration to my environment file and do

\startitemize[packed,joinedup]
\Step A
\Step B
\Step C
\stopitemize

it fails:

Runaway argument?
C\ETC.
! File ended while scanning use of \dodowithpar.
inserted text 
\par 
to be read again 
   \relax 
\dodoreadfile ...d \relax \fi \dodoreadfileindeed 
  \relax \the \everyafterrea...

\doexecutefile ...rttextfile {#1}\processfile {#1}
  \dostoptextfile \registerf...
l.45\component c_foo


 
 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
 ___

___
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
___

Re: [NTG-context] \startitemize Step 1: Step 2:

2014-07-28 Thread luigi scarso
On Mon, Jul 28, 2014 at 5:06 PM, Gerben Wierda gerben.wie...@rna.nl wrote:

 On 25 Jul 2014, at 19:55, Wolfgang Schuster schuster.wolfg...@gmail.com
 wrote:


 Am 25.07.2014 um 18:53 schrieb Gerben Wierda gerben.wie...@rna.nl:

 Here is something simple that cannot be found in the manual (at least not
 by me). How do I create a list that is numbered like this:

 Step 1: foo foo foo foo foo foo foo foo foo
 foo foo foo foo foo
 Step 2: bar bar bar bar bar bar bar bar bar
 bar bar bar bar bar

 etc. (Indenting each item after the first line of course)


 \defineenumeration[Step][alternative=hanging,width=fit,stopper=:]

 \starttext

 \Step \input ward

 \Step \input weisman

 \stoptext


 Doesn’t work. I’ve added the \defineenumeration to my environment file and
 do

 \startitemize[packed,joinedup]
 \Step A
 \Step B
 \Step C
 \stopitemize

 it fails:



In Wolfgang's example there are blank lines: try with


\defineenumeration[Step][alternative=hanging,width=fit,stopper=:]
\starttext
\startitemize[packed,joinedup]
\Step A \par
\Step B \par
\Step C \par
\stopitemize
\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
___

Re: [NTG-context] \startitemize Step 1: Step 2:

2014-07-28 Thread Wolfgang Schuster

Am 28.07.2014 um 17:06 schrieb Gerben Wierda gerben.wie...@rna.nl:

 On 25 Jul 2014, at 19:55, Wolfgang Schuster schuster.wolfg...@gmail.com 
 wrote:
 
 
 Am 25.07.2014 um 18:53 schrieb Gerben Wierda gerben.wie...@rna.nl:
 
 Here is something simple that cannot be found in the manual (at least not 
 by me). How do I create a list that is numbered like this:
 
 Step 1: foo foo foo foo foo foo foo foo foo
 foo foo foo foo foo
 Step 2: bar bar bar bar bar bar bar bar bar
 bar bar bar bar bar
 
 etc. (Indenting each item after the first line of course)
 
 \defineenumeration[Step][alternative=hanging,width=fit,stopper=:]
 
 \starttext
 
 \Step \input ward
 
 \Step \input weisman
 
 \stoptext
 
 Doesn’t work. I’ve added the \defineenumeration to my environment file and do
 
 \startitemize[packed,joinedup]
 \Step A
 \Step B
 \Step C
 \stopitemize

A enumeration *isn’t* the same as a item group. When you use \Step command you 
have to delimit
the entry with a \par command or a empty line (or use the \startStep and 
\stopStep commands).

\defineenumeration[Step][alternative=hanging,width=fit,stopper=:]

\starttext

\startpacked
\Step A\par
\Step B\par
\stoppacked

\blank

\startpacked
\startStep C\stopStep
\startStep D\stopStep
\stoppacked

\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
___

Re: [NTG-context] Problem with the verbosity of XML

2014-07-28 Thread Hans Hagen

On 7/28/2014 1:13 PM, Xan wrote:

This is a minimal and isolate example

You can see that {\bf Hola} is not processed.


well, because you want to typeset it as is:

pasHola {\bf a}/pas

why should pas be treated as tex?

\startxmlsetups xml:demo:pas
\startitem
\xmlflush{#1}
\stopitem
\stopxmlsetups

versus:

\startxmlsetups xml:demo:pas
\startitem
\xmlflushcontext{#1}
\stopitem
\stopxmlsetups


-
  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
___


Re: [NTG-context] Question to \startlines

2014-07-28 Thread Tomas Hala
That works. Thank you, Wolfgang.
Using this, I found out that buffers do not cooperate with \vfill.
Is there any other how to move parts of the buffer to the top and bottom
except two independent buffers?

Tomas Hala


Mon, Jul 28, 2014 ve 01:49:59PM +0200 Wolfgang Schuster napsal(a):
# 
# Am 28.07.2014 um 13:29 schrieb Tomas Hala tomas.h...@mendelu.cz:
# 
#  Hello,
#  
#  I found out that the \startlines does not work if it is defined in a body 
#  of some other macro. Is it expected behaviour, or not?
# 
# This is normal for TeX and you have to use other mechanism like buffers.
# 
# \starttext
# 
# \startbuffer[]
# \startlines
# text
# text
# \stoplines
# \stopbuffer
# 
# \getbuffer[]
# 
# \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
___


Re: [NTG-context] Question to \startlines

2014-07-28 Thread Wolfgang Schuster

Am 28.07.2014 um 18:37 schrieb Tomas Hala tomas.h...@mendelu.cz:

 That works. Thank you, Wolfgang.
 Using this, I found out that buffers do not cooperate with \vfill.
 Is there any other how to move parts of the buffer to the top and bottom
 except two independent buffers?

I don’t think this has to do with buffers because a buffer is only a mechanism 
to save content for a later use.

Make a example where you have a problem with \vfill.

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
___


Re: [NTG-context] Anyone could help me with this error in filter module?

2014-07-28 Thread Aditya Mahajan

On Mon, 28 Jul 2014, Wolfgang Schuster wrote:



Am 28.07.2014 um 16:15 schrieb Xan dxpubl...@telefonica.net:


Hi,

Any hint on that [https://github.com/adityam/filter/issues/17], please?


Don’t use \doifmode{…}{…} etc. with buffers or environments which rely on a 
buffer because you disable the function to keep end of lines in the input.

What you have to do in this case is to use the \startmode or \startnotmode 
commands.

\usemodule[filter]

\defineexternalfilter
   [python]
   [filtercommand={python \externalfilterinputfile\space  
\externalfilteroutputfile},cache=force]

\starttext

\startmode[solucions]

\starttextrule{Solucions}

\startpython

\stoppython

\stoptextrule

\stopmode

\stoptext


Another option is (untested):

\defineexternalfilter
  [python]
  [
filtercommand={...},
before={\starttextrule{Solutions}},
after={\stoptextrule},
  ]

\startmode[solutions]
\setupexternalfilter[python][state=stop, read=no]
\stopmode

\starttext

\startpython
...
\stoppython
\stoptext

BTW, you can simplify your setup using:

\startbuffer[sympy]
from sympy.solvers import solve
from sympy import Symbol
from sympy import Eq

x = Symbol('x')
\stopbuffer

\defineexternalfilter
  [python]
  [
filtercommand={...},
bufferbefore={sympy},
  ]

\starttext
\startpython
print(solve(Eq(3*x + 2, 35), x))
\stoppython
\stoptext

Aditya
___
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
___

Re: [NTG-context] How to make floats extend into the outer margin

2014-07-28 Thread Joshua Krämer
On 2014-07-27, 14:13, Aditya Mahajan wrote:
 On Sun, 27 Jul 2014, Joshua Krämer wrote:
  Thank you.  But this solution has the problem, too, that the
  alignment is ignored for tikz pictures (see example below).
 This is a known issue. Wrap your tikz pictures inside a \hbox:
 \hbox{\starttikzpicture ... \stoptikzpicture}

Great, thank you!

Kind regards,
Joshua


___
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
___

Re: [NTG-context] How to center floats (?) in standardmakeup?

2014-07-28 Thread Joshua Krämer
On 2014-07-27, 13:13, Thomas Kreuzer wrote:

 Hello everyone,
 
 I am trying to create a title page with
 
  \startstandardmakeup[align=middle]
 
 This works alright for text, but when I am trying to insert a
 \framed, a table or an \externalfigure, those items (floats?)
 don't get centered. How can I make them centered as well?

I don't know why, but \leavevmode helps:


\starttext
\startstandardmakeup[align=middle]
\input knuth

\framed {One}

\leavevmode\framed {Two}
\stopstandardmakeup
\stoptext


These items are not called floats.  Floats are objects like tables or
figures, which are not part of the main text, don't have a fixed
position, and are placed automatically.  Additionally, they are often
numbered and have some title (like Figure 1:  A sample picture.)
See the wiki:  http://wiki.contextgarden.net/Floating_Objects

Kind regards,
Joshua


___
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
___


[NTG-context] Alignment, indenting and font inside floats

2014-07-28 Thread Joshua Krämer
Dear list,

I want to setup all my floats' contents to be middle-aligned, not
indented and typeset in a distinct font.  How can I do this?  The
attached example does not work.

Thank you and kind regards,
Joshua Krämer


\setupindenting [yes, \the\baselineskip]
\definefontfamily [figurefamily] [serif] [Latin Modern Sans]
\setupfloats [align=middle, style={\switchtobodyfont[figurefamily]},
indenting=no]

\starttext
\input knuth

\startplacefigure
Word
\stopplacefigure

\stoptext


___
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
___

Re: [NTG-context] [luatex] Problem with luaotfload and positioning of primes

2014-07-28 Thread Philipp Gesang
(CC’ing the Context list.)

···date: 2014-07-28, Monday···from: Jura Pintar···

 Do you have a prediction about how long it will take before a fix is
 released?

No, sorry. What I do have though is the culprit:

  c70b2e466bbb07e976f8684d56ae4e5398169e7d is the first bad commit
  commit c70b2e466bbb07e976f8684d56ae4e5398169e7d
  Author: Hans Hagen pra...@wxs.nl
  Date:   Sat Mar 22 15:31:00 2014 +0100

  beta 2014.03.22 15:31

  ...

See the commit diff [0].

@Hans: Here is a minimal example for Luatex-Plain:


https://bitbucket.org/phg/lua-la-tex-tests/src/8d48db1435bbd70888381a6cacd2281688d0d0b6/pln-math-1-prime.tex

With the last good commit (244a447.. dated 2014.02.14 in the
Garden repo) both primes are typeset correctly. With c70b2e46..
-- which is unfortunately the first snapshot after Marious’
mirror went dark -- the second one doesn’t take the ssty feature
into account.

Best regards,
Philipp

[0] 
https://bitbucket.org/phg/context-mirror/commits/c70b2e466bbb07e976f8684d56ae4e5398169e7d



pgpm3ETHz6muk.pgp
Description: PGP signature
___
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
___

Re: [NTG-context] Alignment, indenting and font inside floats

2014-07-28 Thread Rik Kabel

On 2014-07-28 15:29, Joshua Krämer wrote:

Dear list,

I want to setup all my floats' contents to be middle-aligned, not
indented and typeset in a distinct font.  How can I do this?  The
attached example does not work.

Thank you and kind regards,
Joshua Krämer


\setupindenting [yes, \the\baselineskip]
\definefontfamily [figurefamily] [serif] [Latin Modern Sans]
\setupfloats [align=middle, style={\switchtobodyfont[figurefamily]},
indenting=no]

\starttext
\input knuth

\startplacefigure
Word
\stopplacefigure

\stoptext




   \setupexternalfigures[location={local,default}]
   \setupindenting[yes, \the\baselineskip]
   %\definefontfamily [figurefamily] [serif] [Latin Modern Sans]
   %\setupfloats [align=middle,
   style={\switchtobodyfont[figurefamily]}, indenting=no]
   \setupcaptions [style=ss]
   \setupframed[style=it]

   \starttext
   \input knuth

   \startplacefigure[title={Not a figure}]
   Word
   \stopplacefigure

   \startplacetable[title={A table}]
   \starttable[||]
   \NC Table\NC\NR
   \stoptable
   \stopplacetable

   \startplacefigure[title={A bovine figure}]
   \externalfigure[cow][width=5cm]
   \stopplacefigure

   \startplaceintermezzo[title={An intermezzo}]
   \startframedtext
   \input ward
   \stopframedtext
   \stopplaceintermezzo

   \stoptext

Captions are styled separately from the floats, hence \setupcaptions.

Word is not a figure. \startplacefigure does not make what follows a 
figure. When a real figure is set with \startplacefigure, it is centered 
by default.


You may be able to get away with style=ss instead of a new font 
definition if the sans is linked to the main serif font.


The contents of a float are styled according to the type of float.
___
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
___

Re: [NTG-context] [luatex] Problem with luaotfload and positioning of primes

2014-07-28 Thread Philipp Gesang
···date: 2014-07-28, Monday···from: Philipp Gesang···

 (CC’ing the Context list.)
 
 ···date: 2014-07-28, Monday···from: Jura Pintar···
 
  Do you have a prediction about how long it will take before a fix is
  released?
 
 No, sorry. What I do have though is the culprit:
 
   c70b2e466bbb07e976f8684d56ae4e5398169e7d is the first bad commit

Seems to be related to the feature precedence code. If I revert
the related changes as in the attached patch, the bug vanishes
(and so does te feature ordering …).

diff --git a/src/luaotfload-fontloader.lua b/src/luaotfload-fontloader.lua
index 293a319..719a1f7 100644
--- a/src/luaotfload-fontloader.lua
+++ b/src/luaotfload-fontloader.lua
@@ -9152,34 +9152,26 @@ local function featuresinitializer(tfmdata,value)
   local language=properties.language
   local basesubstitutions=rawdata.resources.features.gsub
   local basepositionings=rawdata.resources.features.gpos
-  if basesubstitutions or basepositionings then
-local sequences=tfmdata.resources.sequences
-for s=1,#sequences do
-  local sequence=sequences[s]
-  local sfeatures=sequence.features
-  if sfeatures then
-local order=sequence.order
-if order then
-  for i=1,#order do 
-local feature=order[i]
-if features[feature] then
-  local validlookups,lookuplist=collectlookups(rawdata,feature,script,language)
-  if not validlookups then
-  elseif basesubstitutions and basesubstitutions[feature] then
-if trace_preparing then
-  report_prepare(filtering base feature %a for %a,feature,fullname)
-end
-applybasemethod(preparesubstitutions,tfmdata,feature,value,validlookups,lookuplist)
-registerbasefeature(feature,value)
-  elseif basepositionings and basepositionings[feature] then
-if trace_preparing then
-  report_prepare(filtering base feature %a for %a,feature,fullname)
-end
-applybasemethod(preparepositionings,tfmdata,feature,features[feature],validlookups,lookuplist)
-registerbasefeature(feature,value)
-  end
-end
-  end
+  if basesubstitutions then
+for feature,data in next,basesubstitutions do
+  local value=features[feature]
+  if value then
+local validlookups,lookuplist=collectlookups(rawdata,feature,script,language)
+if validlookups then
+  applybasemethod(preparesubstitutions,tfmdata,feature,value,validlookups,lookuplist)
+  registerbasefeature(feature,value)
+end
+  end
+end
+  end
+  if basepositionings then
+for feature,data in next,basepositionings do
+  local value=features[feature]
+  if value then
+local validlookups,lookuplist=collectlookups(rawdata,feature,script,language)
+if validlookups then
+  applybasemethod(preparepositionings,tfmdata,feature,features[feature],validlookups,lookuplist)
+  registerbasefeature(feature,value)
 end
   end
 end


pgpcELknSqgor.pgp
Description: PGP signature
___
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
___

Re: [NTG-context] Alignment, indenting and font inside floats

2014-07-28 Thread Rik Kabel

On 2014-07-28 17:23, Rik Kabel wrote:

(much snipped)


The contents of a float are styled according to the type of float.

Sorry, that last statement should have been:

The contents of a float are styled according to the type of contents.

That is, if a table is floated (with placetable or startplacetable), you 
still use table-styling commands to style it.


--
Rik
___
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
___


Re: [NTG-context] snappedmath is now dropped?

2014-07-28 Thread Hans Hagen

On 7/28/2014 11:01 AM, Xan wrote:

Hi,

Are you delete the command \snappedmath?

I get that:


! Undefined control sequence.

system   tex  error on line 834 in file 
/home/xan/SYNC/cepasud-raw/classe/ESPA3/planificació/Tema2-Àlgebra/80-juntat.conTeXt: 
Undefined control sequence ...


works here  command is available in mkiv ... but, when checking I 
saw that there is an error:


line 461 of math-ini.mkiv should be

   \dp\scratchbox\strutdp


824 % TODO: acabar les solucions
825 TODO
826 (Solucions: \startitemize[a,text] \item $x = -1$ \item $x = -1$ \item 
$x = -2$ \item $x = 3$\stopitemize)
827 \stopmode
828 \stopexercici
829
830 \startexercici Resol:
831
832 \startitemize[a,columns]
833
834   \item \snappedmath {\displaystyle 3x- (x-2) = 4x + 1}
835
836 \item \snappedmath {\displaystyle 4\left(x+3\right)-\left(2x-7\right) = 
6x + 18}
837
838 \item \snappedmath {\displaystyle 5-(3-x) = 2(x+2) -3}
839
840 \item \snappedmath {\displaystyle 2x-\left(9x+2\right)+4x = 43-x+8-x-13}
841
842 \item \snappedmath {\displaystyle 2(x-2) -(5-x)=3x+2-6(x+2)}
843
844 \item \snappedmath {\displaystyle 2x-\left(x-3\right) 
-2\left(5-x\right) = 6-x +8x-1}

recently read \snappedmath

l.834 \item \snappedmath
{\displaystyle 3x- (x-2) = 4x + 1}
?


Thanks,
___
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
___




--

-
  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
___


Re: [NTG-context] [luatex] Problem with luaotfload and positioning of primes

2014-07-28 Thread Philipp Gesang
Good morning, Hans!

Thanks for the quick fix!

Best,
Philipp

···date: 2014-07-28, Monday···from: Philipp Gesang···

 ···date: 2014-07-28, Monday···from: Philipp Gesang···
 
  (CC’ing the Context list.)
  
  ···date: 2014-07-28, Monday···from: Jura Pintar···
  
   Do you have a prediction about how long it will take before a fix is
   released?
  
  No, sorry. What I do have though is the culprit:
  
c70b2e466bbb07e976f8684d56ae4e5398169e7d is the first bad commit
 
 Seems to be related to the feature precedence code. If I revert
 the related changes as in the attached patch, the bug vanishes
 (and so does te feature ordering …).
 

 diff --git a/src/luaotfload-fontloader.lua b/src/luaotfload-fontloader.lua
 index 293a319..719a1f7 100644
 --- a/src/luaotfload-fontloader.lua
 +++ b/src/luaotfload-fontloader.lua
 @@ -9152,34 +9152,26 @@ local function featuresinitializer(tfmdata,value)
local language=properties.language
local basesubstitutions=rawdata.resources.features.gsub
local basepositionings=rawdata.resources.features.gpos
 -  if basesubstitutions or basepositionings then
 -local sequences=tfmdata.resources.sequences
 -for s=1,#sequences do
 -  local sequence=sequences[s]
 -  local sfeatures=sequence.features
 -  if sfeatures then
 -local order=sequence.order
 -if order then
 -  for i=1,#order do 
 -local feature=order[i]
 -if features[feature] then
 -  local 
 validlookups,lookuplist=collectlookups(rawdata,feature,script,language)
 -  if not validlookups then
 -  elseif basesubstitutions and basesubstitutions[feature] 
 then
 -if trace_preparing then
 -  report_prepare(filtering base feature %a for 
 %a,feature,fullname)
 -end
 -
 applybasemethod(preparesubstitutions,tfmdata,feature,value,validlookups,lookuplist)
 -registerbasefeature(feature,value)
 -  elseif basepositionings and basepositionings[feature] then
 -if trace_preparing then
 -  report_prepare(filtering base feature %a for 
 %a,feature,fullname)
 -end
 -
 applybasemethod(preparepositionings,tfmdata,feature,features[feature],validlookups,lookuplist)
 -registerbasefeature(feature,value)
 -  end
 -end
 -  end
 +  if basesubstitutions then
 +for feature,data in next,basesubstitutions do
 +  local value=features[feature]
 +  if value then
 +local 
 validlookups,lookuplist=collectlookups(rawdata,feature,script,language)
 +if validlookups then
 +  
 applybasemethod(preparesubstitutions,tfmdata,feature,value,validlookups,lookuplist)
 +  registerbasefeature(feature,value)
 +end
 +  end
 +end
 +  end
 +  if basepositionings then
 +for feature,data in next,basepositionings do
 +  local value=features[feature]
 +  if value then
 +local 
 validlookups,lookuplist=collectlookups(rawdata,feature,script,language)
 +if validlookups then
 +  
 applybasemethod(preparepositionings,tfmdata,feature,features[feature],validlookups,lookuplist)
 +  registerbasefeature(feature,value)
  end
end
  end




 ___
 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
 ___



pgpWdobr_Ztis.pgp
Description: PGP signature
___
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
___