Re: [NTG-context] How to make Figure captions justify if long?
In your example, the caption is limited to image width. What I want is something as \setupcaption[figure][width=\textwidth, align=middle] does. But long texts should behave as document text (hyphenated, including). Thanks by attention. -- Wagner Macedo On 9 February 2012 04:34, Steffen Wolfrum cont...@st.estfiles.de wrote: How about this: \starttext \placefigure[here]{This is just an example for this is just an example for this is just an example for this is just an example for this is just an example for this is just an example for this}{\externalfigure[any][width=0.5\textwidth]} \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] How to make Figure captions justify if long?
On Thu, Feb 09 2012, Wagner Macedo wrote: My layout style require that table or figure captions stay centered only if short. If long, it needs that the caption be justified (like normal text, but less width). --8---cut here---start-8--- \defineframed[FullWidth][offset=overlay, width=\textwidth, frame=off, align=middle] \starttext \placefigure[here]{\input tufte\relax} {\FullWidth{\externalfigure[any][width=3cm]}} \placefigure[here]{Short} {\FullWidth{\externalfigure[any][width=3cm]}} \stoptext --8---cut here---end---8--- Is this a solution? -- Peter ___ 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 Figure captions justify if long?
Yes, thank you. And to not need to enclose \externalfigure with \FullWidth, I found that I can set the command attribute on \setupfloat[figure] as following: \defineframed[FullWidth][offset=overlay, width=\textwidth, frame=off, align=middle] \setupfloat[figure][command=\FullWidth] -- Wagner Macedo On 9 February 2012 09:06, Peter Münster pmli...@free.fr wrote: Is this a solution? ___ 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 Figure captions justify if long?
On 2012-02-09 Peter Münster pmli...@free.fr wrote: \defineframed[FullWidth][offset=overlay, width=\textwidth, frame=off, align=middle] \starttext \placefigure[here]{\input tufte\relax} {\FullWidth{\externalfigure[any][width=3cm]}} \placefigure[here]{Short} {\FullWidth{\externalfigure[any][width=3cm]}} \stoptext Is this a solution? This looks like the solution, yes. However you scatter the source with \FullWidth commands. Wagners solution seems to be more clean. So we end up with the following: %%% % Sorry Aditya, for not using your kitties ;) \useMPlibrary [dum] \defineframed [FigureFramed] [ width=.8\textwidth, offset=overlay, frame=off, ] % Doesn't work :( Why not? %\setupfloat [figure] [width=.8\textwidth] \setupfloat [figure] [command=\FigureFramed] \starttext \startplacefigure [title=Foo Bar] \externalfigure [placeholder] \stopplacefigure \startplacefigure [title={\input tufte\par}] \externalfigure [placeholder] \stopplacefigure \input knuth \stoptext %%% But the question is, why does setting the float width in \setupfloat fail? What else is it supposed to do? It doesn't seem to do anything. Marco ___ 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] How to make Figure captions justify if long?
Hello, The title is not self explaining, I'll try to do this. My layout style require that table or figure captions stay centered only if short. If long, it needs that the caption be justified (like normal text, but less width). In LaTeX, I know that this works on article document class, like the pdf file I attached shows. -- Wagner Macedo test.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] How to make Figure captions justify if long?
On 2012-02-08 Wagner Macedo wagnerluis1...@gmail.com wrote: My layout style require that table or figure captions stay centered only if short. If long, it needs that the caption be justified (like normal text, but less width). I don't know if I get you right, but I think you are talking about the width of the caption. It adaptes to the with of the figure. There is the “minwidth” parameter for \setupcaptions, but since the short captions will not be centred it's probably not what you aim for. I don't have a solution, but a workaround that alters the global width setting for an individual caption: \useMPlibrary [dum] \starttext \startplacefigure [title=Foo Bar] \externalfigure [placeholder] \stopplacefigure \setupcaptions [width=.8\textwidth] \startplacefigure [title={\input tufte\par}] \externalfigure [placeholder] \stopplacefigure \setupcaptions [width=fit] \startplacefigure [title=Foo Bar] \externalfigure [placeholder] \stopplacefigure \input knuth \stoptext Marco ___ 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 Figure captions justify if long?
Thanks by the answer, but I had already thought in this. I would like something more definitive. By the way, at http://wiki.contextgarden.net/Reference/en/setupcaptions I can see a command argument. I was wondering if a custom command can do the trick, but I don't know how I should use this arg and what it is for. -- Wagner Macedo On 8 February 2012 21:43, Marco net...@lavabit.com wrote: I don't know if I get you right, but I think you are talking about the width of the caption. It adaptes to the with of the figure. There is the “minwidth” parameter for \setupcaptions, but since the short captions will not be centred it's probably not what you aim for. I don't have a solution, but a workaround that alters the global width setting for an individual caption: ___ 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 Figure captions justify if long?
Am 09.02.2012 um 02:13 schrieb Wagner Macedo: Thanks by the answer, but I had already thought in this. I would like something more definitive. How about this: \starttext \placefigure[here]{This is just an example for this is just an example for this is just an example for this is just an example for this is just an example for this is just an example for this}{\externalfigure[any][width=0.5\textwidth]} \stoptext --- Steffen ___ 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 ___