home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / text / tex / 13193 < prev    next >
Encoding:
Internet Message Format  |  1992-11-17  |  1.7 KB

  1. Path: sparky!uunet!know!mips2!news.bbn.com!noc.near.net!bigboote.WPI.EDU!wpi.WPI.EDU!llew
  2. From: llew@wpi.WPI.EDU (Lok C. Lew Yan Voon)
  3. Newsgroups: comp.text.tex
  4. Subject: questions about .bst language
  5. Message-ID: <1e9hueINNqo2@bigboote.WPI.EDU>
  6. Date: 17 Nov 92 01:29:50 GMT
  7. Organization: Worcester Polytechnic Institute
  8. Lines: 54
  9. NNTP-Posting-Host: wpi.wpi.edu
  10.  
  11. i've a slight understanding of the .bst language from reading the
  12. style files and the doc.
  13. however, i've a couple of problems.
  14.  
  15. 1. i don't understand a statement like
  16.     { duplicate$ empty$
  17. can someone try to explain it?
  18.  
  19. 2. somewhere else i see
  20.     { ":" * pages
  21. don't we need 2 variables to the left of '*'? i only see one?
  22.  
  23. 3. i've been playing around with unsrt.bst and the article functions.
  24. i need to output pages as, e.g., 1120 instead of 1120-1124.
  25. i think i only need to modify 2 functions (reproduced below):
  26. format.pages and/or format.vol.num.pages
  27. what are the required modifications? i can't see how to access
  28. the initial page number.
  29. i occasionally see (e.g. in n.dashify)
  30.     t #1 #1 substring$ "-" =
  31. so it seems like t starts with "-" (if present). whatever happened
  32. to the initial page number?
  33.  
  34. FUNCTION {format.pages}
  35. { pages empty$
  36.     { "" }
  37.     { pages multi.page.check
  38.         { "pages" pages n.dashify tie.or.space.connect }
  39.         { "page" pages tie.or.space.connect }
  40.       if$
  41.     }
  42.   if$
  43. }
  44.  
  45. FUNCTION {format.vol.num.pages}
  46. { volume boldface field.or.null
  47.   number empty$
  48.     'skip$
  49.     { 
  50.       volume empty$
  51.         { "there's a number but no volume in " cite$ * warning$ }
  52.         'skip$
  53.       if$
  54.     }
  55.   if$
  56.   pages empty$
  57.     'skip$
  58.     { duplicate$ empty$
  59.         { pop$ format.pages }
  60.         { ":" * pages n.dashify * }
  61.       if$
  62.     }
  63.   if$
  64. }
  65.