Skip to content

Commit 142611a

Browse files
committed
Version 0.5.1 beta
See changelog
1 parent 5159d00 commit 142611a

File tree

6 files changed

+177
-72
lines changed

6 files changed

+177
-72
lines changed

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## LaTeX Table Editor ##
22

3-
**Version 0.5**
3+
**Version 0.5.1**
44

55
This is the GitHub page of an upcoming Open Source WYSIWYG table editor that exports to multiples languages including LaTeX, Plain TeX, CSV, HTML and Markdown.
66

src/changelog.txt

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,32 @@ Legend
66
[#] Fixed
77
Dates use a YYYY/MM/DD format.
88

9+
10+
Version 0.5.1 BETA (2017/10/08)
11+
===========
12+
13+
| Note on this release :
14+
| This release fixes many bugs with importing LaTeX tables
15+
16+
CORE
17+
18+
[+] Better handling of errors when loading a table
19+
20+
LATEX IMPORT MODULE
21+
22+
[+] Support dashed and dotted line with the "arydshln" package
23+
[+] Support for inverted question/interrogation mark with "?`", \textquestionmark, "!`" and \textexclamdown
24+
[+] Support for pound symbol (\pounds and \textsterling)
25+
[+] Support for alternative \^{} (\textasciicircum)
26+
[+] Support for English quotation with `` and ''
27+
[#] Problems with environments embed inside environments
28+
[#] Tables inside tables could caused issues
29+
[#] Better support for LaTeX commands without arguments
30+
[#] Support for \multirow when there's an optional "vpos" argument
31+
[#] Support for multiple horizontal borders on the same row
32+
[#] Paragraph symbol (\P) caused encoding issues
33+
[#] Part of the code prevented some commands starting with \text to be executed
34+
935
Version 0.5 BETA (2017/10/01)
1036
===========
1137

src/help.html

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,16 @@ <h3><a id="Supported_tabular_environments_8"></a>Supported tabular environments<
142142
<li>mpxtabular</li>
143143
</ul>
144144
<h3><a id="Supported_commands_40"></a>Supported commands</h3>
145+
146+
<ul>
147+
<li> ``
148+
<li> ''
149+
<li> !`
150+
<li> ?`
151+
<li> --
152+
<li> ---
153+
</ul>
154+
145155
<ul>
146156
<li>\`</li>
147157
<li>\&amp;</li>
@@ -161,21 +171,25 @@ <h3><a id="Supported_commands_40"></a>Supported commands</h3>
161171
<li>\bottomrule</li>
162172
<li>\b</li>
163173
<li>\c</li>
174+
<li>\cdashline
164175
<li>\chapter</li>
165176
<li>\cline</li>
166177
<li>\cmidrule</li>
167178
<li>\cr</li>
168179
<li>\d</li>
169180
<li>\fg</li>
181+
<li>\firsthdashline
170182
<li>\firsthline</li>
171183
<li>\H</li>
184+
<li>\hdashline
172185
<li>\hline</li>
173186
<li>\i</li>
174187
<li>\j</li>
175188
<li>\k</li>
176189
<li>\l</li>
177190
<li>\L</li>
178191
<li>\LaTeX</li>
192+
<li>\lasthdashline
179193
<li>\lasthline</li>
180194
<li>\linebreak</li>
181195
<li>\midrule</li>
@@ -189,20 +203,26 @@ <h3><a id="Supported_commands_40"></a>Supported commands</h3>
189203
<li>\oe</li>
190204
<li>\OE</li>
191205
<li>\og</li>
206+
<li>\P
192207
<li>\part</li>
208+
<li>\pounds
193209
<li>\r</li>
194210
<li>\rotcell</li>
195211
<li>\section</li>
196212
<li>\ss</li>
197213
<li>\subsection</li>
198214
<li>\tabucline</li>
199215
<li>\TeX</li>
216+
<li>\textasciicircum
200217
<li>\textasciitilde</li>
201218
<li>\textbackslash</li>
202219
<li>\textbar</li>
203220
<li>\textbf</li>
221+
<li>\textexclamdown
204222
<li>\textit</li>
223+
<li>\textquestionmark
205224
<li>\textsl</li>
225+
<li>\textsterling
206226
<li>\toprule</li>
207227
<li>\u</li>
208228
<li>\underline</li>
@@ -212,7 +232,7 @@ <h3><a id="Supported_commands_40"></a>Supported commands</h3>
212232
</ul>
213233
<h3><a id="Partially_supported_commands_108"></a>Partially supported commands</h3>
214234
<ul>
215-
<li>\catcode</li>
235+
<li>\catcode (only \catcode`\#=4 , where # is any character, is supported)</li>
216236
<li>\emph</li>
217237
<li>\hbox</li>
218238
<li>\hrule</li>

src/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ <h4 class="modal-title" id="myModalLabel">Import from LaTeX, JSON and CSV</h4>
380380
</div>
381381
<div id="latex-import-error" style="display:none;color:red;">Your LaTeX table could not be loaded. Help us and <a href="https://github.com/JDMCreator/LaTeXTableEditor/issues" target="_blank">send us the code of your table</a> so we can see what happened.</div>
382382
<div class="text-center">
383-
<button type="button" class="btn btn-primary" onclick="table.importData();$('#importModal').modal('hide')">Import the content of a file</button></div>
383+
<button type="button" class="btn btn-primary" onclick="table.importData();">Import the content of a file</button></div>
384384

385385

386386
</div>

src/js.js

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ function $id(id) {
1010
return cellHeader == colHeader
1111
},
1212
table = new(function() {
13-
this.version = "0.5";
13+
this.version = "0.5.1";
1414
this.create = function(cols, rows) {
1515
rows = parseInt(rows, 10);
1616
cols = parseInt(cols, 10);
@@ -32,7 +32,8 @@ function $id(id) {
3232
}
3333
catch(e){
3434
try{
35-
this.importFromJSON(JSON.parse(content))
35+
this.importFromJSON(JSON.parse(content));
36+
$('#importModal').modal('hide');
3637
}
3738
catch(f){
3839
alert("Your file was detected as LaTeX but could not be loaded.");
@@ -49,6 +50,7 @@ function $id(id) {
4950
catch(e){
5051
try{
5152
json = this.importCSV(content);
53+
$('#importModal').modal('hide');
5254
}
5355
catch(f){
5456
alert("Your file could not be loaded");
@@ -63,21 +65,34 @@ function $id(id) {
6365
}
6466
}
6567
else if(format == "json"){
66-
this.importFromJSON(JSON.parse(content));
68+
try{
69+
this.importFromJSON(JSON.parse(content));
70+
$('#importModal').modal('hide');
71+
}
72+
catch(e){
73+
alert("Your JSON file could not be loaded. Be sure the JSON was generated by this generator");
74+
}
6775
}
6876
else if(format == "latex"){
6977
try{
7078
this.importFromJSON(table.latex.importTable(content));
79+
$('#importModal').modal('hide');
7180
}
7281
catch(e){
7382
if(window.console){
7483
console.error(e);
7584
}
76-
$("#latex_import_error").show();
85+
$("#latex-import-error").show();
7786
}
7887
}
7988
else if(format == "csv"){
80-
this.importFromJSON(this.importCSV(content));
89+
try{
90+
this.importFromJSON(this.importCSV(content));
91+
$('#importModal').modal('hide');
92+
}
93+
catch(e){
94+
alert("Your CSV file could not be loaded");
95+
}
8196
}
8297
}
8398
this.removeAllSelection = function() {
@@ -982,6 +997,7 @@ this.getHTML = (function(){
982997
border = "1px dotted black";
983998
}
984999
this.forEachSelectedCell(function(cell) {
1000+
done = true;
9851001
var style = cell.style;
9861002
style.borderTop = style.borderLeft = style.borderRight = style.borderBottom = border;
9871003
cell.setAttribute("data-border-top", borderType);

0 commit comments

Comments
 (0)