ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Text overflowing on a figure included in a float
@ 2018-04-08  9:08 Fabrice Couvreur
  2018-04-08  9:54 ` Hans Hagen
  0 siblings, 1 reply; 5+ messages in thread
From: Fabrice Couvreur @ 2018-04-08  9:08 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 2687 bytes --]

Hello,
Sorry if the example is not minimal but otherwise it would be difficult to
explain the problem. The text overflows on the figure and I do not know how
to correct this.
Thank you
Fabrice


\usemodule[pgfplots]

\pgfplotsset{compat=newest}

\starttext
\placefigure[right,none]{}{
\hbox{\framed{\switchtobodyfont[8pt]
\starttikzpicture[/pgf/declare function={g(\x)=3*\x +7;},/pgf/declare
function={f(\x)=-4*\x +1;},/pgf/declare function={h(\x)=2*\x
-5;}]
\startaxis[
 restrict x to domain=-20:20, xmax=20, xmin=-20,
 restrict y to domain=-25:30, ymax=30, ymin=-25,
 x=0.1cm,
 y=0.1cm,
 axis x line = middle,
 axis y line = middle,
 axis line style =  thick,
 major grid style=gray,
 minor grid style=gray,
 tickwidth=0.1cm,
 xtick align=outside,
 ytick align=outside,
 grid=both,
 xtick={-15,-10,...,15},
 ytick={-20,-15,...,25},
 xticklabels={\empty,\empty,\empty,\empty,5,\empty,\empty,\empty},
 yticklabels={\empty,\empty,\empty,\empty,\empty,5,\empty,\empty,\empty,\empty,\empty,\empty},
 extra x ticks={-20,20},
 extra x tick label={\null},
 extra y ticks={-25,30},
 extra y tick label={\null},
 extra tick style={tick style={draw=none}},
 every tick/.style={
        black,
        thick,
      },
 y tick label style={
           /pgf/number format/1000 sep={}
       },
 xlabel=$x$,ylabel=$y$,
 every axis x label/.style={
    at={(ticklabel* cs:1.01)},
    anchor=west,
},
every axis y label/.style={
    at={(ticklabel* cs:1.01)},
    anchor=south,
},
 samples=2000,
 >=stealth,
]

\addplot [smooth,domain=-20:20,thick,darkblue] {f(x)} ;
\addplot [smooth,domain=-20:20,thick,darkred] {g(x)} ;
\addplot [smooth,domain=-20:20,thick,yellow] {h(x)} ;

\draw[thick,darkgreen](5,-25)--(5,30) ;

\node[below left=2pt] at (-0.1,-0.1,0) {\math{0}} ;

\stopaxis
\stoptikzpicture}}}
  \startitemize[n]
  \item On considère les droites \math{{\cal D}\,\colon x=5} et \math{{\cal
D'}\,\colon y=3x+7}.

    \startitemize[a]
    \item Que vaut l'abscisse du point d'intersection de \math{{\cal D}} et
\math{{\cal D'}} ?
    \item Calculer alors son ordonnée.
    \item Interpréter graphiquement le résultat sur le graphique.
    \stopitemize
  \item On considère les droites \math{\Delta \,\colon y=-4x+1} et
\math{\Delta '\,\colon y=2x-5}.

    \startitemize[a]
    \item Résoudre l'équation \math{-4x+1=2x-5}.
    \item Donner une interprétation graphique de la solution obtenue.
    \item Donner les coordonnées du point d'intersection de \math{\Delta}
et \math{\Delta '}.
    \item Interpréter graphiquement le résultat sur le graphique.
    \stopitemize
  \stopitemize
\stoptext

[-- Attachment #1.2: Type: text/html, Size: 3376 bytes --]

[-- Attachment #2: Type: text/plain, Size: 492 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Text overflowing on a figure included in a float
  2018-04-08  9:08 Text overflowing on a figure included in a float Fabrice Couvreur
@ 2018-04-08  9:54 ` Hans Hagen
  2018-04-09 16:33   ` Fabrice Couvreur
  0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2018-04-08  9:54 UTC (permalink / raw)
  To: ntg-context

On 4/8/2018 11:08 AM, Fabrice Couvreur wrote:
> Hello,
> Sorry if the example is not minimal but otherwise it would be difficult 
> to explain the problem. The text overflows on the figure and I do not 
> know how to correct this.

By choosing the right language:

\mainlanguage[fr]

or increasing the tolerance:

% \setuptolerance[stretch,verytolerant]


> Thank you
> Fabrice
> 
> 
> \usemodule[pgfplots]
> 
> \pgfplotsset{compat=newest}
> 
> \starttext
> \placefigure[right,none]{}{
> \hbox{\framed{\switchtobodyfont[8pt]
> \starttikzpicture[/pgf/declare function={g(\x)=3*\x +7;},/pgf/declare 
> function={f(\x)=-4*\x +1;},/pgf/declare function={h(\x)=2*\x -5;}]
> \startaxis[
>   restrict x to domain=-20:20, xmax=20, xmin=-20,
>   restrict y to domain=-25:30, ymax=30, ymin=-25,
>   x=0.1cm,
>   y=0.1cm,
>   axis x line = middle,
>   axis y line = middle,
>   axis line style =  thick,
>   major grid style=gray,
>   minor grid style=gray,
>   tickwidth=0.1cm,
>   xtick align=outside,
>   ytick align=outside,
>   grid=both,
>   xtick={-15,-10,...,15},
>   ytick={-20,-15,...,25},
>   xticklabels={\empty,\empty,\empty,\empty,5,\empty,\empty,\empty},
>   yticklabels={\empty,\empty,\empty,\empty,\empty,5,\empty,\empty,\empty,\empty,\empty,\empty},
>   extra x ticks={-20,20},
>   extra x tick label={\null},
>   extra y ticks={-25,30},
>   extra y tick label={\null},
>   extra tick style={tick style={draw=none}},
>   every tick/.style={
>          black,
>          thick,
>        },
>   y tick label style={
>             /pgf/number format/1000 sep={}
>         },
>   xlabel=$x$,ylabel=$y$,
>   every axis x label/.style={
>      at={(ticklabel* cs:1.01)},
>      anchor=west,
> },
> every axis y label/.style={
>      at={(ticklabel* cs:1.01)},
>      anchor=south,
> },
>   samples=2000,
>   >=stealth,
> ]
> 
> \addplot [smooth,domain=-20:20,thick,darkblue] {f(x)} ;
> \addplot [smooth,domain=-20:20,thick,darkred] {g(x)} ;
> \addplot [smooth,domain=-20:20,thick,yellow] {h(x)} ;
> 
> \draw[thick,darkgreen](5,-25)--(5,30) ;
> 
> \node[below left=2pt] at (-0.1,-0.1,0) {\math{0}} ;
> 
> \stopaxis
> \stoptikzpicture}}}
>    \startitemize[n]
>    \item On considère les droites \math{{\cal D}\,\colon x=5} et 
> \math{{\cal D'}\,\colon y=3x+7}.
> 
>      \startitemize[a]
>      \item Que vaut l'abscisse du point d'intersection de \math{{\cal 
> D}} et \math{{\cal D'}} ?
>      \item Calculer alors son ordonnée.
>      \item Interpréter graphiquement le résultat sur le graphique.
>      \stopitemize
>    \item On considère les droites \math{\Delta \,\colon y=-4x+1} et 
> \math{\Delta '\,\colon y=2x-5}.
> 
>      \startitemize[a]
>      \item Résoudre l'équation \math{-4x+1=2x-5}.
>      \item Donner une interprétation graphique de la solution obtenue.
>      \item Donner les coordonnées du point d'intersection de 
> \math{\Delta} et \math{\Delta '}.
>      \item Interpréter graphiquement le résultat sur le graphique.
>      \stopitemize
>    \stopitemize
> \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
> ___________________________________________________________________________________
> 


-- 

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Text overflowing on a figure included in a float
  2018-04-08  9:54 ` Hans Hagen
