2007/11/29, Hans Hagen
Roger Mason wrote:
Hi Wolfgang,
"Wolfgang Schuster"
writes: \setupfloat[figure][default=none]
Thanks, but that did not work. The only thing that seems to work is to put {none} for the caption. However, that means I'm not going to have captions in the manuscript version either.
well, we can misuse the number= key .....
% patch, goes in cont-new.tex
\unprotect
\def\presetfloatvariables#1#2#3#4% {\doifcommonelse {#2} {\v!left,\v!right,\v!inner,\v!outer,% \v!inleft,\v!inright,\v!inmargin,% \v!backspace,\v!cutspace,% \v!innermargin,\v!outermargin,\v!inneredge,\v!outeredge,% \v!leftmargin,\v!leftedge,\v!rightmargin,\v!rightedge} {\global\parfloattrue} {\global\parfloatfalse}% \ifinsidecolumns \global\parfloatfalse \fi \global\sidefloatshift\zeropoint \global\sidefloatmaximum\zeropoint \global\chardef\sidefloatmethod\floatparameter\c!sidemethod \global\chardef\textfloatmethod\floatparameter\c!textmethod \global\chardef\sidefloatalign\zerocount \globallet\floatrotation\!!zerocount \calculatefloatskips \ifparfloat \processaction [\floatparameter\c!sidealign] [\v!height=>\global\chardef\sidefloatalign\plusone,% \v!line=>\global\chardef\sidefloatalign\plustwo,% (***) \v!depth=>\global\chardef\sidefloatalign\plusthree,% \v!grid=>\global\chardef\sidefloatalign4,% \v!halfline=>\global\chardef\sidefloatalign5]% % todo (test first): \doifinset\v!lokaal{#2}{\chardef\sidefloatalign\zerocount}% \ifcase\sidefloatalign\relax % todo: optie v!lokaal => \else \doifinset\v!height {#2}{\global\chardef\sidefloatalign\plusone}% \doifinset\v!line {#2}{\global\chardef\sidefloatalign\plustwo}% \doifinset\v!depth {#2}{\global\chardef\sidefloatalign\plusthree}% \doifinset\v!grid {#2}{\global\chardef\sidefloatalign4}% \doifinset\v!halfline{#2}{\global\chardef\sidefloatalign5}% meant for 'none' \fi \doifinset\v!high{#2}{\global\sidefloattopskip \zeropoint}% \doifinset\v!low {#2}{\global\sidefloatbottomskip\zeropoint}% \doifinset\v!fit {#2} {\global\sidefloattopskip \zeropoint \global\sidefloatbottomskip\zeropoint \global\floatsideskip \zeropoint}% \else \processallactionsinset [#2] [ 90=>\globallet\floatrotation\commalistelement,% 180=>\globallet\floatrotation\commalistelement,% 270=>\globallet\floatrotation\commalistelement]% \fi \doifinsetelse\v!nonumber{#2} {\global\nofloatnumbertrue} {\doifelse{\floatcaptionparameter\c!number}\v!yes {\global\nofloatnumberfalse} {\global\nofloatnumbertrue}}% \ConvertToConstant\doifelse{#4}{} {\global\emptyfloatcaptiontrue} {\global\emptyfloatcaptionfalse}% \doifinsetelse\v!none{#2} {\global\nofloatcaptiontrue} {\ConvertToConstant\doifelse{#4}\v!none {\global\nofloatcaptiontrue} {\global\nofloatcaptionfalse}}% \doif{\floatcaptionparameter\c!number}\v!none {\global\nofloatcaptiontrue}% \ifemptyfloatcaption \ifnofloatnumber \global\nofloatcaptiontrue \fi \fi}
\protect
\starttext
\placefigure{}{}
\setupcaptions[number=none]
\placefigure{}{}
\stoptext
(I'll add that to the core, but only if you wikify it)
and what is the difference in the output compared with my solution, the following works for me and I have no caption in the second figure. \starttext \placefigure{bla}{} \setupfloat[figure][default=none] \placefigure{bla}{} \stoptext Wolfgang