* filter module: before print, it puts new line
@ 2014-07-28 11:29 Xan
2014-07-28 11:53 ` Wolfgang Schuster
2014-07-28 12:00 ` Xan
0 siblings, 2 replies; 3+ messages in thread
From: Xan @ 2014-07-28 11:29 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1: Type: text/plain, Size: 847 bytes --]
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
[-- Attachment #2: j.pdf --]
[-- Type: application/pdf, Size: 12199 bytes --]
[-- Attachment #3: 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] 3+ messages in thread
* Re: filter module: before print, it puts new line
2014-07-28 11:29 filter module: before print, it puts new line Xan
@ 2014-07-28 11:53 ` Wolfgang Schuster
2014-07-28 12:00 ` Xan
1 sibling, 0 replies; 3+ messages in thread
From: Wolfgang Schuster @ 2014-07-28 11:53 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 28.07.2014 um 13:29 schrieb Xan <dxpublica@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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: filter module: before print, it puts new line
2014-07-28 11:29 filter module: before print, it puts new line Xan
2014-07-28 11:53 ` Wolfgang Schuster
@ 2014-07-28 12:00 ` Xan
1 sibling, 0 replies; 3+ messages in thread
From: Xan @ 2014-07-28 12:00 UTC (permalink / raw)
Cc: mailing list for ConTeXt users
On Mon, 28 Jul 2014 13:29:58 +0200
Xan <dxpublica@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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-07-28 12:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-28 11:29 filter module: before print, it puts new line Xan
2014-07-28 11:53 ` Wolfgang Schuster
2014-07-28 12:00 ` Xan
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).