[IUG] Print template help
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
I'm appealing to the collective wisdom. I'm trying to print an LC spine
label the has volume numbers if any and copy numbers if greater than copy
1. This template works if there are both, but if there isn't a volume
number it inserts a blank line before the copy number. I need to make the
carriage return after the volume number conditional but I can't figure out
how.
$F{callAlphaStart}.trim() +
($F{callAlphaStart}.equals("") ? "" : "\n") +
$F{callNumericAll}.trim() +
($F{callNumericAll}.equals("") ? "" : "\n") +
($F{callSuba}.matches("(?s)[A-Z].*") ? "" : "") +
($F{callSuba}.matches("[0-9a-zA-Z]*\\.[A-Z].*") ?
($F{callSuba}.substring(0,$F{callSuba}.indexOf(".")) + "\n" +
$F{callSuba}.substring($F{callSuba}.indexOf("."),$F{callSuba}.length())) :
$F{callSuba}).trim().replaceAll("\\s","\n <file://s%22,%22/n>") +
($F{callSuba}.equals("") ? "" : "\n") +
($F{callSubb}.matches("(?s)[A-Z].*") ? ($F{callSuba}.matches("(?s)[A-Z].*")
? ($F{callSuba}.matches(".* .*") ? "" : "") :
($F{callSuba}.matches(".*\\..*") ? "" : "")) : "") +
$F{callSubb}.trim().replaceAll("
\\s","\n").replaceAll("\\.\\s","").replaceAll(",\\s","\n").replaceAll("\\smaj\\<file://s%22,%22/n%22).replaceAll(%22///s%22,%22%22).replaceAll(%22,//s%22,%22/n%22).replaceAll(%22//smaj//>.","
maj.\n").replaceAll("\\smin\\ <file://smin//>."," min.\n") +
($F{callSubb}.equals("") ? "" : "\n") +
($F{itemv}.trim().replaceAll("[ :]","\n").replaceAll("
\\.\\s",".").replaceAll(",\\s","\n") + "\n") +
((((!($F{itemFix58c}.equals (""))) & (!($F{itemFix58c}.equals ("c.1")))) ?
$F{itemFix58c} : "") + "\n")
Any help greatly appreciated.
Kathy
--
Kathy Farrell
Technical Services Librarian
Dorraine Zief Library
University of San Francisco
School of Law
415-422-2248
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept)
text/html
---