@ 2018-04-09 16:33   ` Fabrice Couvreur
  2018-04-09 17:44     ` Hans Hagen
  0 siblings, 1 reply; 5+ messages in thread
From: Fabrice Couvreur @ 2018-04-09 16:33 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 4924 bytes --]

Hi Hans,
The solution you propose fixes the problem with the attached file, thanks.
However, the problem is not solved if I use the class you created for the
document
​ fonts-mkiv.​
Fabrice

2018-04-08 11:54 GMT+02:00 Hans Hagen <j.hagen@xs4all.nl>:

> On 4/8/2018 11:08 AM, Fabrice Couvreur wrote:
>
>> Hello,
>> Sorry if the example is not minimal but otherwise it would be difficult
>> to explain the problem. The text overflows on the figure and I do not know
>> how to correct this.
>>
>
> By choosing the right language:
>
> \mainlanguage[fr]
>
> or increasing the tolerance:
>
> % \setuptolerance[stretch,verytolerant]
>
>
> Thank you
>> Fabrice
>>
>>
>> \usemodule[pgfplots]
>>
>> \pgfplotsset{compat=newest}
>>
>> \starttext
>> \placefigure[right,none]{}{
>> \hbox{\framed{\switchtobodyfont[8pt]
>> \starttikzpicture[/pgf/declare function={g(\x)=3*\x +7;},/pgf/declare
>> function={f(\x)=-4*\x +1;},/pgf/declare function={h(\x)=2*\x -5;}]
>> \startaxis[
>>   restrict x to domain=-20:20, xmax=20, xmin=-20,
>>   restrict y to domain=-25:30, ymax=30, ymin=-25,
>>   x=0.1cm,
>>   y=0.1cm,
>>   axis x line = middle,
>>   axis y line = middle,
>>   axis line style =  thick,
>>   major grid style=gray,
>>   minor grid style=gray,
>>   tickwidth=0.1cm,
>>   xtick align=outside,
>>   ytick align=outside,
>>   grid=both,
>>   xtick={-15,-10,...,15},
>>   ytick={-20,-15,...,25},
>>   xticklabels={\empty,\empty,\empty,\empty,5,\empty,\empty,\empty},
>>   yticklabels={\empty,\empty,\empty,\empty,\empty,5,\empty,\
>> empty,\empty,\empty,\empty,\empty},
>>   extra x ticks={-20,20},
>>   extra x tick label={\null},
>>   extra y ticks={-25,30},
>>   extra y tick label={\null},
>>   extra tick style={tick style={draw=none}},
>>   every tick/.style={
>>          black,
>>          thick,
>>        },
>>   y tick label style={
>>             /pgf/number format/1000 sep={}
>>         },
>>   xlabel=$x$,ylabel=$y$,
>>   every axis x label/.style={
>>      at={(ticklabel* cs:1.01)},
>>      anchor=west,
>> },
>> every axis y label/.style={
>>      at={(ticklabel* cs:1.01)},
>>      anchor=south,
>> },
>>   samples=2000,
>>   >=stealth,
>> ]
>>
>> \addplot [smooth,domain=-20:20,thick,darkblue] {f(x)} ;
>> \addplot [smooth,domain=-20:20,thick,darkred] {g(x)} ;
>> \addplot [smooth,domain=-20:20,thick,yellow] {h(x)} ;
>>
>> \draw[thick,darkgreen](5,-25)--(5,30) ;
>>
>> \node[below left=2pt] at (-0.1,-0.1,0) {\math{0}} ;
>>
>> \stopaxis
>> \stoptikzpicture}}}
>>    \startitemize[n]
>>    \item On considère les droites \math{{\cal D}\,\colon x=5} et
>> \math{{\cal D'}\,\colon y=3x+7}.
>>
>>      \startitemize[a]
>>      \item Que vaut l'abscisse du point d'intersection de \math{{\cal D}}
>> et \math{{\cal D'}} ?
>>      \item Calculer alors son ordonnée.
>>      \item Interpréter graphiquement le résultat sur le graphique.
>>      \stopitemize
>>    \item On considère les droites \math{\Delta \,\colon y=-4x+1} et
>> \math{\Delta '\,\colon y=2x-5}.
>>
>>      \startitemize[a]
>>      \item Résoudre l'équation \math{-4x+1=2x-5}.
>>      \item Donner une interprétation graphique de la solution obtenue.
>>      \item Donner les coordonnées du point d'intersection de
>> \math{\Delta} et \math{\Delta '}.
>>      \item Interpréter graphiquement le résultat sur le graphique.
>>      \stopitemize
>>    \stopitemize
>> \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/list
>> info/ntg-context
>> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
>> archive  : https://bitbucket.org/phg/context-mirror/commits/
>> wiki     : http://contextgarden.net
>> ____________________________________________________________
>> _______________________
>>
>>
>
> --
>
> -----------------------------------------------------------------
>                                           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/list
> info/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> ____________________________________________________________
> _______________________

[-- Attachment #1.2: Type: text/html, Size: 7361 bytes --]

[-- Attachment #2: Type: text/plain, Size: 492 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Text overflowing on a figure included in a float
  2018-04-09 16:33   ` Fabrice Couvreur
@ 2018-04-09 17:44     ` Hans Hagen
  2018-04-09 19:48       ` Fabrice Couvreur
  0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2018-04-09 17:44 UTC (permalink / raw)
  To: ntg-context

On 4/9/2018 6:33 PM, Fabrice Couvreur wrote:
> Hi Hans,
> The solution you propose fixes the problem with the attached file, thanks.
> However, the problem is not solved if I use the class you created for 
> the document
> ​ fonts-mkiv.​
class? you mean the style? well, it's for that manual so for english ... 
which means that you need to set the language

Hans

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Text overflowing on a figure included in a float
  2018-04-09 17:44     ` Hans Hagen
@ 2018-04-09 19:48       ` Fabrice Couvreur
  0 siblings, 0 replies; 5+ messages in thread
From: Fabrice Couvreur @ 2018-04-09 19:48 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1450 bytes --]

Hi Hans,
It's true I wanted to talk about style and not class.
I added  \mainlanguage [fr].
Fabrice

2018-04-09 19:44 GMT+02:00 Hans Hagen <j.hagen@xs4all.nl>:

> On 4/9/2018 6:33 PM, Fabrice Couvreur wrote:
>
>> Hi Hans,
>> The solution you propose fixes the problem with the attached file, thanks.
>> However, the problem is not solved if I use the class you created for the
>> document
>> ​ fonts-mkiv.​
>>
> class? you mean the style? well, it's for that manual so for english ...
> which means that you need to set the language
>
> Hans
>
>
> -----------------------------------------------------------------
>                                           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/list
> info/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> ____________________________________________________________
> _______________________
>

[-- Attachment #1.2: Type: text/html, Size: 3048 bytes --]

[-- Attachment #2: Type: text/plain, Size: 492 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-04-09 19:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-08  9:08 Text overflowing on a figure included in a float Fabrice Couvreur
2018-04-08  9:54 ` Hans Hagen
2018-04-09 16:33   ` Fabrice Couvreur
2018-04-09 17:44     ` Hans Hagen
2018-04-09 19:48       ` Fabrice Couvreur

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