X-Git-Url: http://git.megacz.com/?p=sbp.git;a=blobdiff_plain;f=src%2Fedu%2Fberkeley%2Fsbp%2Ftib%2FTibDoc.java;h=469c16649e49110a7614a711a5397648e7955b07;hp=3245d76940959e365437a22fd4c70d09cda02959;hb=c4b4207ce1be50359c6bd8abe1d657ff8ae8ad6e;hpb=a7ba8d8a5f0cb7fbb5bf67f1a95f1cad5226c507 diff --git a/src/edu/berkeley/sbp/tib/TibDoc.java b/src/edu/berkeley/sbp/tib/TibDoc.java index 3245d76..469c166 100644 --- a/src/edu/berkeley/sbp/tib/TibDoc.java +++ b/src/edu/berkeley/sbp/tib/TibDoc.java @@ -384,16 +384,17 @@ toContex ll = prefix ++ (concatMap tl ll) ++ suffix public @bind.arg String password; } - public @bind.as("Euro") Object euro() { return null; } - public @bind.as("Citation") Object cite(Object o) { return new Chars("*cite*"); } - public @bind.as("Symbol") Object sym(Object o) { return null; } + public static @bind.as("Euro") Object euro() { return null; } + public static @bind.as("Citation") Object cite(Object o) { return new Chars("*cite*"); } + public static @bind.as("Symbol") Object sym(Object o) { return null; } public static abstract class List extends Text { - public @bind.arg Text[] points; + public @bind.arg Text[][] points; public abstract String tag(); public void toHTML(ToHTML.HTML sb) { sb.append("<"+tag()+">\n"); - for(Text t : points) sb.tag("li", t); + for(Text[] t : points) + sb.tag("li", t); sb.append("\n"); } } @@ -409,6 +410,16 @@ toContex ll = prefix ++ (concatMap tl ll) ++ suffix public static class Blockquote extends Paragraph { Text[] text; public @bind Blockquote(Text[] t) { this.text = t; } + public @bind Blockquote(Text[] t, Text[] t2) { + if (t2==null) { + this.text = t; + } else { + Text[] t3 = new Text[t.length + t2.length]; + System.arraycopy(t, 0, t3, 0, t.length); + System.arraycopy(t2, 0, t3, t.length, t2.length); + this.text = t3; + } + } public void toHTML(HTML h) { h.tag("blockquote", new P(text)); } }