cvfosammmm / setzer Goto Github PK
View Code? Open in Web Editor NEWLaTeX editor written in Python with Gtk
Home Page: https://www.cvfosammmm.org/setzer/
License: Other
LaTeX editor written in Python with Gtk
Home Page: https://www.cvfosammmm.org/setzer/
License: Other
There could be a way to name lists of files as "projects" and load them all at once (including master state).
Two bugs I noticed when running the "About" dialog:
Looking a little bit into the code, there should be files in the resources directory with the name beamerpreview_[...].png
, but they are not in the git repo.
The symbols are blurry at the moment with HiDPI screens.
There should be a way to get help with LaTeX from within the app.
..to support code folding.
With the version downloaded on flathub, on manjaro running Deepin DE, I cannot open my files. When I click on the 'open' button, nothing happens.
So I launched Setzer in the terminal to see what was going wrong and encountered that python error message when I clicked on the 'open' bytton :
Traceback (most recent call last):
File "/app/bin/workspace/workspace_controller.py", line 129, in on_open_document_button_click
filename = ServiceLocator.get_dialog('open_document').run()
File "/app/bin/dialogs/open_document/open_document.py", line 35, in run
self.setup()
File "/app/bin/dialogs/open_document/open_document.py", line 49, in setup
for widget in self.view.get_header_bar().get_children():
AttributeError: 'NoneType' object has no attribute 'get_children'
I'm not sure how to fix that, so maybe, if someone more qualified than me could dig into it, that could be great.
Have a nice day.
(Ps: I've uninstalled Setzer wanting to reinstall it, but I am on a limited internet connection and won't be able to do so right now. So I will unfortunately not be able to provide any further piece of information right now, sorry about that).
There is no accessible way to change build options that I can find, and I really need to escape shell in order to use minted. Any plan to make it more visible?
These two functions won't work with latex interpreters PdfLateX, XeLateX & LualateX:
\ref{}
\autoref{} from \usepackage{hyperref}
with Latexmk these same functions will only work if we add \usepackage{natbib}, which actually is not designed for these functions in the first place but for for customising bibliographic citations (especially author-year citation schemes) when using BibTeX. So weird!
Thanks for your help!
JB
I find myself wanting to see what is included between brackets. It'd be helpful to see the opening (or closing) matching bracket when the cursor is on a curly bracket.
It will be easier to install Setzer for many users.
This requires a good parser, because I don't want to write one myself (for now). Suggestions are welcome.
Thanks for the great work.
Main issue for me:
Not all the options described in the following link are not working:
https://texblog.org/2017/12/05/the-path-to-your-figures/
https://www.overleaf.com/learn/latex/Inserting_Images
Calling relative sibling folder won't work too, e.g.,
\includegraphics[scale=0.25]{../images/figure.jpg}
path with spaces in folder names won't work either, e.g.,
\includegraphics[scale=0.25]{"/home/user/document/images 1/figure"}
\includegraphics[scale=0.25]{ {"/home/user/document/images 1/figure.jpg"} }
Thx for your help
best
JB
Setzer could support more customization like showing / hiding line numbers, tab width, and others.
When a master document is set, the build log shows items unrelated to the currently edited document. That should be clear. Also when clicking on line numbers the document they are in should be switched to and scrolled, if it is opened.
The scheme could be simplified and use less colors to reduce noise. Also it could use the new Gnome color scheme.
Check the time stamp of the file being edited on app start. If it hasn't changed since it was last edited with Setzer, restore code folding.
I have a small feature suggestion: I often type ctrl-s and f6 in a row and it would be cool if Setzer would automatically build the PDF once the document is saved.
Apart from that, Setzer is really great and well designed! Thanks for your work
I was wondering whether Setzer already supports synctex? (I though maybe it does since I see -synctex=1in the commands.) I'm used to ctrl-click (in the source file or pdf file) to go to the corresponding position in the pdf or source file.
Are you intereseted in language support? It's natively supported in meson and python, so the only thing to do is converting all translatable python strings.
The gettext function to translate is _()
, so if it would be msg = 'hello'
before, it would be msg = _('hello')
after.
If you want I can open a PR.
I can't compile any more and Setzer complains like this:
Exception ignored in: <function _TemporaryFileCloser.__del__ at 0x7fa953339320>
Traceback (most recent call last):
File "/usr/lib/python3.7/tempfile.py", line 448, in __del__
self.close()
File "/usr/lib/python3.7/tempfile.py", line 444, in close
unlink(self.name)
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmplyo6cwen/tmp0qgwyfdt.tex'
Traceback (most recent call last):
File "/app/bin/document/build_system/build_system.py", line 53, in change_code_loop
observer.change_notification(change_code['change_code'], self, change_code['parameter'])
File "/app/bin/document/document_builder.py", line 61, in change_notification
self.document.view.build_widget.reset_timer()
AttributeError: 'DocumentView' object has no attribute 'build_widget'
Exception ignored in: <function _TemporaryFileCloser.__del__ at 0x7fa953339320>
Traceback (most recent call last):
File "/usr/lib/python3.7/tempfile.py", line 448, in __del__
self.close()
File "/usr/lib/python3.7/tempfile.py", line 444, in close
unlink(self.name)
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpwt2f5id3/tmpegdc1sxr.tex'
Unfortunately, I couldn't obtain any more logging information.
It looks like attribute access is assuming too much, i.e. the existence of "build_widget".
This can be done easily by removing the special casing for "gtk-shell-shows-app-menu".
I installed Setzer 0.2.3 under Arch Linux from the AUR. When I click on the button "Document Wizard" nothing happens, I don't get the windows like it is shown here. When started from the command line Setzer gives some output every time the button is pushed.
$ setzer
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/setzer/dialogs/document_wizard/pages/page_beamer_settings.py", line 95, in load_presets
row = self.view.themes_list_rows[presets['beamer']['theme']]
TypeError: 'NoneType' object is not subscriptable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/setzer/workspace/workspace_controller.py", line 111, in new_function
return original_function(self, *args, **kwargs)
File "/usr/lib/python3.8/site-packages/setzer/workspace/workspace_controller.py", line 334, in start_wizard
DialogLocator.get_dialog('document_wizard').run(document)
File "/usr/lib/python3.8/site-packages/setzer/dialogs/document_wizard/document_wizard.py", line 74, in run
self.load_presets()
File "/usr/lib/python3.8/site-packages/setzer/dialogs/document_wizard/document_wizard.py", line 156, in load_presets
page.load_presets(self.presets)
File "/usr/lib/python3.8/site-packages/setzer/dialogs/document_wizard/pages/page_beamer_settings.py", line 97, in load_presets
row = self.view.themes_list_rows[self.current_values['beamer']['theme']]
KeyError: 'Default'
Crashes with error:
File "[...]/document/preview/preview.py", line 25, in <module>
import document.preview.preview_viewgtk as preview_view
ModuleNotFoundError: No module named 'document.preview.preview_viewgtk'
Looks to me that 862da93 added this, but the files document/preview/preview_viewgtk.py
and document/preview/preview_presenter
are not present in the git repo.
First of all, this has the potential to be the best LaTeX editor out there. Well done on producing such an excellent piece of software.
Secondly, do you have a liberapay or Patreon in which I can throw a couple dollars at to support it?
And lastly, would there be any way in which you can define a master document akin to the manner in which texmaker and texstudio do?
Thanks,
Keiron
It seems to just not build, but it does not throw the FileNotFound exception. So latexmk seems to be installed.
I use multi-document setups on a daily basis, and thus every project I work on has a master document (with the use of '\input'). For every folder/project I open I have to redo this step each and every time.
Can this be set persistant somehow? My Python isn't super, but I'll check if I can do anything to help
Installed using flatpak
from Flathub, the latest version is installed. The problem persists after a reinstall. Errors:
[jvnknvlgl@thinkpad-p51 ~]$ flatpak run org.cvfosammmm.Setzer -v
Traceback (most recent call last):
File "/app/bin/setzer", line 28, in
from workspace.workspace import Workspace
File "/app/bin/workspace/workspace.py", line 22, in
from document.document import Document, LaTeXDocument, BibTeXDocument
File "/app/bin/document/document.py", line 26, in
import document.document_builder as document_builder
File "/app/bin/document/document_builder.py", line 18, in
import document.build_system.build_system as build_system
File "/app/bin/document/build_system/build_system.py", line 30, in
from app.service_locator import ServiceLocator
File "/app/bin/app/service_locator.py", line 20, in
import app.settings as settingscontroller
File "/app/bin/app/settings.py", line 20, in
gi.require_version('Gspell', '1')
File "/usr/lib/python3.7/site-packages/gi/init.py", line 129, in require_version
raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Gspell not available
One should be able to move around the document either by just holding the left mouse button, or with some additional shortcuts such as CTRL. (or activate it with middle mouse button)
The editor/preview combo in Setzer is a great asset, but there's one thing I wish it had: clickable links. Can this be implemented, or is it not on the roadmap? This would make working with large documents easier I think.
BibTeX has mostly been replaced with Biber and is the main backend for BibLaTeX, not supporting it means not supporting the most common bibliography tools for recent documents. It might also be considered as a part of #5, since having no control over which commands/engines are used makes it impossible to manually bypass such problems. (also Latexmk for example does also support LuaLaTeX, but only when used with the -pdflatex
parameter, which is impossible to setup in the settings.)
*Biber/BibLaTeX will need quite a few dependencies to work well with different styles etc, does the Flatpak version has actually access to a local Tex distribution? If not, I would assume that would bring a lot of issues unless the whole Tex Live can be provided, but that probably deserves its own bug report.
As the title says, it shouldnt be too hard, and would help everyone feel more at home with Setzer. But it is also a practical concern, the syntax theme needs to adapt to the gtk theme one uses, the current choice is nice for light themes for instance, but not so much for darker ones.
When running from git tree on CentOS 8 (python 3.6), Setzer cannot start and dies with the following error message:
$ python3 __main__.py
Traceback (most recent call last):
File "__main__.py", line 28, in <module>
from workspace.workspace import Workspace
File "/localhome/sero/git/Setzer/workspace/workspace.py", line 22, in <module>
from document.document import Document, LaTeXDocument, BibTeXDocument
File "/localhome/sero/git/Setzer/document/document.py", line 26, in <module>
import document.document_builder as document_builder
File "/localhome/sero/git/Setzer/document/document_builder.py", line 18, in <module>
import document.build_system.build_system as build_system
File "/localhome/sero/git/Setzer/document/build_system/build_system.py", line 30, in <module>
from app.service_locator import ServiceLocator
File "/localhome/sero/git/Setzer/app/service_locator.py", line 26, in <module>
import dialogs.close_confirmation.close_confirmation as close_confirmation_dialog
File "/localhome/sero/git/Setzer/dialogs/close_confirmation/close_confirmation.py", line 24, in <module>
import app.service_locator as service_locator
AttributeError: module 'app' has no attribute 'service_locator'
The error goes away if I resolve circular (cyclic) imports:
diff --git a/dialogs/close_confirmation/close_confirmation.py b/dialogs/close_confirmation/close_confirmation.py
index 09ee79b..8ca577a 100644
--- a/dialogs/close_confirmation/close_confirmation.py
+++ b/dialogs/close_confirmation/close_confirmation.py
@@ -21,7 +21,7 @@ gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
from dialogs.dialog import Dialog
-import app.service_locator as service_locator
+import app
import os.path
@@ -57,7 +57,7 @@ class CloseConfirmationDialog(Dialog):
self.workspace.set_active_document(document)
return_to_active_document = True
- if not service_locator.ServiceLocator.get_dialog('save_document').run(document):
+ if not app.service_locator.ServiceLocator.get_dialog('save_document').run(document):
documents_not_save_to_close.append(document)
else:
document.save_to_disk()
For reference, here is a spec file I wrote, when packaging Setzer as an RPM for CentOS 8. With the fix above, it installs and runs without a hitch.
Hi,
I don't know how to create a mock-up but the idea is simple:
Step 1 - concentrate all the buttons on the gnome bar,
Step 2 - split their location between three panels as specified by Tobias Bernard @ GUADEC 2019: https://youtu.be/olTQnKUSTso?t=1476 ๐
Step 3 - use gnome library libhandy to allow adaptive design for mobile integration
Cheers
JB
There's a nice chapter about the state pattern in the book "Game Programming Patterns", available online: http://gameprogrammingpatterns.com/state.html
This could be used to significantly clean up the autocomplete system.
I'm sometimes working on latex files in (shared) dropbox folders. It would be very nice if one could set the option to not generate any build files in the current working folder but instead use a tmp file directory.
Currently the PDF Viewer stays on the left side when not fit-to-width, which is kinda weird, it should either be centered, or aligned to right to provide more room for the editor.
When the program is running, the process is unnamed and no icon appears on the taskbar/dock.
Solved adding the application ID in __main__.py
:
def __init__(self):
Gtk.Application.__init__(self, application_id="org.cvfosammmm.Setzer")
I started with the Debian package (based on v0.2.2), and lintian gave me a couple of warnings (or information, whatever):
W: setzer: binary-without-manpage usr/bin/setzer
I: setzer: desktop-entry-lacks-keywords-entry usr/share/applications/org.cvfosammmm.Setzer.desktop
I: setzer source: testsuite-autopkgtest-missing
X: setzer source: debian-watch-does-not-check-gpg-signature
P: setzer: image-file-in-usr-lib ... use --no-tag-display-limit to see all (or pipe to a file/program)
X: setzer source: upstream-metadata-file-is-missing
Not all are important, so let me comment on them:
binary-without-manpage
is not relevant if the program has no clidesktop-entry-lacks-keywords-entry
can be easily fixed, more heretestsuite-autopkgtest-missing
just ignore it, if you would add a test to check weather the program works fine or not, it could be included here, but it's not necessarydebian-watch-does-not-check-gpg-signature
if you want you could sign every release and release the signature, however this isn't necessaryimage-file-in-usr-lib
will be fixed with #45upstream-metadata-file-is-missing
just ignore it, I will do it eventuallyOverall, the lintian output is pretty clean (excluding image-file-in-usr-lib
). You can find the packaging repo here in case you want to have a look.
I would leave this open for desktop-entry-lacks-keywords-entry
.
Supporting a spellcheck engine would be really useful when writing in the editor, even if it doesn't recognize commands. If it is added, having it off by default would be good to prevent distractions
There was some discussion about this at https://gitlab.gnome.org/cvfosammmm/setzer/issues/2 .
It should continue here on GitHub, so all things Setzer are in the same place.
Could you list Setzer on https://lgtm.com/ for automated code review and security analysis? As I see it, this would have two major benefits. End users as well as distribution maintainers will be able to quickly assess the code quality in form of an automated code quality batch (ideally rated A+) displayed on GitHub, and secondly, you may prevent bugs from appearing in your project by already catching them in the review process.
The wizard button could be more prominent when the current document is new / empty.
the 3 functions bellow used to mention and populate author references in an article don't work with latex interpreters PdfLateX, XeLateX & LuaLateX. They only work with latex interpreter Latexmk, but only for small non complex latex texts. For Latexmk, increasing size and number of functions in the text will increase likelihood that Setzer will keep trying to build the pdf file literally forever, without any succes.
\cite{authorreferencefromdummybibtextfile}
\bibliographystyle(apalike)
\bibliography(dummybibtextfile)
You can't click on hyperlinks when using packages like hyperref
, this shouldn't be the case.
I work on a document with other people through git. And when I pull, I expect the editor to show the new file. Currently it does not detect the change in the file and there seems to be no way to have it reload the file.
Currently anything beyond the first line will not be indented.
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.