# Tag Info

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")

2

Something like this perhaps - I've written the code block in python but you can do it in any language you want: * foo blah blah blah #+begin_src python :results output :exports results :var n=700 :wrap export html for i in range(1,n+1): print('<figure>\n <img src="./images/image{}.png" width="300px" />\n</...

2

In addition to the answer of Melioratus which I accepted, I also noticed that I can embed native HTML code in the title via the inline HTML mechanism of org mode. So for instance, this also works and allows me to add extra attributes like width and height. #+TITLE: @@html:<img src="file:///home/pictures/bird.svg" alt="" / width="...

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 ...

1

I often need to link to the emacs manuals, for example, this markdown link: (emacs) Echo Area, is created via M-x chunyang-Info-markdown-current-node-html since it's difficult to do it manually. With the following, you can also type O to open the corresponding HTML manuals in your web browser. (defvar chunyang-Info-html-alist '( ;; Special cases come ...

1

Add file:some-directory/image1.png into #+TITLE: I use this technique for exporting to HTML and for rendering org-mode pages in GitLab. e.g. #+TITLE: file:some-directory/image1.png My Long Title Preceded by Many Spaces which exports to html <title><img src="some-directory/image1.png" alt="image1.png"> ...

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

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