Hot answers tagged

2

As an alternative, you can use the ox-pandoc package. Pandoc itself has a command line option called --self-contained which will embed images in html. To you use this for just the pandoc HTML5 exporter, by putting this in your .emacs: (setq org-pandoc-options-for-html5 '((standalone . t) (self-contained . t))) Also, you could have it for html4 instead/as ...


2

With web-mode, make sure your treating your code as React, not JavaScript. Using your init file, and saving your example code to a file with a .js extension, I get the behavior you describe. Saving your example code to a .jsx file, the html is syntax highlighted and indented properly. To specify ReactJS vs JavaScript you could mess with web-mode-content-...


2

You can find out what C-c C-v does by pressing F1 k C-c C-v in a html-mode buffer: C-c C-v runs the command browse-url-of-buffer (found in html-mode-map), which is an interactive autoloaded compiled Lisp function in ‘browse-url.el’. That command can be bound in the appropriate web-mode keymap, aptly named web-mode-map: (with-eval-after-load 'web-...


2

It depends on what you want to do with the tables of course, but assuming that you want to produce generic Org mode tables that can be exported in the standard way, you will have to make the python block produce the structure that Org Babel expects in order to produce the generic Org mode table. That structure is a list of lists: first a list for the headers,...


2

I would continue using the macro. You can use markup inside the macro that expands differently for HTML export than it does for PDF export. For example, as a first approximation, this will allow you to get the dates in the HTML output, although they are not nicely formatted - but it's a beginning: #+MACRO: date @@latex: \hfill\normalfont{\small $1} @@ @@...


2

Put this in $HOME/.emacs.d/init.el and start up emacs: (setq inhibit-startup-screen t) (eww-open-file "/path/to/startup.html") If you want to visit a URL instead, just replace the second line with (eww "https://example.com/index.html")


1

This solved my problem: http://bald.cat/slimhtml I hope this can also be of use to others. It allows one to define classes and ids etc while still in the org buffer.


1

A useful option is to put #+SETUPFILE: mysetup.org at the top of each .org file and then place your common heading commands such as #+HTML_HEAD: <link rel="stylesheet" type="text/css" href="mystyle.css" /> in the file mysetup.org. Note that mysetup.org can contain further #+SETUPFILE: lines, reading in other files.


1

You can customize the Drag and Drop behavior using the variable dnd-protocol-alist. The ultimate fallback is inserting the link as text, so this is what you want: (setq dnd-protocol-alist nil) The following is the default value, you can also remove http only (("^file:///" . dnd-open-local-file) ("^file://" . dnd-open-file) ("^file:" . dnd-open-local-...


1

In your style.css add .title {text-align: center;} to center the document title in the exported html file. Classes used when exporting are documented in the org manual: CSS-Support. Or inspect the generated html file to see what element and class are used. For the document title this will be the following: <h1 class="title">Hello World</h1> ...


1

The solution to my alternative issue (I used pandoc, more below) may apply to your's as well. I was looking for a CGI-based approach to render org files in the browser, thus implicitly publishing them on the fly. This would allow me to work with the org files without having to actively publish them. In the past, I took a lot of notes using ReStructured ...


1

Don't see what version you are running but the solution is crazy simple. Mine didn't work at first (because i used yml not yaml) Those two file types are the same thing. #+BEGIN_SRC yaml #+END_SRC


Only top voted, non community-wiki answers of a minimum length are eligible