Giter Site home page Giter Site logo

stexls's People

Contributors

jfschaefer avatar kohlhase avatar mari6814 avatar marianfau avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

trellixvulnteam

stexls's Issues

(old?) antlr dependency.

In my python environment and now stexls cannot find antlr4.
@jfschaefer helped me work around this bug by downgrading antlr (I think).
But now something has updated, and now I have the same problem again. The dependency in the python code should probably be updated.

file erraneously "not found"

In .../MathHub/MiKoMH/AI/source/search/en/blackwhitebox.tex, I get
Screenshot 2020-12-21 at 13 22 14
but the file exists. I have no idea what is happening. In particular, the LaTeX version finds the file.

stexls and python 3.9

I am on python 3.9 and (finally) wanted to use the trefier. But I get

upgrade-w-trefier 
Processing /Users/kohlhase/vc/git/github.com/sLaTeX/stexls
Requirement already satisfied: antlr4-python3-runtime>=4.8 in /usr/local/lib/python3.9/site-packages (from stexls==4.4.2) (4.8)
Requirement already satisfied: tqdm in /usr/local/lib/python3.9/site-packages (from stexls==4.4.2) (4.54.0)
Requirement already satisfied: numpy in /usr/local/lib/python3.9/site-packages (from stexls==4.4.2) (1.19.4)
Collecting scikit-learn

  Downloading scikit_learn-0.24.1-cp39-cp39-macosx_10_13_x86_64.whl (7.3 MB)
     |████████████████████████████████| 7.3 MB 5.9 MB/s 
Collecting nltk
  Using cached nltk-3.5.zip (1.4 MB)
ERROR: Could not find a version that satisfies the requirement tensorflow (from stexls[ml])
ERROR: No matching distribution found for tensorflow

It seems that tensorflow is not available for python 3.9.
So I probably have to downgrade to python 3.8.

tell stexls to ignore individual files?

It would be good if I could tell stexls to ignore certain files (i.e. not report errors there).
I am imgagining a file .stexlsignore, which has a set of regexps, and all files that match these are not considered when stexls reports problems.
I know that I can systematically exclude things at the vscode level, but that is not what I want.

do not report error "symbol undefined" when the module is not loaded.

When I am missing an \importmhmodule{foo}, then on an instance of \trefi[foo]{bar}, stexls reports (something like)

  1. symbol foo?bar of type \drefi... missing
  2. makes lots of suggestions
  3. and only in the end reports symbol bar of type module is missing.

I often spend time reading and understanding the symbol stuff before I find the (only) relevant part at the end.
It would be good if in the presence of 3., 1. and 2. could be left out. And while we are at it, it would be better to rephrase the error message from a user's point of view: something like

\trefi[foo]{bar} invalid, since module "bar" is not imported here 
Add an appropriate "\importmhmodule", "\gimport", "\usemhmodule", or "\guse" somewhere. 

support MANIFEST.MF

We are making progress on sTeX and it becomes more compatible with the MMT Math Archives infrastructure.
As a consequence, sTeX takes the META-INF/MANIFEST.MF more seriously. A typical file is

id: MiKoMH/IWGS
source-base: http://mathhub.info/MiKoMH/IWGS
narration-base: http://mathhub.info/MiKoMH/IWGS
dependencies: MiKoMH/GenCS MiKoMH/TDM MiKoMH/GenICT MiKoMH/SecDep
description:desc.html
title: Course Notes for the course "Informatische Werkzeuge in den Geistes- und Sozialwissenschaften" at FAU
teaser: A basic course on CS Tools in Digital Humanities (in English and German)
responsible: [email protected]

Currently we only take the id key into account, it should be consistent with the file path:
There is an environment variable MATHHUB and the repository/archive path should be $(MATHHUB)/<id>, where <id> is the value of the id key in MANIFEST.MF
Another important key is the dependencies key which contains a whitespace-separated list of archive ids. This should contain all the other archives used in this archive (yes, the induced dependency graph may be cyclic). For instance mmt lmh install uses the dependencies to install an archive with all of its dependencies (very useful for beginning users). The problem is that the dependencies can change when new \importmhmodule or \mhinputref (or so) are added. So the IDE should keep the dependencies up to date. As stexls already maintains the theory graph, and the theory URIs, computing a list of dependencies should be relatively easy.
More MANIFEST.MH functionality may come in the future.

install no longer works

after I uninstall stexls and it tries to install, I get

ModuleNotFoundError: No module named 'packaging'

all \symdefs must be mentioned in for attribute in \begin{definition}

For each

\symdef[name=<name>,...]{<cs>}[<num>]{<latex>}

there should be exactly one corresponding

\begin{definition}[...,for={...,<name?cs>,...},...]

(in smglom in the corresponding mhmodnl, else in the same file), unless there is an attribute nodef in the first optional argument of the \symdef.

spurious error reported?

In MathHub/MiKoMH/IWGS/source/vci/snip/gitlabhub-intro.tex I get a couple of error messages.
Screenshot 2021-05-21 at 14 15 56
They are incorrect, git?remote-repository is defined in MathHub/MiKoMH/TDM/source/vc/en/git.tex.

nested modules

sTeX allows nested modules, and these are not handled by stexls correctly. An example is MiKoMH/AI/source/ml/en/EBL.tex, which has the nested module dfalgex, which is not found ...

Screenshot 2020-12-24 at 12 05 40

The visibility rules for nested modules are the obvious ones, they have access to all the macros and defis of the surrounding module and their own. The surrounding module has no access to the macros and defis of the nested module (unless imported).

\vassign allows an expression as the second argument

Currently \vassign is treated like \tassign, and that is incorrect. In \tassign{a}{b}, both a and b are symbol names; from the source and the target theory.
In \vassign{a}{e} is a mathematical object (from the target theory), so e should not be checked (it can essentially be anything), or at least be checked as $e$ would be.

This is also one of the top-error-producing bugs.

linter error

I seem to get the following error from time to time, and then the linter seems to stop prematurely

>>> python3 -m stexls lsp --transport-kind ipc --num_jobs 1 --update_delay_seconds 1 --logfile /tmp/stexls.log --lint_workspace_on_startup --enable_trefier --loglevel error
/usr/local/Cellar/[email protected]/3.9.4/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/events.py:73: RuntimeWarning: coroutine 'Server._update_files_and_clear_timeout' was never awaited
  self._args = None
RuntimeWarning: Enable tracemalloc to get the object allocation traceback

mhstructure also allows \vassign and \tassign

in this way mhstructure is exactly like the existing gstructure. And - like gstructure it should also import
the symbols into the current theory.
It occurs e.g. in .../MathHub/KwarcMH/SiSsI/source/winograd/cds/average-prognosis.tex. This should be very easy to fix by analogy.

Screenshot 2021-06-16 at 16 22 51

shows the problem.

spurious report of redundant import

In .../MathHub/MiKoProblems/GenCS/source/dmath/en/function-props3.tex I get a spurious report.
Screenshot 2021-06-24 at 07 32 08
for all that I can tell, this is caused by

\usemhmodule[mhrepos=MiKoMH/GenCS,dir=dmath/en]{function-properties}

which loads .../MathHub/MiKoMH/GenCS/source/dmath/en/functions.tex, which in turn has a

\begin{nexample}[for=domain-codomain-remark,id=different-domains-different]
  \guse[smglom/arithmetics]{realarith}
...
\end{nexample}

But a \guse is not re-exported, and should not make the \guse[smglom/arithmetics]{integernumbers} redundant.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.