home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!know!mips2!news.bbn.com!noc.near.net!bigboote.WPI.EDU!wpi.WPI.EDU!llew
- From: llew@wpi.WPI.EDU (Lok C. Lew Yan Voon)
- Newsgroups: comp.text.tex
- Subject: questions about .bst language
- Message-ID: <1e9hueINNqo2@bigboote.WPI.EDU>
- Date: 17 Nov 92 01:29:50 GMT
- Organization: Worcester Polytechnic Institute
- Lines: 54
- NNTP-Posting-Host: wpi.wpi.edu
-
- i've a slight understanding of the .bst language from reading the
- style files and the doc.
- however, i've a couple of problems.
-
- 1. i don't understand a statement like
- { duplicate$ empty$
- can someone try to explain it?
-
- 2. somewhere else i see
- { ":" * pages
- don't we need 2 variables to the left of '*'? i only see one?
-
- 3. i've been playing around with unsrt.bst and the article functions.
- i need to output pages as, e.g., 1120 instead of 1120-1124.
- i think i only need to modify 2 functions (reproduced below):
- format.pages and/or format.vol.num.pages
- what are the required modifications? i can't see how to access
- the initial page number.
- i occasionally see (e.g. in n.dashify)
- t #1 #1 substring$ "-" =
- so it seems like t starts with "-" (if present). whatever happened
- to the initial page number?
-
- FUNCTION {format.pages}
- { pages empty$
- { "" }
- { pages multi.page.check
- { "pages" pages n.dashify tie.or.space.connect }
- { "page" pages tie.or.space.connect }
- if$
- }
- if$
- }
-
- FUNCTION {format.vol.num.pages}
- { volume boldface field.or.null
- number empty$
- 'skip$
- {
- volume empty$
- { "there's a number but no volume in " cite$ * warning$ }
- 'skip$
- if$
- }
- if$
- pages empty$
- 'skip$
- { duplicate$ empty$
- { pop$ format.pages }
- { ":" * pages n.dashify * }
- if$
- }
- if$
- }
-