Re: [NTG-context] Placement of a figure made with TiKz
On 7/29/2018 1:01 PM, Fabrice Couvreur wrote: I do not understand why figure 2 does not fit correctly like the other two. Depends on what tikz does \useMPlibrary[dum] \usemodule[tikz] \usemodule[pgfplots] \pgfplotsset{compat=newest} \usetikzlibrary{positioning} \usetikzlibrary{calc} \setuplayout [height=middle, width=middle, backspace=2cm, topspace=10mm, bottomspace=10mm, header=10mm, footer=10mm, footerdistance=10mm, headerdistance=10mm] \showframe \starttext \placefigure[right]{first}{\externalfigure[dummy]} \placefigure[right]{second}{ \hbox{ \starttikzpicture[thick] \switchtobodyfont[9pt] \startaxis[ x=3cm,y=3cm, axis line style = thick, major tick style=black, xtick={0,0.25,...,1},ytick={0,0.25,...,1}, ymin=-0.25,ymax=1.25,xmin=-0.25,xmax=1.5, axis on top=true, axis lines=middle, tickwidth=0.15cm, minor tick num=3, major tick style = {thick, black}, axis line style = thick, yticklabels={,,}, xticklabels={,,}, major tick style=black, extra x ticks={1.25}, extra x tick label={\null}, xlabel=$x$,ylabel=$y$, every axis x label/.style= { at={(ticklabel* cs:1)}, anchor=west }, every axis y label/.style= { at={(ticklabel* cs:1)}, anchor=south }, >=stealth] % remove the empty lines \coordinate [label=below left : $A$](A) at (0,0); \coordinate [label=below right : $B$](B) at (1,0); \coordinate [label=below right : $C$](C) at (1,1); \coordinate [label=above left : $D$](D) at (0,1); \coordinate (M) at (0.25,0); \coordinate (N) at (1,0.25); \coordinate (P) at (0.75,1); \coordinate (Q) at (0,0.75); \node[below left] at (M) {$M$}; \node[right] at (N) {$N$}; \node[above] at (P) {$P$}; \node[left] at (Q) {$Q$}; \node[left] at (0,1){$1$}; \node[below] at (1,0){$1$}; \draw (A)--(B)--(C)--(D)--cycle ; \draw [draw=red, fill=red!70](M)--(N)--(P)--(Q)--cycle ; \stopaxis \stoptikzpicture } } \placefigure[right]{third}{ \hbox{ I assume that you don't want an extra space \hbox{% \starttikzpicture \draw[draw=red,fill=red!70] (0,0) rectangle (3,3); \stoptikzpicture } } \stoptext - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Placement of a figure made with TiKz
Hello, I do not understand why figure 2 does not fit correctly like the other two. Thank you Fabrice \useMPlibrary[dum] \usemodule[tikz] \usemodule[pgfplots] \pgfplotsset{compat=newest} \usetikzlibrary{positioning} \usetikzlibrary{calc} \setuplayout [height=middle, width=middle, backspace=2cm, topspace=10mm, bottomspace=10mm, header=10mm, footer=10mm, footerdistance=10mm, headerdistance=10mm] \showframe \starttext \placefigure[right]{first}{\externalfigure[dummy]} \placefigure[right]{second}{ \hbox{ \starttikzpicture[thick] \switchtobodyfont[9pt] \startaxis[ x=3cm,y=3cm, axis line style = thick, major tick style=black, xtick={0,0.25,...,1},ytick={0,0.25,...,1}, ymin=-0.25,ymax=1.25,xmin=-0.25,xmax=1.5, axis on top=true, axis lines=middle, tickwidth=0.15cm, minor tick num=3, major tick style = {thick, black}, axis line style = thick, yticklabels={,,}, xticklabels={,,}, major tick style=black, extra x ticks={1.25}, extra x tick label={\null}, xlabel=$x$,ylabel=$y$, every axis x label/.style= { at={(ticklabel* cs:1)}, anchor=west }, every axis y label/.style= { at={(ticklabel* cs:1)}, anchor=south }, >=stealth] \coordinate [label=below left : $A$](A) at (0,0); \coordinate [label=below right : $B$](B) at (1,0); \coordinate [label=below right : $C$](C) at (1,1); \coordinate [label=above left : $D$](D) at (0,1); \coordinate (M) at (0.25,0); \coordinate (N) at (1,0.25); \coordinate (P) at (0.75,1); \coordinate (Q) at (0,0.75); \node[below left] at (M) {$M$}; \node[right] at (N) {$N$}; \node[above] at (P) {$P$}; \node[left] at (Q) {$Q$}; \node[left] at (0,1){$1$}; \node[below] at (1,0){$1$}; \draw (A)--(B)--(C)--(D)--cycle ; \draw [draw=red, fill=red!70](M)--(N)--(P)--(Q)--cycle ; \stopaxis \stoptikzpicture } } \placefigure[right]{third}{ \hbox{ \starttikzpicture \draw[draw=red,fill=red!70] (0,0) rectangle (3,3); \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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Placement of a figure
Hi, In this code, the figure is placed on the base line. How to make the numbering at the top of the figure ? \starttext \startitemize[n][stopper=),style=bf] \item \midaligned{\externalfigure[figure1_reperage.pdf]} \startitemize[a][stopper=),style=bf] \item Donner les coordonnées des points $A$ et $B$ dans le repère $\left(O,\, I,\, J\right)$. \item Compléter les phrases suivantes : les abscisses des points $A$ et $B$ sont $\ldots$ ; les ordonnées des points $A$ et $B$ sont $\dots\;$. \item Placer les points $C$ et $D$ de coordonnées respectives $\left(-2\,;3\right)$ et $\left(4\,;0\right)$. \item Placer le point $E$ de même abscisse que $C$ et d'ordonnée $-1$. \stopitemize \stoptext With LaTeX, I did this : \raisebox{-\height+1em}{\includegraphics{}} thank you ___ 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] Placement of a figure
Am 02.09.2014 um 12:43 schrieb Fabrice Couvreur fabrice1.couvr...@gmail.com: Hi, In this code, the figure is placed on the base line. How to make the numbering at the top of the figure ? \starttext \startitemize[n][stopper=),style=bf] \item \midaligned{\externalfigure[figure1_reperage.pdf]} \item \framed[frame=off,width=local,location=top]{\externalfigure[figure1_reperage.pdf]} 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] Placement of a figure
Hi Wolfgang, I have to put myself in the head that the command \framed[] is very important with ConteXt ! 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 ___