Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[29_3] Modify the way users choose whether to embed tm into pdf #1248

Merged

Conversation

tangdouer1005
Copy link
Contributor

Before the modification, the option in the preference was used to control whether the exported PDF should be embedded with tm document.
the disadvantage of this method is that it is inconvenient for users.because one would like to leave to the user to choose either to embed or not for each document.
So I deleted the option in preference and added iterm to menu to control whether to embed or not.

src/Edit/editor.hpp Outdated Show resolved Hide resolved
@@ -101,6 +101,29 @@
(buffer-close buf))
(print-to-file fname)))

(tm-define (wrapped-print-to-pdf-embeded-with-tm fname)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use use-plugin-pdf? to see if pdf plugin is supported

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is better to define here an empty function and then redefine it in the plugin. This is how tm-define is supposed to operate. Alternatively tm-define can be guarded so that the definition is conditional to the presence of the plugin.

TeXmacs/progs/texmacs/texmacs/tm-print.scm Outdated Show resolved Hide resolved
TeXmacs/progs/texmacs/menus/file-menu.scm Outdated Show resolved Hide resolved
@@ -101,6 +101,29 @@
(buffer-close buf))
(print-to-file fname)))

(tm-define (wrapped-print-to-pdf-embeded-with-tm fname)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is better to define here an empty function and then redefine it in the plugin. This is how tm-define is supposed to operate. Alternatively tm-define can be guarded so that the definition is conditional to the presence of the plugin.

TeXmacs/progs/texmacs/texmacs/tm-print.scm Outdated Show resolved Hide resolved
(set-drd cur)
(dynamic-make-slides)
(print-to-file fname)
(unless(attach-doc-to-exported-pdf fname)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

put a space after unless

@da-liii da-liii merged commit 0c8c275 into XmacsLabs:branch-1.2 Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants