Commit 1450d7c7 authored by 0xJMR's avatar 0xJMR
Browse files

Merge branch 'master' into tex

parents 70805e1e 3fd45662
Pipeline #58732 failed with stages
in 18 seconds
stages:
#- windows
- windows
- linux
- gh-pages
......@@ -11,12 +11,12 @@ masterJobLinux:
only:
- master
#masterJobWindows:
# stage: windows
# script:
# - mvn -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -B clean install --settings settings.xml
# tags:
# - Windows10
masterJobWindows:
stage: windows
script:
- mvn -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -B clean install --settings settings.xml
tags:
- Windows10
BranchJobLinux:
stage: linux
......
......@@ -65,11 +65,10 @@ public class GeneratorHelper {
return this.texPrinter.prettyPrint(ast);
}
public int getLinesCount(ASTMathCompilationUnit ast) {
public String[] getLines(ASTMathCompilationUnit ast) {
String printedHTML = this.printHTML(ast);
String[] lines = printedHTML.split("\n");
return lines.length;
return printedHTML.split("\n");
}
......
......@@ -8,14 +8,13 @@
@import url("https://fonts.googleapis.com/css?family=Roboto");
html, body {
height:100%;
margin:0;
padding:0;
}
body {
background-color:#303130;
background-color:#252525;
color:#cecece;
margin:0;
padding:0;
}
ul {
......@@ -26,28 +25,35 @@
}
li {
float:left;
padding:0 40px 0 20px;
margin:20px;
background-color:#252525;
font-family:"Roboto", sans-serif;
font-size:14px;
overflow-x:auto;
max-width:calc(100% - 100px);
position:fixed;
top:calc(50% - 20px);
left:calc(50% - 20px);
transform:translate(-50%,-50%);
}
@media screen {
li {
font-size:14px;
}
}
@media handheld {
li {
font-size:1.8vw;
}
}
.keyword {
color:#009fff !important;
}
pre.line-numbers {
float:left;
pre {
margin:0;
}
td.line-number {
user-select:none;
text-align:right;
margin-right:10px;
padding-right:10px;
-moz-user-select:none;
-webkit-user-select:none;
}
img {
......@@ -59,12 +65,14 @@
<body>
<ul>
<li>
<pre class="line-numbers">
<#list 1..helper.getLinesCount(ast) as lineNumber>
${lineNumber}
</#list>
</pre>
<pre>${helper.printHTML(ast)}</pre>
<table>
<#list helper.getLines(ast) as line>
<tr>
<td class="line-number">${1 + line?index}</td>
<td><pre><#if line?length == 0>&nbsp;<#else>${line}</#if></pre></td>
</tr>
</#list>
</table>
</li>
<li>
<pre class="line-numbers">
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment