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

[Question] How do you get the nice rendering in the .md buffer? #121

Closed
ihodes opened this issue Mar 18, 2016 · 2 comments
Closed

[Question] How do you get the nice rendering in the .md buffer? #121

ihodes opened this issue Mar 18, 2016 · 2 comments

Comments

@ihodes
Copy link
Contributor

ihodes commented Mar 18, 2016

Seen in this screenshot on the left-hand side, things like headers have a larger font-size, etc. http://jblevins.org/projects/markdown-mode/screenshots/20160108-001.png

Also, is there a story for displaying images in markdown buffers in Emacs? I see no image in the eww buffer (nor, unfortunately, in the .md buffer).

Thanks!

@jrblevin
Copy link
Owner

I do the variable-height headings via custom-set-faces, like so, relative to the baseline markdown-header-face:

(custom-set-faces
 '(markdown-header-face ((t (:inherit font-lock-function-name-face :weight bold :family "variable-pitch"))))
 '(markdown-header-face-1 ((t (:inherit markdown-header-face :height 1.8))))
 '(markdown-header-face-2 ((t (:inherit markdown-header-face :height 1.4))))
 '(markdown-header-face-3 ((t (:inherit markdown-header-face :height 1.2)))))

Edit: I don't set custom-set-faces directly, but rather through M-x customize-mode.

eww can render images, but it seems to give the alt text priority. In the following examples, the first renders as "alt" but for the second, eww shows the image. I don't use eww much, so does anyone know how to ask it to display images in the presence of alt text?

![alt](http://jblevins.org/projects/markdown-mode/screenshots/20160108-001.png)

![](http://jblevins.org/projects/markdown-mode/screenshots/20160108-001.png)

@ihodes
Copy link
Contributor Author

ihodes commented Mar 18, 2016

That custom-set-face code worked great, thank you!

I think my problem was that I'd left off the file:// schema... alas.

(I do with there were a way to get images to display inline in the emacs text buffer, like org-mode can [but better; org-mode doesn't, as far as I have been able to figure out, let you easily resize them in the buffer itself] but I think that'd take a bit more hacking; I'll file an issue here, and maybe one day get around to it ;))

Thank you!

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

2 participants