Theia: Latex

Created on 24 Jul 2019  路  17Comments  路  Source: eclipse-theia/theia

Description

Reproduction Steps

OS and Theia version:

Diagnostics:

question vscode

Most helpful comment

The basic idea is to run Theia from sources,

Not necessary from sources, you can also build a final app and run it with plugins option pointing to a folder containing your vscode extensions. You can then wrap it in the docker image for reusability. See for example how vscode go extension is packaged in docker together with Theia: https://github.com/theia-ide/theia-apps/tree/master/theia-go-docker

All 17 comments

@maxcordivani can you provide more information?

I like LaTex. I try to compile a LaTex document in Theia.
Thanks for the info.

LaTex in Theia just doesn't work. There is a simple guide to implementing LaTex in Theia.

@maxcordivani what issues have you encountered when running LaTeX Workshop in Theia?

LaTeX Workshop ok, but as in the image LaTex or Tex does not appear in "Select Language Mode".

latex

@maxcordivani I ran the LaTeX Workshop extension in Theia and got the following results:

LaTeX Syntax Highlighting

Screen Shot 2019-07-25 at 6 08 19 PM

LaTeX Specific Commands

Screen Shot 2019-07-25 at 6 08 43 PM

LaTeX Language Detection

![image](https://user-images.githubusercontent.com/40359487/61912523-5a3c2100-af08-11e9-9baa-c40c82414103.png)

LaTeX View (Widget)

Screen Shot 2019-07-25 at 6 09 41 PM

Great. I can't add the LaTex extension to Theia. How can I do.

In order to use any VSCode extension in Theia you can follow the following guide https://github.com/theia-ide/theia/wiki/Testing-VS-Code-Extensions :)

The basic idea is to run Theia from sources, create a plugins folder under the main root and copy any VSCode extension under the folder as a .vsix file. You can download the .vsix file from the marketplace (https://marketplace.visualstudio.com/items?itemName=James-Yu.latex-workshop)

The basic idea is to run Theia from sources,

Not necessary from sources, you can also build a final app and run it with plugins option pointing to a folder containing your vscode extensions. You can then wrap it in the docker image for reusability. See for example how vscode go extension is packaged in docker together with Theia: https://github.com/theia-ide/theia-apps/tree/master/theia-go-docker

Thanks for the support. Very useful info.
LaTex works very well in Theia.

I would like to ask you a question:
in MacOs LaTeX works fine, but on Ubuntu I have a problem, LaTeX View (Widget) is empty. see image. where am I wrong?
Thanks again for the support.

Annotazione 2019-07

It sounds like a bug, could you file a new issue with steps to reproduce please.

ok i open a new case. I hope to be clear.

I encounter an issue where the enter key does not work inside the editor while using the Latex Workshop vscode extension. @vince-fugnitto, did you encounter that issue?

I am running theia from source through the browser example, v0.11.0, and the following error is printed, repeatedly. I loaded the plugin via the Deploy plugin by id command as described in the footnote here.

root ERROR [hosted-plugin: 11730] Promise rejection not handled in one second: Error: The command 'type' cannot be executed. There are no active handlers available for the command. (args: [{"source":"keyboard","text":"\n"}])
root ERROR [hosted-plugin: 11730] With stack trace: Error: The command 'type' cannot be executed. There are no active handlers available for the command. (args: [{"source":"keyboard","text":"\n"}])
    at CommandRegistry.<anonymous> (https://mydomainname.com/bundle.js:112917:31)
    at step (https://mydomainname.com/bundle.js:112693:23)
    at Object.next (https://mydomainname.com/bundle.js:112674:53)
    at fulfilled (https://mydomainname/bundle.js:112665:58)

Prior to that the following printed while loading the plugin:

root INFO unzipping the VS Code extension 'James_Yu_latex_workshop.vsix' to directory: /tmp/vscode-unpacked/James_Yu_latex_workshop.vsix
root INFO PluginTheiaDirectoryHandler: accepting plugin with path /tmp/vscode-unpacked/James_Yu_latex_workshop.vsix
root INFO Resolved "vscode:extension/James-Yu.latex-workshop" to a VS Code extension "[email protected]" with engines: { vscode: '^1.34.0' }
root INFO Deploying backend plugin "[email protected]" from "/tmp/vscode-unpacked/James_Yu_latex_workshop.vsix/extension/out/src/main.js"
root INFO [hosted-plugin: 11730] PLUGIN_HOST(11730) starting instance
root INFO [f1fc959e-b059-4c14-97a3-5e386b82060b] Sync of 1 plugin took: 58.330000028945506 ms
root WARN Error: 'cpp' language is remapped from 'source.cpp' to 'source.cpp.embedded.latex' scope
    at TextmateRegistry.push.../../packages/monaco/lib/browser/textmate/textmate-registry.js.TextmateRegistry.mapLanguageIdToTextmateGrammar (https://mydomainname.com/35.bundle.js:815:26)
    at https://mydomainname.com/89.bundle.js:8506:125
    at pushContribution (https://mydomainname.com/89.bundle.js:8381:32)
    at _loop_3 (https:/mydomainname.com/89.bundle.js:8506:21)
    at PluginContributionHandler.push.../../packages/plugin-ext/lib/main/browser/plugin-contribution-handler.js.PluginContributionHandler.handleContributions (https://mydomainname.com/89.bundle.js:8517:21)
    at _loop_2 (https://mydomainname.com/89.bundle.js:1797:63)
    at HostedPluginSupport.push.../../packages/plugin-ext/lib/hosted/browser/hosted-plugin.js.HostedPluginSupport.loadContributions (https://mydomainname.com/89.bundle.js:1818:17)
    at HostedPluginSupport.<anonymous> (https://mydomainname.com/89.bundle.js:1667:52)
    at step (https://mydomainname.com/89.bundle.js:1502:23)
    at Object.next (https://mydomainname.com/89.bundle.js:1483:53)
root WARN Could not register keybinding:
  {"command":"latex-workshop.shortcut.textsubscript","keybinding":"ctrl+l ctrl+oem_minus"}
Error: Unrecognized key 'oem_minus' in 'ctrl+oem_minus'
root INFO [f1fc959e-b059-4c14-97a3-5e386b82060b][james-yu.latex-workshop]: Loaded contributions.
root INFO [f1fc959e-b059-4c14-97a3-5e386b82060b] Load contributions of 1 plugin took: 228.7550000473857 ms
root WARN Invalid embedded language found at scope source.asymptote: <<0>>
root WARN Invalid embedded language found at scope source.dot: <<0>>
root WARN Invalid embedded language found at scope source.gnuplot: <<0>>
root WARN Invalid embedded language found at scope source.js: <<0>>
root WARN Invalid embedded language found at scope source.scala: <<0>>
root WARN Invalid embedded language found at scope text.xtml: <<0>>
root WARN Invalid embedded language found at scope source.yaml: <<0>>
root INFO [hosted-plugin: 11730] PLUGIN_HOST(11730): PluginManagerExtImpl/init()
root INFO [hosted-plugin: 11730] PLUGIN_HOST(11730): initializing([email protected] with /home/project/theia/packages/plugin-ext-vscode/lib/node/plugin-vscode-init.js)
root INFO [hosted-plugin: 11730] PLUGIN_HOST(11730): PluginManagerExtImpl/loadPlugin(/tmp/vscode-unpacked/James_Yu_latex_workshop.vsix/extension/out/src/main.js)
root INFO [f1fc959e-b059-4c14-97a3-5e386b82060b][james-yu.latex-workshop]: Started plugin.
root INFO [f1fc959e-b059-4c14-97a3-5e386b82060b] Start of 1 plugin took: 1010.939999949187 ms

@dannaf please open a new issue marked as a bug

Was this page helpful?
0 / 5 - 0 ratings