Hot answers tagged

2

Live preview of Markdown in Emacs is discussed in the terrific Guide to Markdown Mode for Emacs and also at the Emacs wiki. The markdown-preview-eww package will use Emacs' build-in eww browser to preview Markdown in a separate pane within Emacs: A few other solutions will auto-refresh external web browsers as one types, notably Impatient Mode and Livedown....


2

There doesn't seem to be any way to specify the column classes in the output that org-mode produces. I did find though that I am able to use nth-child to achieve what I need. You can add something like this to your .org file: @@html: <style> table colgroup col:nth-child(1) { width: 10%; } table colgroup col:nth-child(2) { width: 40%; } table ...


2

Looks like #+HTML: <section> does the trick. It adds the <section> without wrapping it in <p> tags.


2

As stated in my comment, the problem seemed to relate to ivy, a fantastic generic completion mechanism for Emacs. Somehow i failed to realise what was going on: ivy was doing its job and providing candidates for completion. The solution is readily available in the Ivy user manual: ivy-immediate-done, which is bound to C-M-j, breaks out of the attribute ...


2

web-mode-language-at-pos function is what are your looking for. Although it is not documented. Single function to get language at pos that will work across different modes might look like this: (defun my/language-at-pos (pos) "Message language at POS." (interactive "d") (let ((lang (cond ;; web-mode ((eq major-mode 'web-...


2

As described in the org manual, alongside the explanation of #+BEGIN_EXPORT html @@html:the quick <b>brown</b> fox@@


2

This is not really a problem with either org or LaTeX. You have set H:3 which makes fourth-level headlines into list items of some sort. You have chosen num:t which says that the sections should be numbered. In that case, the LaTeX exporter chooses the enumerate environment for "deep" sections. So far, so good. But that makes the whole section (headline ...


1

The function sgml-html-meta-auto-coding-function selects the coding system on the basis of the meta tag. It only checks the meta tag if the document begins with <!doctype html> or with <html>. (Case is not relevant since case-fold-search is let-bound to t.) That function is a member of auto-coding-functions by default. So the coding system is ...


1

Emacs 26.1 uses mhtml-mode for HTML files by default, the new mode supports JavaScript and CSS within HTML. Here is the NEWS from C-u C-h n 26.1: *** A new submode of 'html-mode', 'mhtml-mode', is now the default mode for *.html files. This mode handles indentation, fontification, and commenting for embedded JavaScript and CSS. You can use the text ...


1

You need to set the appropriate export option, which is timestamp. It's described at Export Settings, but I always find that section ridiculously confusing, so here are some examples: Either globally using a variable: (setq org-export-with-timestamps nil) or globally using a keyword: #+options: timestamp:nil * headline one two three or on an individual ...


1

For variables that cannot be set through the #+OPTIONS keyword, the #+BIND keyword mechanism can be used. Adding #+BIND: org-html-link-org-files-as-html:nil to the top of your file would be equivalent to your #+OPTIONS line if the option existed. #+BIND was introduced as a mechanism to set export options without having to set up options explicitly and a ...


1

Using melpa requires that M-x package-reinstall RET and then type htmlize. Thanks xuchunyang


1

Looks like you'll need to define your own command to do it. If you look in ox-html.el and search for ":menu-entry" (on my machine [Org 9.0.9], it's on line 105), you'll see that C-c C-e h H and C-c C-e h h point to commands in ox-html.el, but C-c C-e h o is implemented via a lambda function that you'll have to reproduce. No idea why it was done differently ...


1

For racket-mode I wanted to have GitHub host a Reference.md file that recapitulated the doc strings for user commands, vars, and faces. That way, people could browse online without installing. What I came up with to do so is racket-make-doc.el. How it works: I specify the commands, vars, and faces in a defconst for each. Iterate over each, using (...


1

You can just use query-regexp-replace (bound by default to C-M-%) to substitute three or more consecutive newlines with two newlines. You need to know how to add a newline to your query and replacement strings: C-q C-j. Altogether you'd type: C-M-% C-q C-j \{3,\} RET C-q C-j C-q C-j RET !


1

You can use @@html:...@@, for example: @@html:<i class="fa fa-plus"></i>@@ ref: Quoting HTML tags


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