davidstraka2 / wootom Goto Github PK
View Code? Open in Web Editor NEWWooWoo Editor for Atom
License: MIT License
WooWoo Editor for Atom
License: MIT License
Add renderers for the .itemize
and .enumerate
outer environments (as well as the .item
outer environment).
Preview HTML document to the side of the editor.
The HTML source should be passed using API, not the currently opened document. This makes the currently existing packages implementing HTML preview probably unusable, so a custom implementation will be needed.
Add simple, template independent WooWoo syntax highlighting.
(This will be expanded on in the future by adding dynamic template-aware syntax highlighting.)
The SVG images in the preview of the !tikz
outer environments are broken on macOS. Only the text is shown, all of it aligned to the top of the image, no other shapes are displayed. See an image example below.
Compare that to the correctly displayed SVG on Windows 10 and Arch Linux, shown below.
The WooWoo source of the .Figure
object from the examples shown is included below. Note that the preview examples use dark editor theme and inverted SVG colors.
.Figure:
label: fig-vektory
!tikz:
filename: fig-vektory-1
\draw[blue,thick,->] (0,0) -- (3,3) node[anchor=south east] {$\alpha \cdot \vec a,\, \alpha > 1$};
\draw[very thick,black,->] (0,0) -- (2,2) node[anchor=north west] {$\vec a$};
\draw[red,very thick,->] (0,0) -- (1,1) node[anchor=south east] {$\alpha \cdot \vec a,\, 0 < \alpha < 1$};
\draw[brown,thick,->] (0,0) -- (-1,-1) node[anchor=north west] {$\alpha \cdot \vec a,\, \alpha < 0$};
\fill[black] (0,0) circle (2pt) node[anchor=south east] {$O$};
\node at (1,-2) {(a)};
!tikz:
filename: fog-vektory-2
options: 'scale=1.5'
\draw[black,thick,->] (0,0) -- (.5,2) node[above] {$\vec a$};
\draw[blue,thick,->] (0,0) -- (1.5,-.5) node[below] {$\vec b$};
\draw[blue,dashed] (.5,2) -- (2,1.5);
\draw[black,dashed] (1.5,-.5) -- (2,1.5);
\draw[red,very thick,->] (0,0) -- (2,1.5) node[anchor=south west] {$\vec a + \vec b$};
\node at (1,-1.5) {(b)};
\fill[black] (0,0) circle (1pt) node[left] {$O$};
.caption:
Geometrický význam násobení vektoru číslem (a) a sčítání vektorů (b).
The TeX file used for generating the SVG, the DVI file generated from it on macOS using latex
(from an up to date MacTeX distribution), the log file from the process, as well as both the broken SVG generated on macOS and correct SVG generated on Windows 10 - both using dvisvgm
included in the TeX distribution (that being full texlive on Windows) - can all be found attached in this zip archive attachment.
Update project description to reflect currently present features. Add development setup instructions. Tweak settings' descriptions.
Set up TypeScript for package development.
License requirements:
Some resources:
Add snippets for the WooWoo template "FIT Template".
Update changelog, bump version, and publish package.
Add support for Atom's "Editor: Toggle Line Comments" command (editor:toggle-line-comments, default keybinding Ctrl+/).
See eg. Atom's language-yaml package's settings for how to get it working.
Add WooWoo HTML preview support for the only
metablock item.
This is sometimes added to block-type content to restrict its output to only certain formats (such as pdf, html, etc.). The preview should obviously show the output regardless, but it should somehow indicate that the only
item has been set.
One simple way to achieve this would be adding an "info box" around the tagged content, similar to the way document objects are displayed. Since this metablock item can be added to basically any block-type content, instead of creating some "mixin" or a function to be used in every renderer, a rendering "middleware" system could be developed.
Add basic project description. Emphasize that the project is very much a work in progress.
Clear pre-queue after triggering MathJax typesetting.
Set up GitHub Actions to run package tests (specs) upon every commit.
It works correctly when there are more elements to be typeset (even with just 2 it seems to work reliably). But once there is only 1 element (no matter whether it's block or inline math) to be typeset, it's just empty (it's correctly added to the queue to be typeset, but after some time the queue is emptied by MathJax without any result). If it's manually added to the queue again from the console, then it finally gets typeset.
This might possibly be caused by triggering the typetting too soon (before the elements are actually displayed in the pane).
Various development environment tweaks, mainly to do with TypeScript and ESLint:
tsconfig.tsbuildinfo
location (see this for more info); this will make preparing dist package cleaner.gitignore
in style of .prettierignore
, to make it cleaner for any future expansionPreview currently opened WooWoo document in an HTML view pane to be opened to the side of the editor. Utilize the existing HTMLViewModel (and expand it with any functionality needed), WooWoo parsing and rendering. Watch for active open editor and its content changes.
As seen with commit e7037b8, when the lint:check
task is run without the project being built, it reports two @typescript-eslint/no-unsafe-member-access
errors. When running the lint:check
task after running the build
task (or on an already built project), there are no issues reported.
What's even more strange is that many other rules are reported correctly, no matter if the project is built or not.
This behavior was reproduced on both Windows 10 and Ubuntu 18 (inside WSL).
Line comments may now contain leading whitespace. Add support for the "@" shorthand verbose inner environment.
Set up Prettier to allow for easy source formatting.
Write changelog and publish package.
Set up ESLint with some recommended rules.
Update changelog, bump version, and publish package.
Use Atom's Less color variables where (fixed) custom colors are in use as of now. This will improve the contrast between these colors and any other colors of the UI theme used by the user.
Refactor and modularize the currently used Less stylesheets.
Feel free to tweak any other styles (such as making the preview footnotes stand out less, after all a footnote should be less important than the rest of the content).
Add navigation pane with table of contents (document parts), and list of labels of the currently opened WooWoo file. Both of these should support fuzzy search (use a library) among their respective items.
Set up GitHub Actions to check that the project builds successfully upon every commit.
Set up package tests (specs). A simple dummy test will do for now (as there is nothing to test now really).
Add a script to clean up build output. This can be useful e.g. when a spec file is deleted but it remains in the build output and thus fails test runs.
Improve testing setup by:
Update changelog, bump version, and publish package.
Seems to happen only on macOS. See image of the error included below.
While mkdir
isn't called directly by Wootom, fs.emptyDir()
from fs-extra is used for ensuring clean (and existing) directory for generating DVI and SVG files from TikZ code. This function "Ensures that a directory is empty. Deletes directory contents if the directory is not empty. If the directory does not exist, it is created. The directory itself is not deleted." The directory currently used is the CWD/PWD of the Atom process. Therefore one possible explanation of what is happening is an issue with permissions on macOS. I don't have a macOS device to make sure that's the case / to test the fix, but changing the directory used is probably better anyway.
One possibility is to use the current project directory instead, but it might require users to add the .wootom
directory to the project's .gitignore
(if the project uses Git). A better option seems to be using the tmp directory of the OS, which we can get using os.tmpdir()
.
Update changelog, bump version, and publish package.
Cache the SVGs created by MathJax.
Create a simple Atom package which prints Hello World to the console (e.g. when Atom is started, but it doesn't really matter when).
Add rendering of TikZ images to SVG (in the !tikz
outer environments provided by the FIT Template) using a local TeX distribution. Attempt to show the user the TeX log if/when it fails. Allow users to customize the LaTeX preamble used (similarly to how they can set custom MathJax macros). Cache the generated SVGs. Offer multiple modes of displaying SVGs to accommodate different UI themes.
Add an option to update HTML preview (and navigation) only on save (and on opening a new file) and not on type.
Add at least partial rendering support for select elements (cite, eqref, reference)
Add a renderer which creates an HTML document from a given WooWoo AST. Use styles based on the FIT template.
Add support for math rendering using MathJax 2.6 (it's much faster than the newer versions while supporting all the macros we need). Support for TikZ rendering can remain unimplemented for now.
Improve TikZ error reports by including the stack trace and making it clearer to the user that the error details can be shown by clicking on the summary.
Include inline math in document part names and try to at least in some imperfect way support metablocks after text blocks.
Add renderers, snippets and register variants for the .gather
outer environment and .small
, and .underline
inner environments, newly added to the updated FIT Template.
As per my request, action-setup-atom has added the options to select the exact version of Atom to use for testing. The feature has been added in version 2, which is now available. This allows us to add the minimum supported Atom version to the CI testing matrix. As long as Atom stays on the same major version (and these don't seem to change frequently, as Atom is still on v1.x), this should ensure everything works also on all minor versions inbetween the tested ones (assuming semantic versioning rules are followed properly).
Update the version of action-setup-atom used in our Github Actions setup and add the minimum supported Atom version (1.54) to the testing matrix.
Comments must begin at the start of a line
Examples:
% This is a valid comment
% This is not a valid comment
Some text of a paragraph... % This is also not a valid comment
Document parts must also begin at the start of a line (no indentation allowed)
Examples:
% This is a valid document part heading
.Chapter Name of Chapter 1
label: chap-1
% This is not a valid document part heading
.Chapter Name of Chapter 2
label: chap-2
Update changelog, bump version, and publish package.
Minimal reproducible example:
foo
"bar".1
1:
link: 'http://example.com/'
Steps to reproduce:
Update changelog, bump version, and publish package.
Add a simple script for production package creation. Ideally this script should be as much isolated from the source code as possible.
Add a CI job using this script to create a production package and upload it as job artifact.
Set up GitHub actions workflow job to check that source is properly formatted. This should be probably run only after build check passes.
Set up GitHub actions workflow job to check that source passes linting. This should be probably run only after build check passes.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.