@Test public void italicBold() throws IOException, OfxAuthoringException { OfxEmphasisFactory eF = new OfxEmphasisFactory(true,true); Paragraph p = create(eF); renderer = new LatexParagraphRenderer(cmm,dsm,true); f = new File(rootDir,dir+"/"+Key.italic+"-"+Key.bold+".txt"); renderer.render(p); renderTest(renderer,f); }
public void render(Emphasis emphasis) throws OfxAuthoringException { boolean typewriter = emphasis.isSetStyle() && emphasis.getStyle().equals("typewriter"); boolean bold = emphasis.isSetBold() && emphasis.isBold(); boolean italic = emphasis.isSetItalic() && emphasis.isSetItalic(); StringBuffer sb = new StringBuffer(); if(typewriter){sb.append("\\texttt{");} if(bold) {sb.append("\\textbf{");} if(italic) {sb.append("\\textit{");} sb.append(TexSpecialChars.replace(emphasis.getValue())); if(bold){sb.append("}");} if(italic){sb.append("}");} if(typewriter){sb.append("}");} txt.add(sb.toString()); }
LatexEmphasisRenderer extends AbstractOfxLatexRenderer implements OfxLatexRenderer { public void render(Emphasis emphasis) throws OfxAuthoringException { boolean typewriter = emphasis.isSetStyle() && emphasis.getStyle().equals("typewriter"); boolean bold = emphasis.isSetBold() && emphasis.isBold(); boolean italic = emphasis.isSetItalic() && emphasis.isSetItalic(); StringBuffer sb = new StringBuffer(); if(typewriter){sb.append("\\texttt{");} if(bold) {sb.append("\\textbf{");} if(italic) {sb.append("\\textit{");} sb.append(TexSpecialChars.replace(emphasis.getValue())); if(bold){sb.append("}");} if(italic){sb.append("}");} if(typewriter){sb.append("}");} txt.add(sb.toString()); } }
LatexEmphasisRenderer extends AbstractOfxLatexRenderer implements OfxLatexRenderer { public void render(Emphasis emphasis) throws OfxAuthoringException { boolean typewriter = emphasis.isSetStyle() && emphasis.getStyle().equals("typewriter"); boolean bold = emphasis.isSetBold() && emphasis.isBold(); boolean italic = emphasis.isSetItalic() && emphasis.isSetItalic(); StringBuffer sb = new StringBuffer(); if(typewriter){sb.append("\\texttt{");} if(bold) {sb.append("\\textbf{");} if(italic) {sb.append("\\textit{");} sb.append(TexSpecialChars.replace(emphasis.getValue())); if(bold){sb.append("}");} if(italic){sb.append("}");} if(typewriter){sb.append("}");} txt.add(sb.toString()); } LatexEmphasisRenderer(CrossMediaManager cmm,DefaultSettingsManager dsm); }
LatexEmphasisRenderer extends AbstractOfxLatexRenderer implements OfxLatexRenderer { public void render(Emphasis emphasis) throws OfxAuthoringException { boolean typewriter = emphasis.isSetStyle() && emphasis.getStyle().equals("typewriter"); boolean bold = emphasis.isSetBold() && emphasis.isBold(); boolean italic = emphasis.isSetItalic() && emphasis.isSetItalic(); StringBuffer sb = new StringBuffer(); if(typewriter){sb.append("\\texttt{");} if(bold) {sb.append("\\textbf{");} if(italic) {sb.append("\\textit{");} sb.append(TexSpecialChars.replace(emphasis.getValue())); if(bold){sb.append("}");} if(italic){sb.append("}");} if(typewriter){sb.append("}");} txt.add(sb.toString()); } LatexEmphasisRenderer(CrossMediaManager cmm,DefaultSettingsManager dsm); void render(Emphasis emphasis); }
LatexEmphasisRenderer extends AbstractOfxLatexRenderer implements OfxLatexRenderer { public void render(Emphasis emphasis) throws OfxAuthoringException { boolean typewriter = emphasis.isSetStyle() && emphasis.getStyle().equals("typewriter"); boolean bold = emphasis.isSetBold() && emphasis.isBold(); boolean italic = emphasis.isSetItalic() && emphasis.isSetItalic(); StringBuffer sb = new StringBuffer(); if(typewriter){sb.append("\\texttt{");} if(bold) {sb.append("\\textbf{");} if(italic) {sb.append("\\textit{");} sb.append(TexSpecialChars.replace(emphasis.getValue())); if(bold){sb.append("}");} if(italic){sb.append("}");} if(typewriter){sb.append("}");} txt.add(sb.toString()); } LatexEmphasisRenderer(CrossMediaManager cmm,DefaultSettingsManager dsm); void render(Emphasis emphasis);  }