Lines Matching +full:sub +full:- +full:parts
2 ### @Awk-file{
7 ### filename = "journal-toc.awk",
29 ### bibclean -max-width 0 BibTeX-file(s) | \
30 ### bibsort -byvolume | \
31 ### awk -f journal-toc.awk \
32 ### [-v HTML=nnn] [-v INDENT=nnn] \
33 ### [-v BIBFILEURL=url] >foo.toc
38 ### bibclean -max-width 0 BibTeX-file(s) | \
39 ### awk -f journal-toc.awk \
40 ### [-v HTML=nnn] [-v INDENT=nnn] \
41 ### [-v BIBFILEURL=url] >foo.toc
43 ### A non-zero value of the command-line option,
48 ### The INDENT=nnn command-line option specifies
56 ### BIBFILEURL=url command-line option provides a
63 ### bibtex-to-html.awk.
69 ### table-of-contents format provides less
76 ### provide article contents on the World-Wide
90 ### the `bibclean -max-width 0' filter. It also
104 ### Addison-Wesley (1988), ISBN
105 ### 0-201-07981-X,
110 ### The checksum field above contains a CRC-16
166 sub(/^[^\{]*{/,"",Citation_label)
167 sub(/ *, *$/,"",Citation_label)
187 function do_end_entry( k,n,parts)
189 n = split(Author,parts," and ")
193 print_toc_line(parts[k] " and", "", "")
197 print_toc_line(parts[n], Title, html_begin_pages() Pages html_end_pages())
199 do_long_title(parts[n], Title, html_begin_pages() Pages html_end_pages())
207 else # have journal = journal-abbreviation,
213 gsub(/\\-/,"",Journal) # remove discretionary hyphens
225 sub(/^ +/,"",title) # discard any leading space
232 function do_month( k,n,parts)
237 gsub(/ *# *-+ *# */," / ",Month)
238 n = split(Month,parts," */ *")
242 ((parts[k] in Month_expansion) ? Month_expansion[parts[k]] : parts[k])
294 sub(/--[?][?]/,"",Pages)
300 sub(/^[^\{]*\{/,"",$0) # discard up to and including open brace
301 sub(/\} *$/,"",$0) # discard from optional whitespace and trailing brace to end of line
312 function do_URL( parts)
315 split(Url,parts,"[,;]") # in case we have multiple URLs
316 Url = trim(parts[1])
334 sub(/^[^=]*= */,"",s) # discard text up to start of non-blank value
335 sub(/ *,? *$/,"",s) # discard trailing optional whitspace, quote,
343 sub(/^ */,"",s) # discard leading space
344 sub(/ *=.*$/,"",s) # discard everthing after key
352 sub(/^[^\"]*\" */,"",s) # discard text up to start of non-blank value
353 sub(/ *\",? *$/,"",s) # discard trailing optional whitspace, quote,
363 # Convert common lower-case accented letters according to the
366 # 1-85032-205-8. The official table of ISO Latin 1 SGML
368 # /usr/local/lib/html-check/lib/ISOlat1.sgml (your path
410 # Now do the same for upper-case accents
529 for (k = min(maxlength,length(title)) - 1; \
530 (k > 0) && (substr(title,k+1,1) != " "); --k)
591 level--
594 # {...} is now found at open_brace ... (k-1)
598 ("\\" control_word "[^A-Za-z]"))
601 arg = trim(substr(s,n,k - n))
602 if (Font_decl_map[control_word] == "toupper") # arg -> ARG
604 else if (Font_decl_map[control_word] != "") # arg -> <TAG>arg</TAG>
606 return (substr(s,1,open_brace-1) arg html_fonts(substr(s,k)))
611 if (substr(s,open_brace - length(control_word),length(control_word)) ~ \
615 arg = trim(substr(s,n,k - n))
616 if (Font_cmd_map[control_word] == "toupper") # arg -> ARG
618 else if (Font_cmd_map[control_word] != "") # arg -> <TAG>arg</TAG>
620 n = open_brace - length(control_word) - 1
638 ("ypcat passwd | grep '^" USER ":' | awk -F: '{print $5}'") | getline PERSONAL_NAME
640 ("grep '^" USER ":' /etc/passwd | awk -F: '{print $5}'") | getline PERSONAL_NAME
643 print "<!-- WARNING: Do NOT edit this file. It was converted from -->"
644 …print "<!-- BibTeX format to HTML by journal-toc.awk version " VERSION_NUMBER " " VERSION_DATE " -…
645 print "<!-- on " DATE " -->"
646 print "<!-- for " PERSONAL_NAME " (" USER "@" HOSTNAME ") -->"
649 print "<!DOCTYPE HTML public \"-//IETF//DTD HTML//EN\">"
666 gsub(/[^A-Za-z0-9():,;.\/\-]/,"",label)
676 gsub(/&[A-Za-z0-9]+;/,"",s) # remove SGML entities
710 VERSION_DATE = "[09-Oct-1996]"
723 MAX_TITLE_CHARS = 36 # 36 produces a 79-char output line when there is
818 leaders = substr(LEADERS, 1, MAX_TITLE_CHARS + MIN_LEADERS - extra - \
822 (MAX_TITLE_CHARS + MIN_LEADERS - extra - n))
855 { # strip non-backslashed braces from s and return the result
862 { # strip non-backslashed instances of c from s, and return the result
866 if (substr(s,k-1,1) != "\\") # then not backslashed char
867 s = substr(s,1,k-1) strip_char(substr(s,k+1),c) # so remove it (recursively)
897 function TeX_to_HTML(s, k,n,parts)
908 n = split(s,parts,/[$]/)# split into non-math (odd) and math (even) parts
911 for (k = 1; k <= n; ++k) # unbrace non-math part, leaving math mode intact
913 ((k % 2) ? strip_braces(TeX_to_HTML_nonmath(parts[k])) : \
914 TeX_to_HTML_math(parts[k]))
937 gsub(/ *\\emdash +/," --- ",s) # replace BibNet emdashes with conventional ones
952 gsub(/\\[a-z][a-z] +/,"",s) # remove TeX font changes
953 gsub(/\\[^A-Za-z]/,"",s) # remove remaining TeX control symbols