Latex-workshop: Proposal - BIDI language support

Created on 28 Jul 2017  路  7Comments  路  Source: James-Yu/LaTeX-Workshop

RTL and bi directional (BIDI) language support

The LaTeX-Workshop helps many people to enjoy their TeX document preparation in a modern editor like VSCode. This is a big step forward.

The LaTeX-Workshop is a great tool. I think it needs to be improved. One feature requested is its support for right to left language or RTL and bidirectional texts.
There are a crowd of TeX users need right to left language (RTL) in their daily document preparation. These languages are Persian/Farsi, Hebrew, Arabic,..

I wish to know if possible LaTeX Workshop can support this feature.

enhancement

Most helpful comment

I think there is no blocking problem in using VSCode and this extension for writing RTL documents. Although the VSCode editor is not optimal for writing RTL documents, and has shortcomings such as the mentioned bug, but it can be used without much problem.

Persian LaTeX documents mostly use xepersian CTAN package, which require xelatex that is not the default in LaTeX-Workshop. Simply by adding the following settings, I am able to typeset RTL document like the attached image. So I think this issue can be closed unless a specific problem regarding RTL support is reported. Thanks for your great extension.

    "latex-workshop.latex.tools": [
        {
            "name": "latexmk",
            "command": "latexmk",
            "args": [
                "-xelatex",
                "-interaction=nonstopmode",
                "-file-line-error",
                "%DOC%.tex"
            ]
        }
    ],

screenshot_20180417_213641

All 7 comments

Can you please elaborate more on the topic? What should be achieved but is not working now? AFAIK, text processing under the hood is handled by either VSCode or LaTeX compiler.

James,
Please see this page for a complete description

https://github.com/Microsoft/monaco-editor/issues/280

I have briefly checked the issue. IMO we need to wait for vscode/monaco support before adding additional supports to the extension.
I will leave this issue open for now and see how microsoft/community is handling the other issue.

I think there is no blocking problem in using VSCode and this extension for writing RTL documents. Although the VSCode editor is not optimal for writing RTL documents, and has shortcomings such as the mentioned bug, but it can be used without much problem.

Persian LaTeX documents mostly use xepersian CTAN package, which require xelatex that is not the default in LaTeX-Workshop. Simply by adding the following settings, I am able to typeset RTL document like the attached image. So I think this issue can be closed unless a specific problem regarding RTL support is reported. Thanks for your great extension.

    "latex-workshop.latex.tools": [
        {
            "name": "latexmk",
            "command": "latexmk",
            "args": [
                "-xelatex",
                "-interaction=nonstopmode",
                "-file-line-error",
                "%DOC%.tex"
            ]
        }
    ],

screenshot_20180417_213641

The problem is with editor to support RTL writing not with the latex output. VSCode supports unicode, so you can type Persian or other RTL language but it is not an easy task.

The editor supports RTL writing, although it has a few bugs in rendering the text. Anyway I just wanted to clarify the issue and point out that there is no problem with this specific extension. You should wait for the mentioned issue in the monaco-editor to resolve, and meanwhile you can use VSCode even for RTL text like many users do - tolerating the inconveniences.

I'm closing this issue for cleanness. Also this relies on the editor to provide RTL support.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

drdebmath picture drdebmath  路  4Comments

BjoernDaase picture BjoernDaase  路  3Comments

wstcegg picture wstcegg  路  5Comments

iainmstott picture iainmstott  路  5Comments

domenicozambella picture domenicozambella  路  4Comments