diff --git a/.vscode/settings.json b/.vscode/settings.json index 5520477..06a2f50 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -44,30 +44,6 @@ "**/CVS": true }, "files.trimTrailingWhitespace": false, - "latex-workshop.latex.autoBuild.run": "never", - "latex-workshop.latex.recipes": [ - { - "name": "latexmk đ", - "tools": [ - "latexmk" - ] - } - ], - "latex-workshop.latex.tools": [ - { - "args": [ - "-r", - "../tools/.latexmkrc", - "-xelatex", - "-cd-", - "%DOC%" - ], - "command": "latexmk", - "cwd": "", - "env": {}, - "name": "latexmk" - } - ], "prettier.configPath": "tools/.prettierrc", "python.defaultInterpreterPath": "${workspaceFolder}/.venv", "python.formatting.provider": "yapf", diff --git a/.vscode/tasks.json b/.vscode/tasks.json index a5cb02e..c90326b 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -50,6 +50,22 @@ // "group": "converter" // } // }, + { + "label": "đ ïž Build with latexmk", + "type": "shell", + "command": "latexmk", + "args": [ + "-xelatex", + "-r", + "tools/.latexmkrc", + "-gg", + "-outdir=build/output-tex", + "build/output-tex/input.tex"], + "problemMatcher": [], + "presentation": { + "group": "converter" + }, + }, { "label": "đ View HTML", "type": "shell", diff --git a/build.gradle.kts b/build.gradle.kts index f2a1b49..ef5120c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -261,7 +261,7 @@ abstract class PandocTask @Inject constructor() : Exec() { failIfWarning.convention(true) verbose.convention(false) additionalArgs.convention(arrayOf()) - markdownFiles.convention(project.fileTree("${project.rootDir}/chapters/"){include("**/*.md", "**/*.html")}) + markdownFiles.convention(project.fileTree("${project.rootDir}/chapters/"){include("**/*.md", "**/*.html", "**/*.tex")}) assetFiles.convention(project.fileTree("${project.rootDir}/files/"){ include("**/*") }) literatureFiles.convention(project.fileTree("${project.rootDir}/literature/"){ include("**/*") }) convertFiles.convention(project.fileTree("${settings.dataDir}"){ include("**/*") }) diff --git a/build/Content.html b/build/Content.html index 4c7b871..311de06 100644 --- a/build/Content.html +++ b/build/Content.html @@ -166,16 +166,28 @@ sidnav.style.width = `${expandWidth}px`; if (m.offsetLeft - expandWidth < 0) { - m.style.marginLeft = `${expandWidth + 40}px` + m.style.marginLeft = `${expandWidth + 40}px`; } - - document.getElementById("nav-content-inline").style.display = "none"; + + document.getElementById("nav-content").style.display = "none"; + + toc = document.getElementById("TOC"); + // Append to sidebar. + toc.parentNode.removeChild(toc); + document.getElementById("side-nav-content").append(toc); } function closeSideNav() { document.getElementById("side-nav").style.width = "0"; document.getElementById("main-markdown").style.marginLeft = null; - document.getElementById("nav-content-inline").style.display = "initial"; + + navContent = document.getElementById("nav-content"); + navContent.style.display = "initial"; + + toc = document.getElementById("TOC"); + // Append to inline. + toc.parentNode.removeChild(toc); + document.getElementById("nav-content").append(toc); } var EXPAND_ALL = "â"; @@ -258,73 +270,14 @@ â × -