@Test public void inTable() throws IOException, OfxAuthoringException { int[] words = {1,5}; Table table = TestLatexTableRenderer.createTable(words); table.getSpecification().setFloat(XmlFloatFactory.build(false)); image.setAlignment(null); image.getMedia().setSrc("svg.ofx-doc/icon/circle/grey.pdf"); image.getMedia().setDst("grey"); image.setHeight(XmlHeightFactory.em(1)); JaxbUtil.info(image); Pdf2PdfTranscoder pdfT = new Pdf2PdfTranscoder(latexBase); pdfT.transcode(image.getMedia()); Cell cell = table.getContent().getBody().get(0).getRow().get(0).getCell().get(0); cell.getContent().clear(); cell.getContent().add(image); JaxbUtil.info(table); renderer.render(table); List<String> content = renderer.getContent(); OfxContentDebugger.debug(content); testLatex(content); }
public void render(Object parent, Image image) throws OfxAuthoringException { setEnvironment(parent); if(!image.isSetMedia()){throw new OfxAuthoringException(Image.class.getSimpleName()+" has no "+Media.class.getSimpleName());} renderPre(image); if(Environment.Figure.equals(environment) && image.isSetAlignment()){alignment(image.getAlignment());} StringBuffer sb = new StringBuffer(); if(Environment.Cell.equals(environment)){sb.append("$\\vcenter{\\hbox{");} sb.append(" \\includegraphics"); sb.append(imageArguments(image)); sb.append("{").append(cmm.getImageRef(image.getMedia())).append("}"); if(Environment.Cell.equals(environment)){sb.append("}}$");} txt.add(sb.toString()); renderPost(image); }
LatexImageRenderer extends AbstractOfxLatexRenderer implements OfxLatexRenderer { public void render(Object parent, Image image) throws OfxAuthoringException { setEnvironment(parent); if(!image.isSetMedia()){throw new OfxAuthoringException(Image.class.getSimpleName()+" has no "+Media.class.getSimpleName());} renderPre(image); if(Environment.Figure.equals(environment) && image.isSetAlignment()){alignment(image.getAlignment());} StringBuffer sb = new StringBuffer(); if(Environment.Cell.equals(environment)){sb.append("$\\vcenter{\\hbox{");} sb.append(" \\includegraphics"); sb.append(imageArguments(image)); sb.append("{").append(cmm.getImageRef(image.getMedia())).append("}"); if(Environment.Cell.equals(environment)){sb.append("}}$");} txt.add(sb.toString()); renderPost(image); } }
LatexImageRenderer extends AbstractOfxLatexRenderer implements OfxLatexRenderer { public void render(Object parent, Image image) throws OfxAuthoringException { setEnvironment(parent); if(!image.isSetMedia()){throw new OfxAuthoringException(Image.class.getSimpleName()+" has no "+Media.class.getSimpleName());} renderPre(image); if(Environment.Figure.equals(environment) && image.isSetAlignment()){alignment(image.getAlignment());} StringBuffer sb = new StringBuffer(); if(Environment.Cell.equals(environment)){sb.append("$\\vcenter{\\hbox{");} sb.append(" \\includegraphics"); sb.append(imageArguments(image)); sb.append("{").append(cmm.getImageRef(image.getMedia())).append("}"); if(Environment.Cell.equals(environment)){sb.append("}}$");} txt.add(sb.toString()); renderPost(image); } LatexImageRenderer(CrossMediaManager cmm,DefaultSettingsManager dsm); }
LatexImageRenderer extends AbstractOfxLatexRenderer implements OfxLatexRenderer { public void render(Object parent, Image image) throws OfxAuthoringException { setEnvironment(parent); if(!image.isSetMedia()){throw new OfxAuthoringException(Image.class.getSimpleName()+" has no "+Media.class.getSimpleName());} renderPre(image); if(Environment.Figure.equals(environment) && image.isSetAlignment()){alignment(image.getAlignment());} StringBuffer sb = new StringBuffer(); if(Environment.Cell.equals(environment)){sb.append("$\\vcenter{\\hbox{");} sb.append(" \\includegraphics"); sb.append(imageArguments(image)); sb.append("{").append(cmm.getImageRef(image.getMedia())).append("}"); if(Environment.Cell.equals(environment)){sb.append("}}$");} txt.add(sb.toString()); renderPost(image); } LatexImageRenderer(CrossMediaManager cmm,DefaultSettingsManager dsm); void render(Object parent, Image image); }
LatexImageRenderer extends AbstractOfxLatexRenderer implements OfxLatexRenderer { public void render(Object parent, Image image) throws OfxAuthoringException { setEnvironment(parent); if(!image.isSetMedia()){throw new OfxAuthoringException(Image.class.getSimpleName()+" has no "+Media.class.getSimpleName());} renderPre(image); if(Environment.Figure.equals(environment) && image.isSetAlignment()){alignment(image.getAlignment());} StringBuffer sb = new StringBuffer(); if(Environment.Cell.equals(environment)){sb.append("$\\vcenter{\\hbox{");} sb.append(" \\includegraphics"); sb.append(imageArguments(image)); sb.append("{").append(cmm.getImageRef(image.getMedia())).append("}"); if(Environment.Cell.equals(environment)){sb.append("}}$");} txt.add(sb.toString()); renderPost(image); } LatexImageRenderer(CrossMediaManager cmm,DefaultSettingsManager dsm); void render(Object parent, Image image);  }