[NTG-context] Figure captions: "Fig." instead "Figure"
Hello, what is the way to change caption text for figures to be "Fig." instead of "Figure"? \setupcaptions[numberstopper={.},] changes "Figure 1" to "Figure 1.", but is there a similar key for the text? (\setupcations[prefix=] allows only "yes" or "no" - http://wiki.contextgarden.net/Command/setupcaptions ) Best regards, Lukas -- Ing. Lukáš Procházka | mailto:l...@pontex.cz Pontex s. r. o. | mailto:pon...@pontex.cz | http://www.pontex.cz | IDDS:nrpt3sn Bezová 1658 147 14 Praha 4 Mob.: +420 702 033 396 ___ 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] Figure captions in margin
I am using a layout with wide right margin. For floats that are \textwidth wide, I can place captions in the margin using**\setupcaption[location=rightmargin,high/low]. However, for figures that are (*\textwidth+\marginwidth+\margindistance*) wide, I would like to *place the caption in the margin below the figure*. I have tried spacebefore=\vskip but it doesn't seem to do anything. Another option was to use default caption location (below the figure) and add \hspace before figure placement. None of these work as I am not able to make spacebefore do anything. *MWE* \setuplayout[width=5cm, height=13cm,rightmargin=5cm] \setupexternalfigures[option=empty] \setupfloat[figure][location=inner] % \setupcaption [figure] [width=5cm, location={rightmargin,low}, spacebefore=big] %\setupcaption %[figure] %[width=5cm] \starttext \showframe \placefigure{A small but important caption.}{\externalfigure[cow][width=10cm]} \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] Figure captions in margin
On 2013–01–20 Devendra Ghate wrote: I am using a layout with wide right margin. For floats that are \textwidth wide, I can place captions in the margin using**\setupcaption[location=rightmargin,high/low]. However, for figures that are (*\textwidth+\marginwidth+\margindistance*) wide, I would like to *place the caption in the margin below the figure*. For a recent project I had the similar requirements. I did not find a proper solution. I attached an example of the code I used. However, it has several issues: 1) Margin floats and texts overlay and need manual adjustment. 2) The baseline of the float description does not match the baseline of the main text (fixed using manual trial and error). I used an ugly hack (toffset=7.5ex) to align the description vertically. 3) The \startplacesmartfigure is not very robust. My notes say “Do not indent \startplacesmartfigure”. I don't recall what the exact issue was. 4) Probably many more that I haven't discovered, yet. Feel free to suggest fixes for the mentioned issues. Marco \useMPlibrary [dum] \unprotect \setupfloat [figure] [default={top,bottom}] \setupfloat [table] [default={bottom,top}] \definefloat [margintable] [margintables] [table] \definefloat [marginfigure] [marginfigures] [figure] \setupcaptions [width=\marginwidth, prefix=no] \setupcaption [table] [location={outermargin, high}] \setupcaption [figure] [location={outermargin, high}] \setupcaption [marginfigure, margintable] [align=flushleft, location=bottom] \setupcaption [table, figure] [way=bytext] \setupfloat [marginfigure, margintable] [default=margin] \definefloat [widetable] [widetables] [table] \setupfloat [widetable] [location=inner] \definefloat [widefigure] [widefigures] [figure] \setupfloat [widefigure] [location=inner] \defineframed [caption_framed] [frame=off, offset=overlay, location=high, toffset=7.5ex] \starttexdefinition caption_command #1 \caption_framed{#1} \stoptexdefinition \setupcaption [widetable] [location={outermargin, low}, command=\caption_command] \setupcaption [widefigure] [location={outermargin, low}, command=\caption_command] \newtoks\t_smart_figure_args \starttexdefinition startplacesmartfigure [#1] \t_smart_figure_args={#1} \grabbufferdata [smart_figure_buffer] [startplacesmartfigure] [stopplacesmartfigure] \stoptexdefinition \startluacode userdata = userdata or { } function userdata.do_place_smart_figure(width) context.unprotect() if tex.sp(width) = tex.dimen.rightmarginwidth + tex.sp(.1pt) then context.startplacemarginfigure{tex.toks.t_smart_figure_args} tex.print(buffers.getcontent(smart_figure_buffer)) context.stopplacemarginfigure() else if tex.sp(width) = tex.dimen.textwidth + tex.sp(.1pt) then context.startplacefigure{tex.toks.t_smart_figure_args} tex.print(buffers.getcontent(smart_figure_buffer)) context.stopplacefigure() else context.startplacewidefigure{tex.toks.t_smart_figure_args} tex.print(buffers.getcontent(smart_figure_buffer)) context.stopplacewidefigure() end end context.protect() end \stopluacode \starttexdefinition stopplacesmartfigure \scratchdimen\hsize \hsize\maxdimen \setbox\scratchbox\vbox{\getbuffer[smart_figure_buffer]} \hsize\scratchdimen \luacode{userdata.do_place_smart_figure(\the\wd\scratchbox)} \stoptexdefinition \protect \starttext \startplacesmartfigure [title=Foo] \externalfigure [dummy] [width=\rightmarginwidth, height=3cm] \stopplacesmartfigure \dorecurse{5}{%% \input knuth\par} \startplacesmartfigure [title=\input ward\par] \externalfigure [dummy] [width=\textwidth, height=8cm] \stopplacesmartfigure \startplacesmartfigure [title=\input ward\par] \externalfigure [dummy] [width=\dimexpr\textwidth+\rightmargintotal\relax, height=3cm] \stopplacesmartfigure \stoptext signature.asc Description: Digital signature ___ 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] Figure captions in margin
Hello Marco, Your code goes well beyond what I was looking for. As I am working on a deadline right now, I am just going to use the frame trick to place the caption for wide figures. However, expect to hear from me in future regarding this code. Regards, Devendra On 01/20/2013 09:31 PM, Marco Patzer wrote: On 2013--01--20 Devendra Ghate wrote: I am using a layout with wide right margin. For floats that are \textwidth wide, I can place captions in the margin using**\setupcaption[location=rightmargin,high/low]. However, for figures that are (*\textwidth+\marginwidth+\margindistance*) wide, I would like to *place the caption in the margin below the figure*. For a recent project I had the similar requirements. I did not find a proper solution. I attached an example of the code I used. However, it has several issues: 1) Margin floats and texts overlay and need manual adjustment. 2) The baseline of the float description does not match the baseline of the main text (fixed using manual trial and error). I used an ugly hack (toffset=7.5ex) to align the description vertically. 3) The \startplacesmartfigure is not very robust. My notes say Do not indent \startplacesmartfigure. I don't recall what the exact issue was. 4) Probably many more that I haven't discovered, yet. Feel free to suggest fixes for the mentioned issues. 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 ___ ___ 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] figure captions in the margin
Hello, I want to have captions for figures, listings and other stuff inside the document margin. I saw that someone asked a very similar question 3 years ago: http://archive.contextgarden.net/message/20061025.211202.c2e04f8c.en.html Does somebody know whether it is possible and how it is possible to place the caption of a figure in the margin? yes, actually i implemented this last week but i need to update the details manual; captions can go in margins, hang in centered figures, there is support for all kind of inner/outer alignments etc Hans said, that he had already implemented that feature, but in fact it still doesn't work. So the code \setupcaptions[location=outermargin] \starttext \placefigure{Caption}{\framed{Figuur}} \stoptext still prints no caption at all. I am using Ubuntu 8.04 and ConTeXt from the repositories. Is this version too old? Thank You. Richard ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] figure captions in the margin
Hello, I want to have captions for figures, listings and other stuff inside the document margin. I saw that somone asked a very similar question 3 years ago: http://archive.contextgarden.net/message/20061025.211202.c2e04f8c.en.html Does somebody know whether it is possible and how it is possible to place the caption of a figure in the margin? yes, actually i implemented this last week but i need to update the details manual; captions can go in margins, hang in centered figures, there is support for all kind of inner/outer alignments etc Hans said, that he had already implemented that feature, but in fact it still doesn't work. So the code \setupcaptions[location=outermargin] \starttext \placefigure{Caption}{\framed{Figuur}} \stoptext still prints no caption at all. Am I missing something? Thank You. Best regards Richard ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Figure Captions and Equation Numbers
Wolfgang, Thank you very much for both solutions. They work like a charm! Best regards, Ernesto ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] figure captions in the margin
Alex Lubberts wrote: Hi, Does somebody know whether it is possible and how it is possible to place the caption of a figure in the margin? yes, actually i implemented this last week but i need to update the details manual; captions can go in margins, hang in centered figures, there is support for all kind of inner/outer alignments etc Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] figure captions in the margin
On wo, 2006-10-25 at 18:44 +0200, Hans Hagen wrote: Does somebody know whether it is possible and how it is possible to place the caption of a figure in the margin? yes, actually i implemented this last week but i need to update the details manual; captions can go in margins, hang in centered figures, there is support for all kind of inner/outer alignments etc Great! I looked at the source to find out how to do it. Am I right in thinking that this should work? \setupcaptions[location=outermargin] \starttext \placefigure{Caption}{\framed{Figuur}} \stoptext However, when I try this, there is no caption printed at all. Am I doing something wrong? (Perhaps, can I be of any assistance?) Regards, Alex ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] figure captions in the margin
Alex Lubberts wrote: On wo, 2006-10-25 at 18:44 +0200, Hans Hagen wrote: Does somebody know whether it is possible and how it is possible to place the caption of a figure in the margin? yes, actually i implemented this last week but i need to update the details manual; captions can go in margins, hang in centered figures, there is support for all kind of inner/outer alignments etc Great! I looked at the source to find out how to do it. Am I right in thinking that this should work? \setupcaptions[location=outermargin] \starttext \placefigure{Caption}{\framed{Figuur}} \stoptext However, when I try this, there is no caption printed at all. Am I doing something wrong? (Perhaps, can I be of any assistance?) Regards, Alex ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context -- - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl - text-109.tex Description: TeX document ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] figure captions in the margin
Hi, Does somebody know whether it is possible and how it is possible to place the caption of a figure in the margin? Thanks, Alex Lubberts ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Figure captions with text in wrong language
Title: Message Hi, I'd like my figures to have dutch captions when I write a text in dutch. Unfortunately, context shows my captions with the text "Figure" instead of "Figuur", which would be the dutch way. My code looks like this: % output=pdf \language[nl] \starttext \placefigure [here] [fig:uur] {Figuur een} {} \stoptext and the text shown is "Figure 1 Figuur een". I use texexec version 5.2.5 with cont-nl version 2005.03.16. I assumed setting the language to nl would give me dutch captions. What did I miss? Cheers, Roelof Langman ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Figure captions with text in wrong language
Roelof Langman wrote: Hi, I'd like my figures to have dutch captions when I write a text in dutch. Unfortunately, context shows my captions with the text Figure instead of Figuur, which would be the dutch way. My code looks like this: % output=pdf \language[nl] \mainlanguage[nl] (\language is for a local switch) \starttext \placefigure [here] [fig:uur] {Figuur een} {} \stoptext and the text shown is Figure 1 Figuur een. I use texexec version 5.2.5 with cont-nl version 2005.03.16. I assumed setting the language to nl would give me dutch captions. What did I miss? Cheers, Roelof Langman ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context -- - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Figure captions with text in wrong language
Roelof Langman wrote: Hi, I'd like my figures to have dutch captions when I write a text in dutch. Unfortunately, context shows my captions with the text Figure instead of Figuur, which would be the dutch way. My code looks like this: % output=pdf \language[nl] Perhaps: \mainlanguage[nl] vit \starttext \placefigure [here] [fig:uur] {Figuur een} {} \stoptext and the text shown is Figure 1 Figuur een. I use texexec version 5.2.5 with cont-nl version 2005.03.16. I assumed setting the language to nl would give me dutch captions. What did I miss? Cheers, Roelof Langman ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Figure captions
Hi, Does anybody know how I can get a dot after the figure number in a caption, without 'promoting' that dot to figure references in the body text as well? I remember I've had this problem before, but that was a long time ago and I don't remember the solution any more. Greetings, Taco ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Figure captions
On Wed, 5 Jan 2005, Taco Hoekwater wrote: Hi, Does anybody know how I can get a dot after the figure number in a caption, without 'promoting' that dot to figure references in the body text as well? \let\floatcaptionsuffix=. Greetings Albrecht ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context