diff --git a/src/main/java/com/example/ts_obj/controller/TypesetController.java b/src/main/java/com/example/ts_obj/controller/TypesetController.java index 4bb2b53..f85e84e 100644 --- a/src/main/java/com/example/ts_obj/controller/TypesetController.java +++ b/src/main/java/com/example/ts_obj/controller/TypesetController.java @@ -449,11 +449,13 @@ public class TypesetController { } String[] cache_author = s_author[i].split(""); String au = cache_author[0]; - String bu = cache_author[1]; - Style ca_sty = new Style(); - ca_sty.setVertAlign("superscript"); author_p.addText(au); - author_p.addText(new TextRenderData(bu.replace("", "").replace("", ""), ca_sty)); + if(cache_author.length>1){ + String bu = cache_author[1]; + Style ca_sty = new Style(); + ca_sty.setVertAlign("superscript"); + author_p.addText(new TextRenderData(bu.replace("", "").replace("", ""), ca_sty)); + } if (i < s_author.length - 1) { author_p.addText(","); } @@ -579,11 +581,23 @@ public class TypesetController { String tttt = String.valueOf(tif).replace("", "").replace("", "").replace("", "").replace("", "").trim().toUpperCase(); ParagraphRenderData chc_pd = new ParagraphRenderData(); + String tgh_title = String.valueOf(tif).replace("", "").replace("", "").replace("", "").replace("", ""); + + String[] split = tgh_title.split("\n"); + Style chch = new Style(); chch.setFontFamily("Charis SIL"); chch.setFontSize(7.5); - String tgh_title = String.valueOf(tif).replace("", "").replace("", "").replace("", "").replace("", ""); - chc_pd.addText(new TextRenderData(tgh_title, chch)); + chc_pd.addText(new TextRenderData(split[0], chch)); + + if(split.length>1){ + chc_pd.addText("\n"); + Style lstitle = new Style(); + lstitle.setFontFamily("Charis SIL"); + lstitle.setFontSize(7.5); + lstitle.setColor("0082AA"); + chc_pd.addText(new TextRenderData(split[1],lstitle)); + } refsl.add(chc_pd); } map.put("refs", new NumberingRenderData(NumberingFormat.DECIMAL, refsl));