Open hadi-f90 opened 4 years ago
Do you have docutils
Python package installed? Can you run ReText with python.exe
instead of pythonw.exe
and check if anything is printed to the terminal?
Do you have “Edit → Use WebEngine (Chromium) renderer” enabled?
Thanks, I gave all your possible solutions a try. Here is the result:
[ ] Yes, docutils is already installed.
[ ] I, also, tried checking and unchecking "Use WebEngine renderer" option and still got a blank screen. By the way, I don't have any chromium like browsers installed. I will try to install it and try again.
[ ] I tried to run Retext by python.exe itself through site-package folder, but the files -that on my thought could be the probable main Retext files- all returned error by running through cmd.
[ ] As another option, I tried installing markdown (the library you developed for Retext). But it didn't work either.
( Here's the errors in case they might be useful to you).
PS1: I found Retext.exe in \Python38\Scripts. which is responsible for running Retext. PS2: The exported pdf is blank, too.
By the way, I don't have any chromium like browsers installed.
If you have PyQt packages from PyPI installed, then you also have Qt WebEngine which is based on Chromium. No need to install anything else.
I tried to run Retext by python.exe itself through site-package folder, but the files -that on my thought could be the probable main Retext files- all returned error by running through cmd.
Sorry, I did not tell you how to run it with python.exe. Can you try just python -m ReText
? My hypothesis is that the renderer process crashes for some reason, and this should show the traceback.
Can you please also check if “Edit → View HTML code” shows anything meaningful?
I tried to run Retext by running python -m Retext and it didn't work. Although I had python 3.8 installed, it returned an error with this message: \Python38\python.exe: No module named retext hence, the html output was ok. I copied the html into a file and opened using Edge and it was functioning.
Alternatively, I cloned the repository to my desktop and ran python retext.py from the clone root directory in cmd. Here's the result: By the way, I couldn't find out why icons were absent. As you can see, the preview pan is almost functioning. By the way, along with some syntactical errors, my source .rst file includes some lines the only Sphinx is capable of intepretting e.g. table of content. I couldn't find any .rst editor. Anyway, here's the resulting cmd output:
PS: Retext is the only .rst editor that supports right to left languages like Persian very well well. For now it works for me. Thanks for taking time.
I tried to run Retext by running
python -m Retext
and it didn't work.
I think case is significant here. It should be ReText
, not Retext
.
Alternatively, I cloned the repository to my desktop and ran
python retext.py
from the clone root directory in cmd. Here's the result: By the way, I couldn't find out why icons were absent.
Please download the icons ZIP and unpack all icons from there to the icons
directory inside the cloned repository.
Or simply run python setup.py sdist
, it should do the same.
By the way, along with some syntactical errors, my source .rst file includes some lines the only Sphinx is capable of intepretting e.g. table of content.
Yes, unfortunately ReText uses pure reStructuredText, and does not support Sphinx constructions.
I couldn't find any .rst editor.
The only reStructuredText editor that supports Sphinx (and that I know) is livesphinx, but it works in a browser and I have never used it. Maybe I can steal some ideas from there, though.
Retext is the only .rst editor that supports right to left languages like Persian very well well.
I am surprised to hear that because I never did anything to support RTL languages specifically :) Anyway, glad to hear that. I guess some things may be improved, like line numbers can be on right side… Maybe also the editor pane should be on right.
Are there any remaining issues with the installation, or I can close this?
Sorry for my delay. For the being time, I gave it a try in Win 10 and here is the result:
The Soft wrapping, now, wraps the text pretty well, while it might need some work to have a better human friendly look (As you will see in the pictures below, the text should flush to the right-most part of the widget and the empty space created by wrap text should go to the left. I don't know if it is a Qt widget problem of not. If you managed to do this the Text Statics would look better if they go to the left side for RTL languages).
Now, the Rendering Engines work well without any error. The preview pan itself and the pictures load and show up well using both of the rendering engines.
I think both Cursor line and Wrapped Line mode now work fine, too.
Cursor Line mode
Wrapped Line
Regarding the formatting Buttons, I found that, as you said, the buttons are disabled, whereas; the Edit ->Formatting section menu is enabled and works fine. As far as I remember, these Button were all enabled in Linux Mint 20, but it is faint since it was long time ago and I don't remember whether the document I was working with in Linux was .rst or .md. Anyway, I'll let you know as soon as I tested in Linux. I don't know whether I should report it in a new issue or I should follow it here, if it was.
Finally, I couldn't locate the language change section to see how the translation would look like. and I got a pychant dictionary error:
RuntimeWarning: Dictionary for language 'Persian_Iran' could not be found Please check https://pyenchant.github.io/pyenchant/ for details.
- The Soft wrapping, now, wraps the text pretty well, while it might need some work to have a better human friendly look (As you will see in the pictures below, the text should flush to the right-most part of the widget and the empty space created by wrap text should go to the left. I don't know if it is a Qt widget problem of not. If you managed to do this the Text Statics would look better if they go to the left side for RTL languages).
Yes, unfortunately it's a Qt problem. I will try to create a minimal example and submit a bug upstream. I will keep you updated on this.
- Regarding the formatting Buttons, I found that, as you said, the buttons are disabled, whereas; the Edit ->Formatting section menu is enabled and works fine.
Right, I think it's the expected behavior. If you need quick access to the actions available in the Formatting menu, you can use shortcuts like Ctrl+B, etc.
- Finally, I couldn't locate the language change section to see how the translation would look like.
I will pull the translations from Transifex before making a new release, which will be soon (before end of January, I think).
Until that you can try to download a .ts
file from Transifex, put it as locale/retext_fa.ts
, then run lrelease locale/retext_fa.ts
to generate a locale/retext_fa.qm
from it. (lrelease is available as part of Qt tools).
and I got a pychant dictionary error: RuntimeWarning: Dictionary for language 'Persian_Iran' could not be found
It is only related to spell checking. Try using fa_IR
instead of Persian_Iran
, maybe that will work?
I will try to create a minimal example and submit a bug upstream. I will keep you updated on this.
Upstream bug created: https://bugreports.qt.io/browse/QTBUG-91125. Sorry for the delay again — I have too little time and too many issues to work on :(
I installed Retext on python 3.8 installed win 10 PC and tried to open an .rst file. While the source would load flawlessly, live preview and preview of the .rst file shows a white blank page without anything.