obsidian-latex-css icon indicating copy to clipboard operation
obsidian-latex-css copied to clipboard

Not all settings are applied

Open marissadi opened this issue 4 years ago • 23 comments
trafficstars

I enabled Style Settings and this CSS snippet, but when I export only some of the settings are applied (e.g. I see the numbering, but the font is still the same as before). These are supposed to be applied to when I select Export to PDF, right?

marissadi avatar Sep 13 '21 20:09 marissadi

Is the font in the System Settings "CMU Serif"? And is everything toggled on? Sometimes the Font takes some time to load and you will need to export the note 2 times.

phibr0 avatar Sep 14 '21 05:09 phibr0

Yes, I have toggled everything on. I have exported it a couple of times now and it is still using the default font.

image

image

image

marissadi avatar Sep 14 '21 19:09 marissadi

Could you disable all other Snippets and Themes as a Test please

phibr0 avatar Sep 16 '21 18:09 phibr0

Same here. I disabled all themes and plugins (except style settings) and installed CMU serif manually. The exported PDF still uses the default font.

ChenghaoMou avatar Sep 18 '21 16:09 ChenghaoMou

I cannot reproduce this, not even in a completely clean Vault. Could you try this in a newly created Vault with the Snippet and the Style Settings installed please?

phibr0 avatar Sep 18 '21 16:09 phibr0

I created a new vault and turned on this snippet, but still, it shows the default font.

macOS 12.0 Beta (21A5506j) Obsidian 0.12.16

ChenghaoMou avatar Sep 18 '21 17:09 ChenghaoMou

Is the Style Settings Plugin enabled?

phibr0 avatar Sep 18 '21 17:09 phibr0

I think I know why. The font name installed is not CMU Serif, it should be CMU Serif Roman in my case. image

ChenghaoMou avatar Sep 18 '21 17:09 ChenghaoMou

The font is different after changing in style settings, but it doesn't look like CMU Serif * to me image

ChenghaoMou avatar Sep 18 '21 17:09 ChenghaoMou

They are definitely different image

ChenghaoMou avatar Sep 18 '21 17:09 ChenghaoMou

After manually change the snippet to the following, the PDF is properly rendered with the correct font.

@font-face {
  font-family: "CMU Serif Roman";
  src: local('CMU Serif Roman');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

ChenghaoMou avatar Sep 18 '21 17:09 ChenghaoMou

This works with your locally installed Font, the Snippet ships with its own Font though and the Name is set as "CMU Serif", works on Windows and Linux atleast.

This might be a mac Issue then?

phibr0 avatar Sep 18 '21 17:09 phibr0

I would say so. It is the only thing I changed. Changing it to other values (url, data-uri) doesn't seem to load.

ChenghaoMou avatar Sep 18 '21 17:09 ChenghaoMou

How are we meant to install the fonts or other things in the snippet? I just have the latex.css file in the .obsidian/snippets folder.

marissadi avatar Sep 27 '21 18:09 marissadi

The Font is included in the latex.css File. There is no need to install it other than putting it into the snippets folder and enabling it

phibr0 avatar Sep 27 '21 18:09 phibr0

I do have the same problem right here on a windows machine

thryba avatar Nov 25 '21 17:11 thryba

Which Theme are you using as a baseline? Please make sure to enable the Style Settings Plugin and try if it works with the default Theme.

phibr0 avatar Nov 25 '21 17:11 phibr0

At first I was using the "Sanctum" Theme, but switched backed to Default for testing. It seems to just use the default font of the theme, regardless. Style Settings Plugin is enabled and everything is shown as it should.

thryba avatar Nov 25 '21 17:11 thryba

Hello - I am having similar issues. I think it may be an issue with installation. I have: -Downloaded and enabled Style Settings Plugin -Downloaded and put latex.css into the snippets folder

Not sure where I should put the extracted .zip file (obsidian-latex-css) though... Thanks!

sare000 avatar Dec 12 '21 15:12 sare000

You don't need the zip, GitHub adds this one automatically.

phibr0 avatar Dec 12 '21 16:12 phibr0

OK thanks. Unfortunately I'm also getting the default markdown style for PDFs. If you have any suggestions, please let me know. Not sure if this is a mac issue.

sare000 avatar Dec 12 '21 17:12 sare000