public String getHtmlTable() { StringBuilder s = new StringBuilder(); s.append("<div class=\"table-responsive\" style=\"overflow-x: scroll;\">\n"); s.append("<table class=\"text-center table table-striped table-hover table-condensed\">\n"); s.append("<tbody>\n"); s.append("<tr>\n"); s.append("<th>\n"); s.append("</th>\n"); for (int c = 0; c < getColumnCount(); c++) { String label = getColumnLabel(c); s.append("<th class=\"text-center\">" + label + "</th>\n"); } s.append("</tr>\n"); for (int r = 0; r < getRowCount(); r++) { s.append("<tr>\n"); String feature = getRowLabel(r); s.append("<th>" + feature + "</th>\n"); for (int c = 0; c < getColumnCount(); c++) { String result = getString(r, c); s.append("<td>" + result + "</td>\n"); } s.append("</tr>\n"); } s.append("</tbody>\n"); s.append("</table>\n"); s.append("</div>\n"); return s.toString(); }
public String getHtmlList() { StringBuilder s = new StringBuilder(); for (int c = 0; c < getColumnCount(); c++) { String label = getColumnLabel(c); s.append("<h2>"); s.append(label); s.append("</h2>\n"); s.append("<p>These are the features of the <strong>" + label + "</strong> library:</p>"); s.append("<ul>\n"); for (int r = 0; r < getRowCount(); r++) { String feature = getRowLabel(r); String result = getString(r, c); if ("no".equals(result)) { } else if ("yes".equals(result)) { s.append("<li>" + label + " "); s.append(feature); s.append("</li>\n"); } else if (!"no".equals(result)) { s.append("<li>" + label + " "); s.append(feature + ": "); s.append(getString(r, c)); s.append("</li>\n"); } } s.append("</ul>\n\n"); } return s.toString(); }
public static void printLatex(String[] args) throws Exception { MatrixLibraries ml = new MatrixLibraries(MatrixLibrariesFormat.LATEX); Matrix m = ml.deleteRows(Ret.NEW, ml.getRowCount() - 1); String s = m.exportTo().string().asLatex(); s = s.replaceAll("table", "sidewaystable");