From a08770c0c401cd76d6305ba52207fc148cac693f Mon Sep 17 00:00:00 2001 From: Jan Winkler Date: Sun, 19 Nov 2023 14:03:47 +0100 Subject: [PATCH 1/8] GUI adjustments for typst --- textext/asktext.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/textext/asktext.py b/textext/asktext.py index 2c41793..c6bbd8e 100644 --- a/textext/asktext.py +++ b/textext/asktext.py @@ -298,7 +298,7 @@ def ask(self, callback, preview_callback=None): self._tex_command_tk_str = Tk.StringVar() self._tex_command_tk_str.set(self.current_texcmd) box = Tk.Frame(box2, relief="groove", borderwidth=2) - label = Tk.Label(box, text="TeX command:") + label = Tk.Label(box, text="Command:") label.pack(pady=2, padx=5, anchor="w") for tex_command in self.TEX_COMMANDS: Tk.Radiobutton(box, text=tex_command, variable=self._tex_command_tk_str, @@ -963,7 +963,7 @@ def create_buttons(self): button_box.add(self._cancel_button) self._preview_button = Gtk.Button(label="Preview") - self._preview_button.set_tooltip_text("Show/ update preview (CTRL+P)") + self._preview_button.set_tooltip_text("LaTeX only: Show/ update preview (CTRL+P)") button_box.add(self._preview_button) self._ok_button = Gtk.Button(stock=Gtk.STOCK_SAVE) @@ -1034,7 +1034,7 @@ def create_window(self): # --- Tex command --- texcmd_frame = Gtk.Frame() - texcmd_frame.set_label("TeX command") + texcmd_frame.set_label("Command") texcmd_box = Gtk.HBox(homogeneous=False, spacing=0) texcmd_frame.add(texcmd_box) texcmd_box.set_border_width(3) @@ -1049,7 +1049,7 @@ def create_window(self): self._texcmd_cbox.add_attribute(renderer_text, "text", 0) self._texcmd_cbox.set_active(self.TEX_COMMANDS.index(self.current_texcmd)) - self._texcmd_cbox.set_tooltip_text("TeX command used for compiling.") + self._texcmd_cbox.set_tooltip_text("Command used for compiling.") texcmd_box.pack_start(self._texcmd_cbox, True, True, 5) # --- Scaling --- From a66a648b6757f649d61b4f83bcbdf0bbbfe32eb6 Mon Sep 17 00:00:00 2001 From: Jan Winkler Date: Mon, 20 Nov 2023 14:46:56 +0100 Subject: [PATCH 2/8] Update README.rst --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index b804d35..2d2fcc8 100644 --- a/README.rst +++ b/README.rst @@ -1,7 +1,7 @@ |status-ci| |status-downloads| -TexText - A TeX extension for Inkscape -====================================== +TexText - A TeX / typst extension for Inkscape +============================================== TexText is a Python plugin for the vector graphics editor `Inkscape `__ providing the possibility to add From e6ae2c17f8e8fd77953cbfff1614e955b3d985d1 Mon Sep 17 00:00:00 2001 From: user202729 <25191436+user202729@users.noreply.github.com> Date: Sat, 3 Feb 2024 18:56:42 +0700 Subject: [PATCH 3/8] Fix a typo in the docstring --- textext/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/textext/base.py b/textext/base.py index 5f71776..3eef7ff 100644 --- a/textext/base.py +++ b/textext/base.py @@ -643,7 +643,7 @@ def stroke_to_path(self): pass def pdf_to_png(self, white_bg): - """Convert the PDF file to a SVG file""" + """Convert the PDF file to a PNG file""" kwargs = dict() kwargs["export_filename"] = self.tmp('png') kwargs["pdf_poppler"] = True @@ -696,7 +696,7 @@ class TexTextElement(inkex.Group): def __init__(self, svg_filename, document_unit): """ :param svg_filename: The name of the file containing the svg-snippet - :param document_unit: String specifyling the unit of the document into which the node is going + :param document_unit: String specifying the unit of the document into which the node is going to be placed ("mm", "pt", ...) """ super(TexTextElement, self).__init__() From bbbefb89a728c95f8c992722f7d87f4ff2183bcc Mon Sep 17 00:00:00 2001 From: dongguaguaguagua <1448424184@qq.com> Date: Sat, 17 Feb 2024 14:17:40 +0800 Subject: [PATCH 4/8] custumize typst displayMath --- .gitignore | 1 + textext/asktext.py | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 6657aa4..66994bb 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /.idea/ /textext/.cache.json /textext/config.json +.DS_Store diff --git a/textext/asktext.py b/textext/asktext.py index c6bbd8e..e05968c 100644 --- a/textext/asktext.py +++ b/textext/asktext.py @@ -626,7 +626,7 @@ def __init__(self, version_str, text, preamble_file, global_scale_factor, curren {new_node_content} - {close_shortcut} + {close_shortcut} @@ -1270,7 +1270,10 @@ def create_window(self): iter = self._source_buffer.get_iter_at_offset(1) self._source_buffer.place_cursor(iter) if new_node_content_value=='DisplayMath': - self.text = "$$$$" + if self.current_texcmd == "typst": + self.text = "$ $" + else: + self.text = "$$$$" self._source_buffer.set_text(self.text) iter = self._source_buffer.get_iter_at_offset(2) self._source_buffer.place_cursor(iter) From 53952311ef52429bb46fad86197aab4271a0e9ec Mon Sep 17 00:00:00 2001 From: Jan Winkler Date: Sat, 17 Feb 2024 13:56:18 +0100 Subject: [PATCH 5/8] Updated list of authors --- AUTHORS.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/AUTHORS.rst b/AUTHORS.rst index 65804ea..ee9cb7d 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -16,6 +16,7 @@ went into the development of the project. - Alexander Blinne - Antonio Russo - Brian Clarke +- dongguaguaguagua@github - Florent Becker - jocelynetienne@github - Markus Wallerberger @@ -25,6 +26,7 @@ went into the development of the project. - Robert Szalai - Rafal Kolanski - Toru Araki +- user202729@github - veltsov@github - Vladislav Gavryusev - xuestrange@github From 8049f9b88b2b4fdcca42fbb5035cc1b0067479f2 Mon Sep 17 00:00:00 2001 From: Jan Winkler Date: Tue, 20 Feb 2024 09:57:50 +0100 Subject: [PATCH 6/8] Updated changelog for 1.10.2 --- CHANGELOG.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 4d6112c..99a2063 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,3 +1,8 @@ +Version 1.10.2 (2024-02-20) +~~~~~~~~~~~~~~~~~~~~~~~~~~~ +- Fixed: Wrong environment inserted when `Display Math` option is selected + in `New Node Content` menu while typst is the active compiler (:Issue:`417`) + Version 1.10.1 (2023-11-18) ~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Fixed: Installation issue on Windows. From 9bfa781697bcee9ef07505b1c50e58d710e4d846 Mon Sep 17 00:00:00 2001 From: Jan Winkler Date: Tue, 20 Feb 2024 09:59:14 +0100 Subject: [PATCH 7/8] Updated copyright notice for 2024 --- LICENSE.txt | 2 +- build_packages.py | 2 +- pytests/conftest.py | 2 +- pytests/test_compatibility.py | 2 +- setup.py | 2 +- test_installation_script.py | 2 +- textext/__main__.py | 2 +- textext/asktext.py | 2 +- textext/base.py | 2 +- textext/errors.py | 2 +- textext/requirements_check.py | 2 +- textext/utility.py | 2 +- textext/win_app_paths.py | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/LICENSE.txt b/LICENSE.txt index c959b8a..db1cfda 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,4 +1,4 @@ -Copyright (c) 2006-2023 TexText developers. +Copyright (c) 2006-2024 TexText developers. All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/build_packages.py b/build_packages.py index 4cd701e..53a6f0f 100644 --- a/build_packages.py +++ b/build_packages.py @@ -2,7 +2,7 @@ This file is part of TexText, an extension for the vector illustration program Inkscape. -Copyright (c) 2006-2023 TexText developers. +Copyright (c) 2006-2024 TexText developers. TexText is released under the 3-Clause BSD license. See file LICENSE.txt or go to https://github.com/textext/textext diff --git a/pytests/conftest.py b/pytests/conftest.py index ec4e5de..87871a8 100644 --- a/pytests/conftest.py +++ b/pytests/conftest.py @@ -2,7 +2,7 @@ This file is part of TexText, an extension for the vector illustration program Inkscape. -Copyright (c) 2006-2023 TexText developers. +Copyright (c) 2006-2024 TexText developers. TexText is released under the 3-Clause BSD license. See file LICENSE.txt or go to https://github.com/textext/textext diff --git a/pytests/test_compatibility.py b/pytests/test_compatibility.py index 4ef890f..c063a19 100644 --- a/pytests/test_compatibility.py +++ b/pytests/test_compatibility.py @@ -2,7 +2,7 @@ This file is part of TexText, an extension for the vector illustration program Inkscape. -Copyright (c) 2006-2023 TexText developers. +Copyright (c) 2006-2024 TexText developers. TexText is released under the 3-Clause BSD license. See file LICENSE.txt or go to https://github.com/textext/textext diff --git a/setup.py b/setup.py index 1f11f71..6f80e28 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ This file is part of TexText, an extension for the vector illustration program Inkscape. -Copyright (c) 2006-2023 TexText developers. +Copyright (c) 2006-2024 TexText developers. TexText is released under the 3-Clause BSD license. See file LICENSE.txt or go to https://github.com/textext/textext diff --git a/test_installation_script.py b/test_installation_script.py index 0e1d8d2..4df263c 100644 --- a/test_installation_script.py +++ b/test_installation_script.py @@ -2,7 +2,7 @@ This file is part of TexText, an extension for the vector illustration program Inkscape. -Copyright (c) 2006-2023 TexText developers. +Copyright (c) 2006-2024 TexText developers. TexText is released under the 3-Clause BSD license. See file LICENSE.txt or go to https://github.com/textext/textext diff --git a/textext/__main__.py b/textext/__main__.py index 636ffd3..3f6fc8c 100644 --- a/textext/__main__.py +++ b/textext/__main__.py @@ -2,7 +2,7 @@ This file is part of TexText, an extension for the vector illustration program Inkscape. -Copyright (c) 2006-2023 TexText developers. +Copyright (c) 2006-2024 TexText developers. TexText is released under the 3-Clause BSD license. See file LICENSE.txt or go to https://github.com/textext/textext diff --git a/textext/asktext.py b/textext/asktext.py index e05968c..6595a59 100644 --- a/textext/asktext.py +++ b/textext/asktext.py @@ -2,7 +2,7 @@ This file is part of TexText, an extension for the vector illustration program Inkscape. -Copyright (c) 2006-2023 TexText developers. +Copyright (c) 2006-2024 TexText developers. TexText is released under the 3-Clause BSD license. See file LICENSE.txt or go to https://github.com/textext/textext diff --git a/textext/base.py b/textext/base.py index 3eef7ff..8651da5 100644 --- a/textext/base.py +++ b/textext/base.py @@ -2,7 +2,7 @@ This file is part of TexText, an extension for the vector illustration program Inkscape. -Copyright (c) 2006-2023 TexText developers. +Copyright (c) 2006-2024 TexText developers. TexText is released under the 3-Clause BSD license. See file LICENSE.txt or go to https://github.com/textext/textext diff --git a/textext/errors.py b/textext/errors.py index 1110f5a..0b9416f 100644 --- a/textext/errors.py +++ b/textext/errors.py @@ -2,7 +2,7 @@ This file is part of TexText, an extension for the vector illustration program Inkscape. -Copyright (c) 2006-2023 TexText developers. +Copyright (c) 2006-2024 TexText developers. TexText is released under the 3-Clause BSD license. See file LICENSE.txt or go to https://github.com/textext/textext diff --git a/textext/requirements_check.py b/textext/requirements_check.py index 0791a56..7fcb1ad 100644 --- a/textext/requirements_check.py +++ b/textext/requirements_check.py @@ -2,7 +2,7 @@ This file is part of TexText, an extension for the vector illustration program Inkscape. -Copyright (c) 2006-2023 TexText developers. +Copyright (c) 2006-2024 TexText developers. TexText is released under the 3-Clause BSD license. See file LICENSE.txt or go to https://github.com/textext/textext diff --git a/textext/utility.py b/textext/utility.py index a366962..eb5a252 100644 --- a/textext/utility.py +++ b/textext/utility.py @@ -2,7 +2,7 @@ This file is part of TexText, an extension for the vector illustration program Inkscape. -Copyright (c) 2006-2023 TexText developers. +Copyright (c) 2006-2024 TexText developers. TexText is released under the 3-Clause BSD license. See file LICENSE.txt or go to https://github.com/textext/textext diff --git a/textext/win_app_paths.py b/textext/win_app_paths.py index 6e6db06..1afda8f 100644 --- a/textext/win_app_paths.py +++ b/textext/win_app_paths.py @@ -2,7 +2,7 @@ This file is part of TexText, an extension for the vector illustration program Inkscape. -Copyright (c) 2006-2023 TexText developers. +Copyright (c) 2006-2024 TexText developers. TexText is released under the 3-Clause BSD license. See file LICENSE.txt or go to https://github.com/textext/textext From 42dca0128b7121e8cd95123356a05c96795c7ef8 Mon Sep 17 00:00:00 2001 From: Jan Winkler Date: Tue, 20 Feb 2024 09:59:59 +0100 Subject: [PATCH 8/8] Bumped version to 1.10.2 --- textext/VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/textext/VERSION b/textext/VERSION index e33692a..70ad429 100644 --- a/textext/VERSION +++ b/textext/VERSION @@ -1 +1 @@ -1.10.1 \ No newline at end of file +1.10.2 \ No newline at end of file