Hello, I have this definition: \def\oneplot#1#2#3% {\placefigure [here][#3] {\bfc #2} {\hfil \scale[width=10.5cm]{#1} \hfil} } (It is modified from an example on the wiki that takes only the first two arguments). I use it like this: \oneplot % image % caption % reference {\externalfigure[Fluorita_green]} {Fluorite cleavage} {cleavage} but the reference is ignored and I get ?? in the compiled document. Could someone point out my error please? Cheers, Roger
2007/12/17, Roger Mason
Hello,
I have this definition:
\def\oneplot#1#2#3% {\placefigure [here][#3] {\bfc #2} {\hfil \scale[width=10.5cm]{#1} \hfil} }
(It is modified from an example on the wiki that takes only the first two arguments).
I use it like this:
\oneplot % image % caption % reference {\externalfigure[Fluorita_green]} {Fluorite cleavage} {cleavage}
but the reference is ignored and I get ?? in the compiled document.
Could someone point out my error please?
Cheers, Roger
\define[3]\oneplot {\placefigure[here][#3]{\bfc#2}{\scale[width=10.5cm]{#1}}} \starttext \oneplot{\blackrule[width=1cm,height=1cm]}{Blackrule}{plot:blackrule} See at \in{Plot}[plot:blackrule]. \stoptext Alternative solution with a real ConTeXt definition: \definefloat[plot][plots][figure] \setupfloat[plot][command={\scale[width=5cm]}] \starttext \placefigure{Blackrule}{\blackrule[width=1cm,height=1cm]} \placeplot{Blackrule}{{\blackrule[width=1cm,height=1cm]}} \stoptext Wolfgang
Hello Wolfgang,
"Wolfgang Schuster"
\define[3]\oneplot {\placefigure[here][#3]{\bfc#2}{\scale[width=10.5cm]{#1}}}
\starttext \oneplot{\blackrule[width=1cm,height=1cm]}{Blackrule}{plot:blackrule} See at \in{Plot}[plot:blackrule]. \stoptext
Alternative solution with a real ConTeXt definition:
\definefloat[plot][plots][figure] \setupfloat[plot][command={\scale[width=5cm]}] \starttext \placefigure{Blackrule}{\blackrule[width=1cm,height=1cm]} \placeplot{Blackrule}{{\blackrule[width=1cm,height=1cm]}} \stoptext
Both methods work fine. Given that I'm using Context then I will use the Contextish way of doing things. Many thanks for you help, Roger
2007/12/18, Roger Mason
Hello again,
"Wolfgang Schuster"
writes: \definefloat[plot][plots][figure] \setupfloat[plot][command={\scale[width=5cm]}]
What would the plural form be used for? Could I use it to define a combination? If so, how?
Thanks for the help,
Roger
You need normaly only two parameters for \definefloat, e.g. the example \definefloat[plot][plot] create the command \placeplot to place the plots in your document and the commands \placelistofplots and \completelistofplots to place a content list with a plots in your document. The \definefloat command with three arguments did the same thing, but the caption of the plots is taken from \placefigure and the plotnumber is also incremented with every figure in your document. Wolfgang
participants (2)
-
Roger Mason
-
Wolfgang Schuster