Creating and working with counters

M

Marko Pinteric

Howdy Word experts!

Is it possible to create and work with counters in Word (like in LaTeX,
for example)? If it is, can someone give me some basic references for
working with counters in Word?

Thank you for your answers and best regards,

Marko
(e-mail address removed)
(please reply to my e-mail too, if possible)
 
D

Daiya Mitchell

Not so many people here seem to be familiar with LaTeX--if you explain what
counters are and what they do and what is the end result you are looking
for, people might be able to suggest some possibilities.

DM
 
M

Marko Pinteric

Stefan said:
Assuming that counters has to do with numbering (which seems like a
reasonable conclusion), you may want to look into SEQ fields in Word
Help.

If what you want is outline/heading numbering, please
see: http://www.shaunakelly.com/word/numbering/OutlineNumbering.html.

What I want is parallel numbering like this:

G General part

G.1 First title
G.1.1 Subsection
G.1.2 Subsection
G.2 Second title
G.2.1 Subsection
G.2.2 Subsection

T Textual part

T.1 First title
T.1.1 Subsection
T.1.2 Subsection
T.2 Second title
T.2.1 Subsection
T.2.2 Subsection

OK, I DID THIS (I can hardly believe I succeeded), I even managed making
special table of contents for general and textual part separately. The
problem is that footer should INCLUDE current paragraph number. It is
possible to include paragraph number if it is based on Headings 1 -
Headings 9 (which I turned into T Headings), but I cannnot do similar
for S Headings. I guess I need to define some counters and specify that
in footer counter for S Heading should be put into.
 
M

Marko Pinteric

Thank you! That was really a revelation!

One question though... Is there any way to use If field in a way that
- if there is Heading 1 present on the page use Heading 1
- otherwise use Heading 2

e.g.

Page 1: 1. Main title 1.1. Subsection 1
Footer: 1.

Page 2: 1.2. Subsection 2
Footer: 1.2.

Thanks again!!

Marko.
 
S

Suzanne S. Barnhill

This is a question that has been asked before, and ISTR that it may have
been solved (but not by me). You might try Googling for the answer, or
perhaps someone else will post back with it.
 
W

Word Heretic

You need to embed the fields inside the if field...

{ IF { STYLEREF "Heading 1" } = "Error! No Text of specified style in
document." {STYLEREF "Heading 2"} {STYLEREF "Heading 1"} }



Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice
 
S

Suzanne S. Barnhill

The problem is that there *will* be Heading 1 text in the *document*; the
trick is to limit the search to the page; and I don't think that's possible.
 
W

Word Heretic

G'day "Suzanne S. Barnhill" <[email protected]>,

Ahhh! I see, a field that autosenses the last heading used and
auto-refers to it. Gee, that would be nice :)

That sort of thing is what I use pre-production macros for. If it was
to be inline, I'd probably use tag text [LASTHEAD] and then come
publish time, make a copy & zap a macro through it to find these tags,
find the previous heading (reverse iterate paragraphs from tag to doc
start looking at outline levels) .and hard-insert the required
details.

Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice


Suzanne S. Barnhill reckoned:
 
S

Suzanne S. Barnhill

What is usually desired is to sense the first heading (any level or any of
specified levels) on the page and replicate it. I personally feel this may
be poor design since the header would then reflect large chunks of content
in some cases and smaller chunks in others. I think it's probably better to
pick one level (usually the top level of subhead--which could be Heading 2
if Heading 1 has been used for the chapter title) and stick with it.



Word Heretic said:
G'day "Suzanne S. Barnhill" <[email protected]>,

Ahhh! I see, a field that autosenses the last heading used and
auto-refers to it. Gee, that would be nice :)

That sort of thing is what I use pre-production macros for. If it was
to be inline, I'd probably use tag text [LASTHEAD] and then come
publish time, make a copy & zap a macro through it to find these tags,
find the previous heading (reverse iterate paragraphs from tag to doc
start looking at outline levels) .and hard-insert the required
details.

Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice


Suzanne S. Barnhill reckoned:
The problem is that there *will* be Heading 1 text in the *document*; the
trick is to limit the search to the page; and I don't think that's
possible.
 
W

Word Heretic

G'day "Suzanne S. Barnhill" <[email protected]>,

Yes, this would get very messy in most real world instances. It also
would never take the place of sensible structuring to start with.


Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice


Suzanne S. Barnhill reckoned:
 
M

Marko Pinteric

I agree that this is a poor design. Unfortunatelly in specifications
for technical reports in civil engineering projects it HAS TO BE this
way. :-(

BTW, I *did* googled Internet for this specific problem and found no
solution.

Marko.
 
M

Marko Pinteric

I was playing with this code.

I inserted code field and typed this text after "=" and word reported
sythax error!?

What's wrong?

Marko
 
M

Marko Pinteric

I *did* find this code today

{ IF {STYLEREF "Heading 2" \n }<{STYLEREF "Heading 1" \n } "{STYLEREF
"Heading 1" \n }" "{STYLEREF "Heading 2" \n }"}

but I don't know how to use it. That is, I insert code field, put the
text (I have to use "=" in the beginning, and Word reports synthax
error. I guess there is something wrong about how I put code fields
into Word.

Thanks for help,

Marko.
 
S

Suzanne S. Barnhill

Every pair of field delimiters (those things that look like braces but can't
be typed from the keyboard) must be inserted using Ctrl+F9. As you can see,
there are several pairs nested within the outside pair, and you have to get
them right. Start by inserting one pair and typing IF, then insert
additional pairs for the StyleRef fields. Note that the TrueText and
FalseText do not need to be quoted since they are fields (only text needs to
be in quotes).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top