From: "Wolfgang Schuster" <schuster.wolfgang@googlemail.com>
Subject: Re: figurenumbering
Date: Thu, 5 Oct 2006 12:35:11 +0200 [thread overview]
Message-ID: <115224fb0610050335y7c8e55f3nfa1f5fc66c9a51e8@mail.gmail.com> (raw)
In-Reply-To: <45217FDC.29825.E3688E@wwl.musensturm.de>
[-- Attachment #1.1: Type: text/plain, Size: 2082 bytes --]
2006/10/2, Wolfgang Werners-Lucchini <wwl@musensturm.de>:
>
> > This was your example (not exactly the same) you posted as your
> > first example file and works now as expected.
>
> Ahh! I should implement my own testsuit.
>
> Wolfgang
Hi Wolfgang
you should not only make a testsuit.
It is normaly better to work with highlevel macros in your document to
easily
replace the macrodefinition than replacing the macros in your document.
I made a first step for your document.
<example>
\unprotect
% increment the floatnumber
\def\incrementfloatnumber%
{\dodoubleempty\doincrementfloatnumber}
\def\doincrementfloatnumber[#1][#2]%
{\ifsecondargument
\dodoincrementfloatnumber[#1][#2]%
\else\iffirstargument
\dodoincrementfloatnumber[#1][1]%
\fi\fi}
\def\dodoincrementfloatnumber[#1][#2]%
{\count1=0
\loop
\ifnum\count1<#2
\advance\count1 by 1
\incrementnumber[#1]
\repeat}
% set the number
\def\setfloatnumber%
{\dodoubleempty\dosetfloatnumber}
\def\dosetfloatnumber[#1][#2]%
{\ifnum#2<\rawnumber[#1]
\message{:::: Your number need to be higher than the current
counter-value ::::}
\else
\count2=#2
\advance\count2 by -\rawnumber[#1]
\incrementfloatnumber[#1][\count2]
\fi}
% Todo:
%
% \definefloatnumber[#1]
%
% example:
% \definefloatnumber[figure]
% o \incrementfigurenumber[#1] --> \incrementfloatnumber[figure][#1]
% o \setfigurenumber[#1] --> \setfloatnumber[figure][#1]
\protect
\starttext
\placefigure{}{\framed{Blub}}
\placefigure{}{\framed{Bautz}}
\placefigure{}{\framed{Bla}}
This were \rawnumber[figure] figures by now!
\setnumber[figure]{8}
We want to count on with \rawnumber[figure].
\placefigure{}{\framed{Plong}}
Figurenumber is incremented to \rawnumber[figure].
\placefigure{}{\framed{Plong}}
\incrementnumber[figure]
\placefigure{}{\framed{Plong}}
\incrementfloatnumber[figure][2]
\placefigure{}{\framed{Plong}}
\setfloatnumber[figure][25]
\placefigure{}{\framed{Plong}}
\setfloatnumber[figure][12]
\placefigure{}{\framed{Plong}}
\stoptext
</example>
Wolfgang
[-- Attachment #1.2: Type: text/html, Size: 3078 bytes --]
[-- Attachment #2: Type: text/plain, Size: 139 bytes --]
_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context
next prev parent reply other threads:[~2006-10-05 10:35 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.167.1159780405.16231.ntg-context@ntg.nl>
2006-10-02 19:08 ` figurenumbering Wolfgang Werners-Lucchini
2006-10-05 10:35 ` Wolfgang Schuster [this message]
[not found] <mailman.858.1158597384.2039.ntg-context@ntg.nl>
2006-10-10 19:22 ` figurenumbering Wolfgang Werners-Lucchini
[not found] <mailman.1.1159524004.8643.ntg-context@ntg.nl>
2006-09-29 18:53 ` figurenumbering Wolfgang Werners-Lucchini
2006-10-01 12:42 ` figurenumbering Wolfgang Schuster
[not found] <mailman.1.1159437602.22722.ntg-context@ntg.nl>
2006-09-28 17:30 ` figurenumbering Wolfgang Werners-Lucchini
2006-09-29 9:43 ` figurenumbering Wolfgang Schuster
[not found] <mailman.788.1158330124.2039.ntg-context@ntg.nl>
2006-09-17 11:59 ` figurenumbering Wolfgang Werners-Lucchini
2006-09-17 14:10 ` figurenumbering Hans Hagen
2006-09-18 11:42 ` figurenumbering Wolfgang Schuster
2006-09-28 6:33 ` figurenumbering Wolfgang Schuster
[not found] <mailman.694.1157608687.2039.ntg-context@ntg.nl>
2006-09-07 20:03 ` figurenumbering Wolfgang Werners-Lucchini
2006-09-15 11:05 ` figurenumbering Wolfgang Schuster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=115224fb0610050335y7c8e55f3nfa1f5fc66c9a51e8@mail.gmail.com \
--to=schuster.wolfgang@googlemail.com \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).