Skip to content

Commit

Permalink
Improved the generation
Browse files Browse the repository at this point in the history
  • Loading branch information
oscargus committed Aug 17, 2016
1 parent 7420529 commit 5281ecf
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
15 changes: 9 additions & 6 deletions src/main/java/net/sf/jabref/cli/GenerateCharacterTable.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,17 @@ public static void main(String[] args) {
System.out.println("\\DeclareTextSymbolDefault{\\uhorn}{T5}");
System.out.println("\\begin{document}");
System.out.println("\\twocolumn");
System.out.println("\\begin{supertabular}{c|c|c|c}");
System.out.println("No. & Uni & \\LaTeX & Code \\\\ \n \\hline");
System.out.println("\\begin{supertabular}{c|c|c|c|c}");
System.out.println("No. & Uni & Symb & \\LaTeX & Code \\\\ \n \\hline");

for (Map.Entry<Integer, String> character : characterMap.entrySet()) {
System.out.println(character.getKey() + " & \\symbol{" + Integer.toString(character.getKey()) + "} & "
+ character.getValue()
+ " & \\verb+" + character.getValue()
+ "+ \\\\");
System.out
.println(
character.getKey() + " & "
+ ((character.getKey() > 128) ? String
.valueOf(Character.toChars(character.getKey())) : "")
+ " & \\symbol{" + Integer.toString(character.getKey()) + "} & "
+ character.getValue() + " & \\verb+" + character.getValue() + "+ \\\\");
}
System.out.println("\\end{supertabular}");
System.out.println("\\end{document}");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ public class HTMLUnicodeConversionMaps {
{"8244", "", "{$\\prime\\prime\\prime$}"}, // triple prime
{"8251", "", "{\\textreferencemark}"}, {"8253", "", "{\\textinterrobang}"},
{"8450", "complexes", "$\\mathbb{C}$"}, // double struck capital C -- requires e.g. amsfonts
{"8451", "", "$\\textcelsius"}, // Degree Celsius
{"8451", "", "{\\textcelsius}"}, // Degree Celsius
{"8459", "Hscr", "{{$\\mathcal{H}$}}"}, // script capital H -- possibly use \mathscr
{"8460", "Hfr", "{{$\\mathbb{H}$}}"}, // black letter capital H -- requires e.g. amsfonts
{"8466", "Lscr", "{{$\\mathcal{L}$}}"}, // script capital L -- possibly use \mathscr
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public void testBasicFormat() {

assertEquals("&Ccedil;", layout.format("{\\c{C}}"));

assertEquals("&Lmidot;&imath;", layout.format("\\Lmidot\\i"));
assertEquals("&Oogon;&imath;", layout.format("\\k{O}\\i"));

assertEquals("&ntilde; &ntilde; &iacute; &imath; &imath;", layout.format("\\~{n} \\~n \\'i \\i \\i"));
}
Expand Down

0 comments on commit 5281ecf

Please sign in to comment.