Re: [NTG-context] Bug with TikZ module ?

2014-05-17 Thread Fabrice

Hi,
This is true, but as I gradually abandoned LaTeX for ConTeXt, I'm a 
little too quickly precipitate. In addition, I prefer TikZ to PSTricks 
that I do not control very well, pending the integration of PSTricks in 
Context.

The solution \strut you propose works perfectly.
Regards,
Fabrice
___
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] Bug with TikZ module ?

2014-05-15 Thread Aditya Mahajan

On Thu, 15 May 2014, Fabrice Couvreur wrote:


Hi,
Why the three words are not aligned on the baseline ?
Regards,
Fabrice

\usemodule[tikz]
\starttext
\starttikzpicture[level/.style={sibling distance=10mm}]
\node{}[grow=right]
child{node{J}}
child{node{R}}
child{node{B}
child{node{J}}
child{node{R}}
child{node{B}
child{node{J}}
child{node{R}}
child{node{B}}}
};
\node at (3,-0.75) {$\vdots$};
\node at (4.5,0.25) {$\vdots$};
\node at (1.5,-2.5) {toit};
\node at (3,-2.5) {fenêtre};
\node at (4.5,-2.5) {porte};
\stoptikzpicture
\stoptext


You have the same result with LaTeX, so the bug is not with ConTeXt. TikZ 
is aligning at the bottom of the box rather than at the baseline.


IIRC, there is an option to "align at baseline" in TikZ. Otherwise, you 
can try adding `\strut` in each of the labels, so:


\node at (...) {\strut ...} ;

etc.

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
___

[NTG-context] Bug with TikZ module ?

2014-05-15 Thread Fabrice Couvreur
Hi,
Why the three words are not aligned on the baseline ?
Regards,
Fabrice

\usemodule[tikz]
\starttext
\starttikzpicture[level/.style={sibling distance=10mm}]
\node{}[grow=right]
child{node{J}}
child{node{R}}
child{node{B}
child{node{J}}
child{node{R}}
child{node{B}
child{node{J}}
child{node{R}}
child{node{B}}}
};
\node at (3,-0.75) {$\vdots$};
\node at (4.5,0.25) {$\vdots$};
\node at (1.5,-2.5) {toit};
\node at (3,-2.5) {fenêtre};
\node at (4.5,-2.5) {porte};
\stoptikzpicture
\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
___

[NTG-context] Bug with TikZ

2014-03-14 Thread Xan
Hi,

I don't know why and how when the page begins with a tikz picture, a piece of 
text is blue?

See that:

%% ConTeXt template for exercises
%% ConTeXt MIV

%% Carregam símbols
\usesymbols[eur]

%% Capçaleres i peus
\setupheadertexts[{\sc\rm Funcions (T2)}]
\setupheadertexts[{\rm \sc CEPA Sud}][{\rm \sc ESPA 4. Quad. 1}]
\setupfootertexts[{\rm \sc Pàgina \pagenumber\space de \lastpage\space - 13 de 
desembre de 2013}]

\usemodule[tikz]

% BUGGY things
\definecolor[headingcolor][c=1,m=0.5431,y=0,k=0.5451]
\setupfooter[text][style={\ss\tfx},color={headingcolor},before={\hrule}]
\setupheader[text][style={\ss},color={headingcolor},after={\hrule}]
% end of buggy things

\starttext

\startitemize[n]

\item \input tufte.tex

\input tufte.tex

\input tufte.tex
\input tufte.tex

\item Cada matí, en Tomeu camina des de ca seva fins a la parada de l'autobús 
més pròxima (vegeu la figura~\in[fig:Tomeu-modificat]).
El gràfic següent mostra aquest recorregut en un dia concret:


\placefigure[here]
[fig:Tomeu-modificat]
{Recorregut del dia 13 de desembre de 2013}
{
\bTABLE[frame=off,align=middle,width=fit]
   \bTR[frame=off]
 \bTD \bgroup \framed[frame=off]{\starttikzpicture[scale=0.6]
\draw[very thin,help lines, color=gray] (-0.1,-0.1) grid (12.2,10);
\draw[->] (-0.2,0) -- (12.2,0);
\draw (6, -1) node[anchor=north] {$\text{Temps transcorregut (segons)}$};
\draw[->] (0,-0.2) -- (0,10.2) node[above] {$\text{Distància a casa 
(metres)}$};

\foreach \x/\xtext in {1/10, 2/20, 3/30, 4/40, 5/50, 6/60, 7/70, 8/80, 9/90, 
10/100, 11/110, 12/120}
{
\draw (\x, -0.1 cm) -- (\x, 0.1 cm);
\draw (\x, 0 cm) node[anchor=north] {\small  $\xtext$};
}

\foreach \x/\xtext in {1/20, 2/40, 3/60, 4/80, 5/100, 6/120, 7/140, 8/160, 
9/180, 10/200}
{
\draw (-0.1 cm, \x) -- (0.1 cm, \x);
\draw (0, \x) node[anchor=east] {\small $\xtext$};
}


\draw[color=blue, ultra thick] (0,0) -- (5,3) -- (7,1) -- (10,9) -- (12.2,9);

\stoptikzpicture} \egroup \eTD
   \eTR
\eTABLE}



\startitemize[a,packed]
\item Quines variables es representen en el gràfic?
\item A quina distància (de ca seva) està la parada del bus?
\item Quina escala s'utilitza per a cada variable?
\item A quin tram del gràfic va més ràpid? A quin tram va més lent?
\item Quina velocitat duu a cada tram?
\item Emparella aquest gràfic amb la història que correspongui:

\startitemize[A]
\item \startframedtext En Tomeu camina lentament. Després d'una estona, se 
n'adona que li han caigut els guants i torna enrera per a agafar-los. En aquest 
punt, veu arribar l'autobús i corre ràpidament fins a la parada. \stopframedtext
\stopitemize

\stopitemize


\item Elegiu una de les opcions següents:

Ramírez

Botella





\stopitemize
\stoptext


Is it a formal bug?

My version is the latest stable: ConTeXt  ver: 2014.01.03 00:40 MKIV current  
fmt: 2014.3.14  int: english/english

I attached the file (pdf)

Thanks,
Xan.


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