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

wrong display on light theme #37

Closed
xcaptain opened this issue Nov 8, 2023 · 5 comments
Closed

wrong display on light theme #37

xcaptain opened this issue Nov 8, 2023 · 5 comments

Comments

@xcaptain
Copy link

xcaptain commented Nov 8, 2023

Light theme:
image

Dark theme:
image

In the light mode, font color should be black

@fenjalien
Copy link
Owner

By default text is white, you can change this in the preamble: https://github.com/fenjalien/obsidian-typst#preambles

@joleeee
Copy link

joleeee commented Dec 11, 2023

I think this should be reopened. For instance exporting to PDF switches the theme to light for a split second and then exports. Having to manually change the typst theme, export, change it back, should not be expected.

@fenjalien
Copy link
Owner

No correct display on PDF export should be a new issue (see also #31). I hope the THEME variable in the preamble would resolve your issue though, if not please open a new issue.

@joleeee
Copy link

joleeee commented Dec 12, 2023

The root cause is still that this plugin does not take into consideration what theme obsidian is in and forces the user to manually override it. Changing obsidian-typst to light mode will make the PDF export right, but then i cannot read anything when i write because i write in dark mode.

@fenjalien
Copy link
Owner

It does by using the THEME variable in the preamble
image
You could use it like so:

#set text(if THEME == "light" {
    black
  } else {
    white
})

If this does not work as expected when exporting to PDF then please open a new issue as this is a different problem to this current issue.

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

No branches or pull requests

3 participants