gitlatex 1.10.0__tar.gz → 2.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (181) hide show
  1. {gitlatex-1.10.0 → gitlatex-2.0.0}/.github/workflows/publish.yml +17 -0
  2. {gitlatex-1.10.0 → gitlatex-2.0.0}/.gitignore +3 -0
  3. gitlatex-2.0.0/MANIFEST.in +4 -0
  4. {gitlatex-1.10.0/gitlatex.egg-info → gitlatex-2.0.0}/PKG-INFO +66 -17
  5. {gitlatex-1.10.0 → gitlatex-2.0.0}/README.md +65 -16
  6. gitlatex-2.0.0/docs/vim-mode.md +179 -0
  7. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/_version.py +3 -3
  8. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/app.py +4 -1
  9. gitlatex-2.0.0/gitlatex/engine/manifest.json +1 -0
  10. gitlatex-2.0.0/gitlatex/http.py +34 -0
  11. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/public/index.html +10 -5
  12. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/public/js/editor/vimtex.js +184 -24
  13. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/routes/__init__.py +7 -1
  14. gitlatex-2.0.0/gitlatex/routes/engine.py +198 -0
  15. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/routes/git.py +46 -0
  16. gitlatex-2.0.0/gitlatex/routes/pages.py +87 -0
  17. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/routes/system.py +7 -1
  18. gitlatex-2.0.0/gitlatex/routes/workspace.py +246 -0
  19. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/server.py +8 -0
  20. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/services/paths.py +13 -3
  21. gitlatex-2.0.0/gitlatex/ui/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
  22. gitlatex-2.0.0/gitlatex/ui/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
  23. gitlatex-2.0.0/gitlatex/ui/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
  24. gitlatex-2.0.0/gitlatex/ui/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
  25. gitlatex-2.0.0/gitlatex/ui/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
  26. gitlatex-2.0.0/gitlatex/ui/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
  27. gitlatex-2.0.0/gitlatex/ui/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
  28. gitlatex-2.0.0/gitlatex/ui/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
  29. gitlatex-2.0.0/gitlatex/ui/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
  30. gitlatex-2.0.0/gitlatex/ui/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
  31. gitlatex-2.0.0/gitlatex/ui/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
  32. gitlatex-2.0.0/gitlatex/ui/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
  33. gitlatex-2.0.0/gitlatex/ui/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
  34. gitlatex-2.0.0/gitlatex/ui/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
  35. gitlatex-2.0.0/gitlatex/ui/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
  36. gitlatex-2.0.0/gitlatex/ui/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
  37. gitlatex-2.0.0/gitlatex/ui/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
  38. gitlatex-2.0.0/gitlatex/ui/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
  39. gitlatex-2.0.0/gitlatex/ui/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
  40. gitlatex-2.0.0/gitlatex/ui/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
  41. gitlatex-2.0.0/gitlatex/ui/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
  42. gitlatex-2.0.0/gitlatex/ui/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
  43. gitlatex-2.0.0/gitlatex/ui/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
  44. gitlatex-2.0.0/gitlatex/ui/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
  45. gitlatex-2.0.0/gitlatex/ui/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
  46. gitlatex-2.0.0/gitlatex/ui/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
  47. gitlatex-2.0.0/gitlatex/ui/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
  48. gitlatex-2.0.0/gitlatex/ui/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
  49. gitlatex-2.0.0/gitlatex/ui/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
  50. gitlatex-2.0.0/gitlatex/ui/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
  51. gitlatex-2.0.0/gitlatex/ui/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
  52. gitlatex-2.0.0/gitlatex/ui/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
  53. gitlatex-2.0.0/gitlatex/ui/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
  54. gitlatex-2.0.0/gitlatex/ui/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
  55. gitlatex-2.0.0/gitlatex/ui/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
  56. gitlatex-2.0.0/gitlatex/ui/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
  57. gitlatex-2.0.0/gitlatex/ui/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
  58. gitlatex-2.0.0/gitlatex/ui/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
  59. gitlatex-2.0.0/gitlatex/ui/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
  60. gitlatex-2.0.0/gitlatex/ui/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
  61. gitlatex-2.0.0/gitlatex/ui/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
  62. gitlatex-2.0.0/gitlatex/ui/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
  63. gitlatex-2.0.0/gitlatex/ui/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
  64. gitlatex-2.0.0/gitlatex/ui/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
  65. gitlatex-2.0.0/gitlatex/ui/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
  66. gitlatex-2.0.0/gitlatex/ui/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
  67. gitlatex-2.0.0/gitlatex/ui/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
  68. gitlatex-2.0.0/gitlatex/ui/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
  69. gitlatex-2.0.0/gitlatex/ui/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
  70. gitlatex-2.0.0/gitlatex/ui/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
  71. gitlatex-2.0.0/gitlatex/ui/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
  72. gitlatex-2.0.0/gitlatex/ui/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
  73. gitlatex-2.0.0/gitlatex/ui/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
  74. gitlatex-2.0.0/gitlatex/ui/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
  75. gitlatex-2.0.0/gitlatex/ui/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
  76. gitlatex-2.0.0/gitlatex/ui/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
  77. gitlatex-2.0.0/gitlatex/ui/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
  78. gitlatex-2.0.0/gitlatex/ui/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
  79. gitlatex-2.0.0/gitlatex/ui/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
  80. gitlatex-2.0.0/gitlatex/ui/assets/PdfViewer-Bd94D2QV.js +57 -0
  81. gitlatex-2.0.0/gitlatex/ui/assets/codicon-DF1abBS2.ttf +0 -0
  82. gitlatex-2.0.0/gitlatex/ui/assets/editor.worker-Yd1NR0QT.js +34 -0
  83. gitlatex-2.0.0/gitlatex/ui/assets/index-DzQbJ7aZ.css +1 -0
  84. gitlatex-2.0.0/gitlatex/ui/assets/index-Y8smC0mJ.js +1938 -0
  85. gitlatex-2.0.0/gitlatex/ui/assets/material-symbols-outlined-DzyP15l8.woff2 +0 -0
  86. gitlatex-2.0.0/gitlatex/ui/assets/monaco-vim.umd-DNcbBSgx.js +34 -0
  87. gitlatex-2.0.0/gitlatex/ui/assets/pdf.worker.min-BmVo14Nb.mjs +28 -0
  88. gitlatex-2.0.0/gitlatex/ui/assets/tex.worker-5oo4mY5v.js +12 -0
  89. gitlatex-2.0.0/gitlatex/ui/favicon.svg +55 -0
  90. gitlatex-2.0.0/gitlatex/ui/index.html +27 -0
  91. {gitlatex-1.10.0 → gitlatex-2.0.0/gitlatex.egg-info}/PKG-INFO +66 -17
  92. gitlatex-2.0.0/gitlatex.egg-info/SOURCES.txt +174 -0
  93. gitlatex-2.0.0/gitlatex.egg-info/scm_file_list.json +216 -0
  94. gitlatex-2.0.0/gitlatex.egg-info/scm_version.json +8 -0
  95. {gitlatex-1.10.0 → gitlatex-2.0.0}/pyproject.toml +8 -0
  96. gitlatex-1.10.0/gitlatex/http.py +0 -25
  97. gitlatex-1.10.0/gitlatex/routes/pages.py +0 -65
  98. gitlatex-1.10.0/gitlatex.egg-info/SOURCES.txt +0 -99
  99. gitlatex-1.10.0/gitlatex.egg-info/scm_file_list.json +0 -94
  100. gitlatex-1.10.0/gitlatex.egg-info/scm_version.json +0 -8
  101. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/__init__.py +0 -0
  102. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/__main__.py +0 -0
  103. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/public/app.js +0 -0
  104. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/public/bib-commands.json +0 -0
  105. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/public/css/base.css +0 -0
  106. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/public/css/console.css +0 -0
  107. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/public/css/docs.css +0 -0
  108. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/public/css/editor.css +0 -0
  109. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/public/css/home.css +0 -0
  110. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/public/css/layout.css +0 -0
  111. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/public/css/loading.css +0 -0
  112. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/public/css/outline.css +0 -0
  113. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/public/css/problems.css +0 -0
  114. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/public/css/review.css +0 -0
  115. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/public/css/settings.css +0 -0
  116. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/public/css/sidebar.css +0 -0
  117. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/public/css/support.css +0 -0
  118. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/public/css/toolbar.css +0 -0
  119. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/public/css/updates.css +0 -0
  120. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/public/css/versions.css +0 -0
  121. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/public/favicon.svg +0 -0
  122. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/public/js/build/compile.js +0 -0
  123. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/public/js/build/problems.js +0 -0
  124. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/public/js/core/api.js +0 -0
  125. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/public/js/core/filetypes.js +0 -0
  126. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/public/js/core/router.js +0 -0
  127. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/public/js/core/state.js +0 -0
  128. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/public/js/core/storage.js +0 -0
  129. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/public/js/editor/completions.js +0 -0
  130. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/public/js/editor/envcolors.js +0 -0
  131. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/public/js/editor/filetree.js +0 -0
  132. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/public/js/editor/languages.js +0 -0
  133. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/public/js/editor/mainfile.js +0 -0
  134. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/public/js/editor/monaco.js +0 -0
  135. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/public/js/editor/outline.js +0 -0
  136. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/public/js/editor/projectindex.js +0 -0
  137. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/public/js/editor/review.js +0 -0
  138. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/public/js/editor/session.js +0 -0
  139. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/public/js/editor/snippets.js +0 -0
  140. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/public/js/editor/spell.js +0 -0
  141. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/public/js/editor/synctex.js +0 -0
  142. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/public/js/editor/vim.js +0 -0
  143. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/public/js/git/actions.js +0 -0
  144. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/public/js/git/diffview.js +0 -0
  145. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/public/js/git/menu.js +0 -0
  146. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/public/js/git/versions.js +0 -0
  147. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/public/js/home/repolist.js +0 -0
  148. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/public/js/ui/consolepane.js +0 -0
  149. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/public/js/ui/layout.js +0 -0
  150. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/public/js/ui/loading.js +0 -0
  151. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/public/js/ui/modals.js +0 -0
  152. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/public/js/ui/pdfviewer.js +0 -0
  153. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/public/js/ui/settings.js +0 -0
  154. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/public/js/ui/theme.js +0 -0
  155. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/public/js/ui/viewer.js +0 -0
  156. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/public/latex-commands.json +0 -0
  157. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/routes/compile.py +0 -0
  158. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/routes/files.py +0 -0
  159. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/routes/projectindex.py +0 -0
  160. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/routes/repos.py +0 -0
  161. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/routes/review.py +0 -0
  162. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/routes/snippets.py +0 -0
  163. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/routes/spell.py +0 -0
  164. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/routes/synctex.py +0 -0
  165. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/services/__init__.py +0 -0
  166. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/services/comments.py +0 -0
  167. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/services/git_backend.py +0 -0
  168. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/services/gitrepo.py +0 -0
  169. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/services/latex.py +0 -0
  170. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/services/projectindex.py +0 -0
  171. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/services/snippets.py +0 -0
  172. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/services/spell.py +0 -0
  173. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/services/synctex.py +0 -0
  174. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/services/synctex_reader.py +0 -0
  175. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/services/updates.py +0 -0
  176. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex/state.py +0 -0
  177. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex.egg-info/dependency_links.txt +0 -0
  178. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex.egg-info/entry_points.txt +0 -0
  179. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex.egg-info/requires.txt +0 -0
  180. {gitlatex-1.10.0 → gitlatex-2.0.0}/gitlatex.egg-info/top_level.txt +0 -0
  181. {gitlatex-1.10.0 → gitlatex-2.0.0}/setup.cfg +0 -0
@@ -50,6 +50,20 @@ jobs:
50
50
  # Tags pushed with GITHUB_TOKEN don't re-trigger workflows, so no double publish.
51
51
  git push origin "$NEXT"
52
52
 
53
+ - uses: actions/setup-node@v4
54
+ with:
55
+ node-version: "22"
56
+ cache: npm
57
+ cache-dependency-path: web/package-lock.json
58
+
59
+ # The editor UI (web/) is built into gitlatex/ui, which the wheel ships.
60
+ - name: Build and test the editor UI
61
+ working-directory: web
62
+ run: |
63
+ npm ci
64
+ npm test
65
+ npm run build
66
+
53
67
  - uses: actions/setup-python@v5
54
68
  with:
55
69
  python-version: "3.12"
@@ -59,6 +73,9 @@ jobs:
59
73
  python -m pip install --upgrade build twine
60
74
  python -m build
61
75
  python -m twine check dist/*
76
+ # Fail rather than publish a package without its UI or engine manifest.
77
+ unzip -l dist/*.whl | grep -q "gitlatex/ui/index.html"
78
+ unzip -l dist/*.whl | grep -q "gitlatex/engine/manifest.json"
62
79
 
63
80
  - name: Make sure the build got a clean release version
64
81
  id: version
@@ -20,3 +20,6 @@ pypirc.example
20
20
 
21
21
  # Generated by setuptools-scm
22
22
  gitlatex/_version.py
23
+
24
+ # Editor UI built from web/ (npm run build)
25
+ gitlatex/ui/
@@ -0,0 +1,4 @@
1
+ # The editor UI ships prebuilt in gitlatex/ui (package data); its sources in
2
+ # web/ and the test repos stay out of the sdist.
3
+ prune web
4
+ prune repos
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gitlatex
3
- Version: 1.10.0
3
+ Version: 2.0.0
4
4
  Summary: A simple UI for LaTeX projects with Git support. Clone repos, edit, compile, and push.
5
5
  License-Expression: ISC
6
6
  Project-URL: Homepage, https://github.com/abdussamiakanda/gitlatex
@@ -53,12 +53,15 @@ Git repository. Your `.tex` files are just files, and your history is just Git.
53
53
 
54
54
  - **Your files stay yours.** Plain folders on your disk, versioned with real Git.
55
55
  - **No account, no subscription, no upload cap.**
56
- - **Compiles locally**, so your unpublished work never leaves your machine.
56
+ - **Compiles locally**, so your unpublished work never leaves your machine —
57
+ with your own TeX installation, or with **TeX Live running in the browser**
58
+ when you have none.
57
59
  - **One command to start.** `pip install gitlatex && gitlatex`.
58
60
 
59
- > The editor itself (Monaco), the icon set and the web fonts are loaded from a
60
- > CDN, so the interface needs a network connection the first time it is opened
61
- > on a machine. Everything else — your files, compiling, and Git — is local.
61
+ > The in-browser TeX engine (~190 MB) and any extra LaTeX packages it needs
62
+ > are downloaded on first use and cached in `~/.gitlatex`, so compiling without
63
+ > a TeX installation needs a network connection once. Everything else — your
64
+ > files, the editor, and Git — is local.
62
65
 
63
66
  ---
64
67
 
@@ -73,11 +76,25 @@ pip install gitlatex
73
76
  | | |
74
77
  | --- | --- |
75
78
  | Python | 3.8 or newer |
76
- | LaTeX | A distribution providing `pdflatex` — [TeX Live](https://www.tug.org/texlive/), [MiKTeX](https://miktex.org/), or [MacTeX](https://www.tug.org/mactex/) |
79
+ | LaTeX | Optional — [TeX Live](https://www.tug.org/texlive/), [MiKTeX](https://miktex.org/) or [MacTeX](https://www.tug.org/mactex/). Without one, documents compile in the browser |
77
80
  | Git | Required for cloning, pushing and version history |
78
81
 
79
- LaTeX and Git are optional if you only want to edit files, but compiling and the
80
- Git features need them on your `PATH`.
82
+ ### Compilers
83
+
84
+ **Settings → Compiler** picks where documents are built:
85
+
86
+ | | |
87
+ | --- | --- |
88
+ | **Auto** (default) | Local TeX when `pdflatex`/`xelatex`/`lualatex` is on your `PATH`, otherwise the browser |
89
+ | **In the browser** | Real TeX Live 2022 (pdfTeX, XeTeX, BibTeX, makeindex) compiled to WebAssembly, from [BusyTeX](https://github.com/busytex/busytex). Missing packages (TikZ, biblatex, extra fonts…) are fetched on demand from a package shelf. No LuaLaTeX, no biber (use `backend=bibtex`), no shell escape |
90
+ | **Local TeX** | Your TeX installation, with bibtex/biber |
91
+ | **Compiler API** | A remote web service that compiles LaTeX (same format as before; see the classic editor's Settings → Compiler API) |
92
+
93
+ Browser builds write `main.pdf` and its SyncTeX data into the project folder,
94
+ just like local builds. `gitlatex --fetch-engine` downloads the engine ahead of
95
+ time (for example before going offline). The package shelf defaults to the one
96
+ published by [TexBrowser IDE](https://github.com/jukomol/TexBrowser-IDE); point
97
+ `GITLATEX_SHELF_URL` elsewhere, or set it empty to disable on-demand packages.
81
98
 
82
99
  ---
83
100
 
@@ -209,20 +226,19 @@ powers VS Code.
209
226
  ### Vim mode with VimTeX-style mappings
210
227
 
211
228
  Turn on **Settings → Editor → Vim keybindings** for normal, insert and visual
212
- modes, with `:w` to save. On top of that, the parts of
229
+ modes, with `:w` to save. In `.tex` files you also get the parts of
213
230
  [VimTeX](https://github.com/lervag/vimtex) people use every day:
214
231
 
215
232
  | | Keys |
216
233
  | --- | --- |
217
- | Text objects | `ie`/`ae` environment · `i$`/`a$` math · `ic`/`ac` command · `id`/`ad` delimiters · `iP`/`aP` section |
218
- | Motions | `]]` `[[` sections · `]m` `[m` `\begin` · `]M` `[M` `\end` · `]n` `[n` math · `%` jumps between `\begin` and `\end` |
219
- | Delete / change / toggle | `dse` `cse` `tse` environment · `dsc` `csc` `tsc` command · `ds$` `cs$` `ts$` math · `dsd` `tsd` `\left…\right` · `tsf` `\frac{a}{b}` ↔ `a/b` |
234
+ | Text objects | `ie`/`ae` environment · `i$`/`a$` math · `ic`/`ac` command · `id`/`ad` delimiters · `iP`/`aP` section · `im`/`am` item |
235
+ | Motions | `]]` `[[` `][` `[]` sections · `]m` `[m` `]M` `[M` environments · `]n` `[n` `]N` `[N` math · `]r` `[r` `]R` `[R` frames · `]*` `[*` comments · `%` |
236
+ | Delete / change / toggle | `dse` `cse` `tse` `tss` environment · `dsc` `csc` `tsc` command · `ds$` `cs$` `ts$` math · `dsd` `csd` `tsd` delimiters · `tsf` fractions · `tsb` `\\` |
220
237
  | Leader commands | `\ll` compile · `\lv` show in PDF · `\lt` outline · `\le` errors |
221
238
  | Insert mode | `]]` closes the current environment |
222
239
  | Ex commands | `:VimtexCompile` · `:VimtexView` · `:VimtexToc` · `:VimtexErrors` |
223
240
 
224
- Comments are ignored when matching environments, so a commented-out `\begin`
225
- never pairs with a real `\end`. The full table is also in Settings.
241
+ See [docs/vim-mode.md](docs/vim-mode.md) for what each key does, with examples.
226
242
 
227
243
  ### Review comments
228
244
 
@@ -291,8 +307,27 @@ pip install -e .
291
307
  gitlatex
292
308
  ```
293
309
 
294
- There is **no build step**. The browser loads the ES modules directly, so editing
295
- a file and reloading the page is the entire feedback loop.
310
+ The editor UI lives in `web/` (React + TypeScript + Vite) and is built into
311
+ `gitlatex/ui/`, which the server serves at `/`. It needs Node 22+:
312
+
313
+ ```bash
314
+ cd web
315
+ npm install
316
+ npm run build # → gitlatex/ui (then run `gitlatex` as usual)
317
+ npm run dev # hot reload on :5173, proxying the API to `gitlatex --no-browser` on :5000
318
+ npm test # unit tests (vitest)
319
+ npm run e2e:gitlatex -- http://127.0.0.1:5000 /tmp/gl-e2e # browser tests: run `gitlatex --repos /tmp/gl-e2e` first
320
+ npm run e2e:features -- http://127.0.0.1:5000 /tmp/gl-e2e # (and e2e:synctex); they create projects, so never ./repos
321
+ ```
322
+
323
+ The previous vanilla-JS editor is still served at `/classic` (no build step).
324
+ Vim mode, review comments, spell checking and snippets have been ported to the
325
+ new UI and share their settings, snippets and dictionary with it. An install
326
+ without a built UI falls back to the classic editor.
327
+
328
+ `web/` started as [TexBrowser IDE](https://github.com/jukomol/TexBrowser-IDE)
329
+ (MIT, see `web/LICENSE-texbrowser`); its browser storage and GitHub sync were
330
+ replaced by gitlatex's folders and Git.
296
331
 
297
332
  ### Project layout
298
333
 
@@ -319,13 +354,27 @@ front of it.
319
354
  | `services/updates.py` | The cached PyPI version check |
320
355
  | `services/comments.py` | Review comment threads, stored in `.gitlatex/comments/` |
321
356
  | `services/gitrepo.py`, `services/git_backend.py` | Shared GitPython plumbing |
357
+ | `routes/workspace.py` | The file API the editor UI uses (open a project, write/move/delete files) |
358
+ | `routes/engine.py` | Serves the in-browser TeX engine and package shelf, downloading and caching them in `~/.gitlatex` |
359
+ | `engine/manifest.json` | The engine's file list and checksums, generated by `web/scripts/fetch-engine.mjs` |
322
360
  | `routes/` | One blueprint per area — see `routes/__init__.py` |
323
361
 
324
362
  To add an endpoint: put the logic in `services/`, then a short handler in the
325
363
  matching `routes/*.py`. `routes/pages.py` registers last, because its catch-all
326
364
  serves `index.html` for unknown paths.
327
365
 
328
- **Front end** (`gitlatex/public/`)
366
+ **Editor UI** (`web/src/`)
367
+
368
+ | Path | What lives there |
369
+ | --- | --- |
370
+ | `state/actions.ts` | Every user-facing operation: projects, files, compiling (browser / local / API), Git |
371
+ | `state/workspace.ts` | The open project in memory, written back to disk through one ordered queue |
372
+ | `storage/server.ts` | Typed client for the gitlatex server |
373
+ | `engine/` | The WebAssembly TeX engine: worker, latexmk-style compile loop, package shelf |
374
+ | `editor/`, `pdf/`, `latex/` | Monaco setup and LaTeX language features, the pdf.js viewer, log parsing and SyncTeX |
375
+ | `components/` | Panels, dialogs, the projects home, Git panels |
376
+
377
+ **Classic front end** (`gitlatex/public/`, served at `/classic`)
329
378
 
330
379
  | Path | What lives there |
331
380
  | --- | --- |
@@ -25,12 +25,15 @@ Git repository. Your `.tex` files are just files, and your history is just Git.
25
25
 
26
26
  - **Your files stay yours.** Plain folders on your disk, versioned with real Git.
27
27
  - **No account, no subscription, no upload cap.**
28
- - **Compiles locally**, so your unpublished work never leaves your machine.
28
+ - **Compiles locally**, so your unpublished work never leaves your machine —
29
+ with your own TeX installation, or with **TeX Live running in the browser**
30
+ when you have none.
29
31
  - **One command to start.** `pip install gitlatex && gitlatex`.
30
32
 
31
- > The editor itself (Monaco), the icon set and the web fonts are loaded from a
32
- > CDN, so the interface needs a network connection the first time it is opened
33
- > on a machine. Everything else — your files, compiling, and Git — is local.
33
+ > The in-browser TeX engine (~190 MB) and any extra LaTeX packages it needs
34
+ > are downloaded on first use and cached in `~/.gitlatex`, so compiling without
35
+ > a TeX installation needs a network connection once. Everything else — your
36
+ > files, the editor, and Git — is local.
34
37
 
35
38
  ---
36
39
 
@@ -45,11 +48,25 @@ pip install gitlatex
45
48
  | | |
46
49
  | --- | --- |
47
50
  | Python | 3.8 or newer |
48
- | LaTeX | A distribution providing `pdflatex` — [TeX Live](https://www.tug.org/texlive/), [MiKTeX](https://miktex.org/), or [MacTeX](https://www.tug.org/mactex/) |
51
+ | LaTeX | Optional — [TeX Live](https://www.tug.org/texlive/), [MiKTeX](https://miktex.org/) or [MacTeX](https://www.tug.org/mactex/). Without one, documents compile in the browser |
49
52
  | Git | Required for cloning, pushing and version history |
50
53
 
51
- LaTeX and Git are optional if you only want to edit files, but compiling and the
52
- Git features need them on your `PATH`.
54
+ ### Compilers
55
+
56
+ **Settings → Compiler** picks where documents are built:
57
+
58
+ | | |
59
+ | --- | --- |
60
+ | **Auto** (default) | Local TeX when `pdflatex`/`xelatex`/`lualatex` is on your `PATH`, otherwise the browser |
61
+ | **In the browser** | Real TeX Live 2022 (pdfTeX, XeTeX, BibTeX, makeindex) compiled to WebAssembly, from [BusyTeX](https://github.com/busytex/busytex). Missing packages (TikZ, biblatex, extra fonts…) are fetched on demand from a package shelf. No LuaLaTeX, no biber (use `backend=bibtex`), no shell escape |
62
+ | **Local TeX** | Your TeX installation, with bibtex/biber |
63
+ | **Compiler API** | A remote web service that compiles LaTeX (same format as before; see the classic editor's Settings → Compiler API) |
64
+
65
+ Browser builds write `main.pdf` and its SyncTeX data into the project folder,
66
+ just like local builds. `gitlatex --fetch-engine` downloads the engine ahead of
67
+ time (for example before going offline). The package shelf defaults to the one
68
+ published by [TexBrowser IDE](https://github.com/jukomol/TexBrowser-IDE); point
69
+ `GITLATEX_SHELF_URL` elsewhere, or set it empty to disable on-demand packages.
53
70
 
54
71
  ---
55
72
 
@@ -181,20 +198,19 @@ powers VS Code.
181
198
  ### Vim mode with VimTeX-style mappings
182
199
 
183
200
  Turn on **Settings → Editor → Vim keybindings** for normal, insert and visual
184
- modes, with `:w` to save. On top of that, the parts of
201
+ modes, with `:w` to save. In `.tex` files you also get the parts of
185
202
  [VimTeX](https://github.com/lervag/vimtex) people use every day:
186
203
 
187
204
  | | Keys |
188
205
  | --- | --- |
189
- | Text objects | `ie`/`ae` environment · `i$`/`a$` math · `ic`/`ac` command · `id`/`ad` delimiters · `iP`/`aP` section |
190
- | Motions | `]]` `[[` sections · `]m` `[m` `\begin` · `]M` `[M` `\end` · `]n` `[n` math · `%` jumps between `\begin` and `\end` |
191
- | Delete / change / toggle | `dse` `cse` `tse` environment · `dsc` `csc` `tsc` command · `ds$` `cs$` `ts$` math · `dsd` `tsd` `\left…\right` · `tsf` `\frac{a}{b}` ↔ `a/b` |
206
+ | Text objects | `ie`/`ae` environment · `i$`/`a$` math · `ic`/`ac` command · `id`/`ad` delimiters · `iP`/`aP` section · `im`/`am` item |
207
+ | Motions | `]]` `[[` `][` `[]` sections · `]m` `[m` `]M` `[M` environments · `]n` `[n` `]N` `[N` math · `]r` `[r` `]R` `[R` frames · `]*` `[*` comments · `%` |
208
+ | Delete / change / toggle | `dse` `cse` `tse` `tss` environment · `dsc` `csc` `tsc` command · `ds$` `cs$` `ts$` math · `dsd` `csd` `tsd` delimiters · `tsf` fractions · `tsb` `\\` |
192
209
  | Leader commands | `\ll` compile · `\lv` show in PDF · `\lt` outline · `\le` errors |
193
210
  | Insert mode | `]]` closes the current environment |
194
211
  | Ex commands | `:VimtexCompile` · `:VimtexView` · `:VimtexToc` · `:VimtexErrors` |
195
212
 
196
- Comments are ignored when matching environments, so a commented-out `\begin`
197
- never pairs with a real `\end`. The full table is also in Settings.
213
+ See [docs/vim-mode.md](docs/vim-mode.md) for what each key does, with examples.
198
214
 
199
215
  ### Review comments
200
216
 
@@ -263,8 +279,27 @@ pip install -e .
263
279
  gitlatex
264
280
  ```
265
281
 
266
- There is **no build step**. The browser loads the ES modules directly, so editing
267
- a file and reloading the page is the entire feedback loop.
282
+ The editor UI lives in `web/` (React + TypeScript + Vite) and is built into
283
+ `gitlatex/ui/`, which the server serves at `/`. It needs Node 22+:
284
+
285
+ ```bash
286
+ cd web
287
+ npm install
288
+ npm run build # → gitlatex/ui (then run `gitlatex` as usual)
289
+ npm run dev # hot reload on :5173, proxying the API to `gitlatex --no-browser` on :5000
290
+ npm test # unit tests (vitest)
291
+ npm run e2e:gitlatex -- http://127.0.0.1:5000 /tmp/gl-e2e # browser tests: run `gitlatex --repos /tmp/gl-e2e` first
292
+ npm run e2e:features -- http://127.0.0.1:5000 /tmp/gl-e2e # (and e2e:synctex); they create projects, so never ./repos
293
+ ```
294
+
295
+ The previous vanilla-JS editor is still served at `/classic` (no build step).
296
+ Vim mode, review comments, spell checking and snippets have been ported to the
297
+ new UI and share their settings, snippets and dictionary with it. An install
298
+ without a built UI falls back to the classic editor.
299
+
300
+ `web/` started as [TexBrowser IDE](https://github.com/jukomol/TexBrowser-IDE)
301
+ (MIT, see `web/LICENSE-texbrowser`); its browser storage and GitHub sync were
302
+ replaced by gitlatex's folders and Git.
268
303
 
269
304
  ### Project layout
270
305
 
@@ -291,13 +326,27 @@ front of it.
291
326
  | `services/updates.py` | The cached PyPI version check |
292
327
  | `services/comments.py` | Review comment threads, stored in `.gitlatex/comments/` |
293
328
  | `services/gitrepo.py`, `services/git_backend.py` | Shared GitPython plumbing |
329
+ | `routes/workspace.py` | The file API the editor UI uses (open a project, write/move/delete files) |
330
+ | `routes/engine.py` | Serves the in-browser TeX engine and package shelf, downloading and caching them in `~/.gitlatex` |
331
+ | `engine/manifest.json` | The engine's file list and checksums, generated by `web/scripts/fetch-engine.mjs` |
294
332
  | `routes/` | One blueprint per area — see `routes/__init__.py` |
295
333
 
296
334
  To add an endpoint: put the logic in `services/`, then a short handler in the
297
335
  matching `routes/*.py`. `routes/pages.py` registers last, because its catch-all
298
336
  serves `index.html` for unknown paths.
299
337
 
300
- **Front end** (`gitlatex/public/`)
338
+ **Editor UI** (`web/src/`)
339
+
340
+ | Path | What lives there |
341
+ | --- | --- |
342
+ | `state/actions.ts` | Every user-facing operation: projects, files, compiling (browser / local / API), Git |
343
+ | `state/workspace.ts` | The open project in memory, written back to disk through one ordered queue |
344
+ | `storage/server.ts` | Typed client for the gitlatex server |
345
+ | `engine/` | The WebAssembly TeX engine: worker, latexmk-style compile loop, package shelf |
346
+ | `editor/`, `pdf/`, `latex/` | Monaco setup and LaTeX language features, the pdf.js viewer, log parsing and SyncTeX |
347
+ | `components/` | Panels, dialogs, the projects home, Git panels |
348
+
349
+ **Classic front end** (`gitlatex/public/`, served at `/classic`)
301
350
 
302
351
  | Path | What lives there |
303
352
  | --- | --- |
@@ -0,0 +1,179 @@
1
+ # Vim mode and VimTeX-style keybindings
2
+
3
+ gitlatex's editor has an optional Vim mode, built on
4
+ [monaco-vim](https://github.com/brijeshb42/monaco-vim), with a layer of
5
+ [VimTeX](https://github.com/lervag/vimtex)-style mappings for LaTeX on top.
6
+
7
+ - **Turn it on:** **Settings → Editor → Vim keybindings**. It is off by default,
8
+ and monaco-vim is only downloaded the first time you switch it on.
9
+ - **Where the VimTeX keys work:** only in TeX files (`.tex`, `.sty`, `.cls`,
10
+ `.ltx`, `.dtx`). In every other file (`.md`, `.bib`, …) the same keys do
11
+ whatever plain Vim does. See [Standard Vim](#standard-vim-every-file).
12
+ - **Comments are ignored:** a `\begin`, `\end`, `$` or bracket inside a `%`
13
+ comment never pairs with a real one.
14
+
15
+ The code lives in `web/src/editor/vimtex.ts` (the VimTeX layer) and
16
+ `web/src/editor/vim.ts` (loading monaco-vim, ex commands). The classic editor
17
+ at `/classic` has the same keys, in `gitlatex/public/js/editor/`. A shorter
18
+ table is also in Settings.
19
+
20
+ ## Text objects
21
+
22
+ Text objects don't do anything on their own. Put one after an operator (`d`
23
+ delete, `c` change, `y` copy, `>` indent, …) or use it in visual mode (`v`).
24
+ `i…` means *inside*, `a…` means *around* (including the delimiters).
25
+
26
+ | Keys | Object |
27
+ | --- | --- |
28
+ | `ie` `ae` | LaTeX environment (`\begin{…}` … `\end{…}`) |
29
+ | `i$` `a$` | Math: `$…$`, `$$…$$`, `\(…\)`, `\[…\]`, and math environments (`equation`, `align`, `gather`, `multline`, …, starred or not) |
30
+ | `ic` `ac` | Command: `ic` is the argument the cursor is in (or the first `{}` argument); `ac` is the whole `\name*[…]{…}` |
31
+ | `id` `ad` | Delimiters: `()`, `[]`, `{}`, `\{\}`; `ad` also takes `\left`/`\right` or `\bigl`/`\bigr`, … |
32
+ | `iP` `aP` | Section: `iP` is the body, `aP` includes the heading. Runs to the next heading of the same or higher level, or to `\end{document}` |
33
+ | `im` `am` | `\item` in `itemize`, `enumerate` or `description`: `im` is the text after `\item[…]`, `am` includes `\item` |
34
+
35
+ They act on the **innermost** object around the cursor. When the opening and
36
+ closing tokens each sit on their own line, `ie`, `i$` (display math) and `am`
37
+ work on whole lines.
38
+
39
+ ### Example
40
+
41
+ With the cursor anywhere inside:
42
+
43
+ ```latex
44
+ \begin{itemize}
45
+ \item one
46
+ \item two
47
+ \end{itemize}
48
+ ```
49
+
50
+ | Keys | Result |
51
+ | --- | --- |
52
+ | `die` | Deletes both `\item` lines, keeps `\begin`/`\end` |
53
+ | `dae` | Deletes the whole environment |
54
+ | `cie` | Empties the environment and enters insert mode |
55
+ | `yae` | Copies the environment (paste with `p`) |
56
+ | `vie` | Selects the contents, so you can see what `ie` covers |
57
+ | `dam` | Deletes the item under the cursor |
58
+ | `cim` | Rewrites the item's text |
59
+
60
+ More: `ci$` rewrites an equation, `dac` deletes `\textbf{word}`, `cic` changes
61
+ just `word`, `yaP` copies a whole section.
62
+
63
+ Typing `ie` in normal mode *without* an operator starts insert mode and types
64
+ `e`, because `i` means insert there.
65
+
66
+ ## Motions
67
+
68
+ All motions take a count (`3]]`) and can follow an operator (`d]]`). Jumps are
69
+ added to the jump list, so `Ctrl-o` takes you back.
70
+
71
+ | Keys | Moves to |
72
+ | --- | --- |
73
+ | `]]` `[[` | Next / previous section start |
74
+ | `][` `[]` | Next / previous section end |
75
+ | `]m` `[m` | Next / previous `\begin{…}` |
76
+ | `]M` `[M` | Next / previous `\end{…}` |
77
+ | `]n` `[n` | Next / previous math start |
78
+ | `]N` `[N` | Next / previous math end |
79
+ | `]r` `[r` | Next / previous `\begin{frame}` (Beamer) |
80
+ | `]R` `[R` | Next / previous `\end{frame}` |
81
+ | `]*` | Next comment end |
82
+ | `[*` | Previous comment start |
83
+ | `%` | Matching `\begin` ↔ `\end`, `$` ↔ `$`, `\(` ↔ `\)`, `\[` ↔ `\]`, or bracket |
84
+
85
+ Comments on consecutive lines count as one block for `]*` and `[*`.
86
+
87
+ ## Delete, change and toggle surroundings
88
+
89
+ Put the cursor anywhere inside the thing, then type the keys in normal mode.
90
+
91
+ | Keys | Environment | Command | Math | Delimiters |
92
+ | --- | --- | --- | --- | --- |
93
+ | `ds…` delete | `dse` | `dsc` | `ds$` | `dsd` |
94
+ | `cs…` change | `cse` | `csc` | `cs$` | `csd` |
95
+ | `ts…` toggle | `tse` / `tss` | `tsc` | `ts$` | `tsd` |
96
+
97
+ - **`dse`** removes `\begin{…}`/`\end{…}` and keeps the contents. If a token
98
+ was alone on its line, the line goes too.
99
+ - **`dsc`** replaces `\cmd[…]{text}` with `text`.
100
+ - **`ds$`** removes the math delimiters or math environment.
101
+ - **`dsd`** removes a bracket pair, including `\left`/`\right`.
102
+ - **`cse`**, **`csc`** ask for a new name.
103
+ - **`cs$`** asks for the new math form: `$`, `\(`, `\[`, `$$`, or an
104
+ environment name such as `align`.
105
+ - **`csd`** asks for the new opening delimiter: `(`, `[`, `{`, `\{`, `|`, `\|`,
106
+ `\langle`, `\lvert` or `\lVert`. `\left`/`\right` are kept.
107
+ - **`tse`** switches to the complementary environment: `itemize` ↔
108
+ `enumerate`, `equation` ↔ `align` (a star is kept). For any other
109
+ environment it asks for a name.
110
+ - **`tss`** toggles the environment's star: `equation` ↔ `equation*`.
111
+ - **`tsc`** toggles the command's star: `\section` ↔ `\section*`.
112
+ - **`ts$`** toggles inline math (`$…$`, `\(…\)`) ↔ display math (`\[…\]`).
113
+ - **`tsd`** toggles `(…)` ↔ `\left(…\right)`.
114
+
115
+ ### Other toggles
116
+
117
+ | Keys | Does |
118
+ | --- | --- |
119
+ | `tsf` | `\frac{a}{b}` ↔ `a/b` (also `\dfrac`, `\tfrac`). Parentheses are added or removed as needed: `\frac{a+b}{c}` ↔ `(a+b)/c` |
120
+ | `tsb` | Adds or removes a trailing `\\` on the current line, ignoring any `%` comment |
121
+
122
+ ## Leader commands
123
+
124
+ | Keys | Does |
125
+ | --- | --- |
126
+ | `\ll` | Compile |
127
+ | `\lv` | Show the cursor position in the PDF (SyncTeX) |
128
+ | `\lt` | Toggle the outline |
129
+ | `\le` | Show compile errors |
130
+
131
+ ## Insert mode
132
+
133
+ | Keys | Does |
134
+ | --- | --- |
135
+ | `]]` | Closes the innermost open environment: typing `]]` after `\begin{align}…` inserts `\end{align}` |
136
+
137
+ ## Ex commands
138
+
139
+ | Command | Does |
140
+ | --- | --- |
141
+ | `:w`, `:up` | Save |
142
+ | `:VimtexCompile` | Compile |
143
+ | `:VimtexView` | Show the cursor position in the PDF |
144
+ | `:VimtexToc` | Toggle the outline |
145
+ | `:VimtexErrors` | Show compile errors |
146
+
147
+ The `:Vimtex…` ex commands work from any file, not only TeX files.
148
+
149
+ ## Standard Vim (every file)
150
+
151
+ Everything monaco-vim supports works in every file, TeX or not:
152
+
153
+ - **Modes:** `i a I A o O gi`, visual `v V Ctrl-v gv`, replace `R`, back to
154
+ normal with `Esc`, `Ctrl-[` or `Ctrl-c`.
155
+ - **Moving:** `h j k l gj gk`, `w W b B e E ge gE`, `0 ^ $`, `f F t T` + char
156
+ with `;` `,`, `{ }` paragraphs, `( )` sentences, `gg G`, `H M L`,
157
+ `Ctrl-d Ctrl-u Ctrl-f Ctrl-b`, `zz zt zb`, marks `ma` / `` `a `` / `'a`,
158
+ jump list `Ctrl-o Ctrl-i`.
159
+ - **Editing:** operators `d c y > < = gu gU g~`, plus `x X D C Y s S J gJ r ~
160
+ p P u Ctrl-r . Ctrl-a Ctrl-x`, and counts (`3dd`).
161
+ - **Text objects:** `iw aw iW aW ip ap`, brackets `i( i[ i{ i<` (`ib` = `i(`,
162
+ `iB` = `i{`), quotes ``i" i' i` ``, tags `it at`.
163
+ - **Search:** `/ ? n N * # gn gN`.
164
+ - **Macros and registers:** `qa … q`, `@a`, `@@`, `"ayy`, `"ap`.
165
+ - **Ex:** `:s` / `:%s`, `:g` / `:v`, `:sort`, `:noh`, `:set`, `:map` / `:nmap` /
166
+ `:imap` / `:vmap` / `:unmap`, `:registers`, `:delmarks`.
167
+
168
+ Outside TeX files, `%`, `[[`, `]]`, `[m`, `]m`, `[*`, `]*` and the `i…`/`a…`
169
+ text objects above fall back to plain Vim. The Vim versions of `[[`, `]m` and
170
+ `[*` look for C-style code structure and aren't much use in Markdown.
171
+
172
+ ## Notes
173
+
174
+ - The `ts…` commands start with `t`, so Vim's "move to just before the letter
175
+ s" (`ts`, then another key) runs as soon as you type the third key, as in
176
+ VimTeX.
177
+ - The VimTeX `ds…`, `cs…` and `ts…` commands only start from a fresh normal
178
+ mode: not after a count (`2dse` does nothing special) and not in visual mode.
179
+ - Every `ds…`, `cs…` and `ts…` edit is a single undo step.
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
18
18
  commit_id: str | None
19
19
  __commit_id__: str | None
20
20
 
21
- __version__ = version = '1.10.0'
22
- __version_tuple__ = version_tuple = (1, 10, 0)
21
+ __version__ = version = '2.0.0'
22
+ __version_tuple__ = version_tuple = (2, 0, 0)
23
23
 
24
- __commit_id__ = commit_id = 'gf35199fa5'
24
+ __commit_id__ = commit_id = 'gf67d4da27'
@@ -25,7 +25,10 @@ def create_app(repos_dir=None):
25
25
  app = Flask(__name__, static_folder=None)
26
26
  app.config["MAX_CONTENT_LENGTH"] = 50 * 1024 * 1024 # 50MB
27
27
 
28
- state.BASE_DIR = str(Path(repos_dir) if repos_dir else _repos_base())
28
+ # Absolute, because Flask's send_file resolves relative paths against the
29
+ # package folder rather than the working directory (`--repos repos` broke
30
+ # every file download).
31
+ state.BASE_DIR = os.path.abspath(str(Path(repos_dir) if repos_dir else _repos_base()))
29
32
  os.makedirs(state.BASE_DIR, exist_ok=True)
30
33
 
31
34
  public = paths._public_dir()