Questions tagged [html]

HTML (HyperText Markup Language) is the principal markup language used for structuring web pages and formatting content. The most recent revision to the HTML specification is HTML5.

Filter by
Sorted by
Tagged with
26
votes
3answers
7k views

How to make Emacs render HTML without having to save the file?

If you have ever used JS Bin, you know that as you type your code (HTML, CSS, Javascript) on the right is updated to fit what you typed. I have found this to be one of the most useful tools for making ...
26
votes
2answers
5k views

New line in Title of an org-mode exported html document

I use org-mode to document stuff and usually export it to pdf (via latex) and html. If the \\ characters are at the end of a line, it forces a newline character when exporting to both pdf and html. ...
24
votes
1answer
3k views

Set the background of org-exported <code> blocks according to theme

I export org-mode files quite often, and almost all of them have code in them. When I do export code, it ends up coloring the text depending on my theme, however, I switch between a dark theme and a ...
13
votes
1answer
360 views

Is there a plugin that does color HTML matching tags like rainbow delimiters?

I would like some plugin which colors html tags with a corresponding color based on which tag they match. For example <div> <p></p></div> <div> and </div> would ...
12
votes
1answer
2k views

Org mode - Parsing rich HTML directly when pasting?

Currently, for notetaking tools like Evernote and Quiver, I can directly copy HTML content from my favorite browser and then paste them into the app, with all the formatting + link preserved. However ...
11
votes
4answers
88 views

How to convert a series of lines into a working HTML list?

Right now, this is a task I find a lot easier in something like gedit, because I can just replace "\n" (the line break) with "</li>\n<li>" and then I have a list. One of the few little ...
11
votes
3answers
2k views

Format a HTML paper with Org-mode

Org-mode's default during HTML export is to put the author in the postamble at the bottom of the page. But I would like to export a paper like document with the author between the title and the ...
11
votes
2answers
3k views

Built-in way of decoding HTML entities (i.e. &quot; or &#39;)

I recently ran into the problem of decoding html entities. I have the following two strings (Note how two methods of encoding are used, named and numbered). The old &quot;how to fold xml&quot;...
10
votes
1answer
1k views

How do I export an ORG file to an interactive HTML site?

Is there a way to export a .org file into an html that supports expanding and collapsing titles? What I want is to be able to press a key like TAB and expand and collapse the outline, but on a html ...
8
votes
1answer
140 views

automatically move to n-th character on line after each C-n or C-p

this feature would go nicely with emmet mode. With emmet-mode, I can expand li*3 to <li></li> <li></li> <li></li> effortlessly. But after i enter something in ...
8
votes
1answer
757 views

Creating permalinks for sections in HTML exported from org-mode

By default when org-mode documents are exported to HTML, the section and sub-section links look like file:///path/to/export/location/doc.html#sec-1-1 The problem is that the above link won't point ...
8
votes
2answers
1k views

Embed Image as Base64 on HTML export from Orgmode

The goal is to make a self-contained html file when exporting from orgmode so that the images are intrinsic to the file and a single html file will can be distributed (I am trying to do this for a ...
8
votes
1answer
613 views

How to export svg images as <img …> in html export

Normally, when I export to html an org-mode buffer that contains a link to an image, the link is coverted to a proper html <img...>. However, if that image has a .svg extension, it is exported ...
7
votes
2answers
2k views

no html/jsx indentation in jsx-mode

For some reason the html/jsx in my react source files always wants to indent as follows, i.e. there is almost no indentation: return ( <DateRangePicker ranges={this.state.ranges} startDate={this....
7
votes
3answers
881 views

How to add new markup to org-mode HTML export?

I would like to add a markup to org-mode, to simplify adding <audio> HTML tags. Like other inline markup: In Thai, /sabai dee mai/ is pronounced as [audio:assets/sabai.mp3] Which would export ...
7
votes
2answers
3k views

How prettify (newlines and indentation) an optimized HTML/JS file?

For example, I have the following bunch of characters (HTML): http://pastebin.com/pwTPp8wd I thought everyone stumbled it upon a processed file, especially when someone would speed up the processing ...
7
votes
1answer
1k views

Org-mode external links not working when exported to HTML

I have 2 .org files: // a.org contains the anchor <<my_anchor>> // b.org contains the link to my_anchor [[file:a.org::my_anchor][My Link]] When I click on the link in org-mode, it links ...
7
votes
1answer
473 views

How to get org-mode fully support Arabic language for export?

My intention is to write Arabic document using org-mode. Please consider the following MWE, given that my configuration in init.el has below code to enable writing of Arabic script from right to left (...
6
votes
1answer
2k views

How to include rendered HTML in org mode?

It looks like this question was asked in this thread, but was not resolved. I hope it doesn't sound redundant, but it seems there must be a way to accomplish this in org mode. In my example, I am ...
6
votes
1answer
477 views

How to make browse-url-of-buffer load the same html file in the same tab in Firefox?

When editing a html file (in an Emacs buffer in HTML mode), I often review the file in my default browser (Firefox) by C-c C-v (ie, running browse-url-of-buffer). But every time I run C-c C-v, Firefox ...
5
votes
2answers
2k views

HTML mode that closes tags

Regular HTML mode doesn't close tags. Or, if it does, I haven't found out how. Transitioning out of Sublime Text, I am searching for an HTML markup mode that will close tags intelligently. The HTML ...
5
votes
1answer
2k views

Markdown preview in Emacs using pandoc

Platform: Windows 7, Emacs 24.2, Pandoc 1.17.2 Scenario: I am writing a markdown file in Emacs. I need to use pandoc to render the output, because it supports citations (using pandoc-citeproc). ...
5
votes
1answer
604 views

orgmode - html export image and code top alignment

This pgfplot gallery is excellent. I try to use org mode to generate similar html but the image and code block not align. #+HTML_HEAD: <style type="text/css"> #+HTML_HEAD: .example {background-...
5
votes
1answer
739 views

siunitx, MathJax, org-mode and html export

I use org-mode to write documents that are both exported into PDF via latex and HTML. I use the package siunitx to typeset numbers with si-units. It is a bit tedious to do but I got used to it (...
4
votes
2answers
292 views

How to put inline quotes in an org file for html export

I am exporting an org file with org-reveal. I would like to have the following html markup when exporting: <q cite="http://searchservervirtualization.techtarget.com/definition/Our-Favorite-...
4
votes
3answers
505 views

Emacs org mode export paragraph in block to HTML, The content does not wrap

it became to one long straight bar, instead of showing as a block of the paragraph. I use #+begin_example. if I use quote it looks ok but I want to have the block looks.
4
votes
0answers
643 views

orgmode image export side by side to both latex and html

In org export, I want to place two images side by side. I want them to be side by side in both LaTeX export and HTML export. In the example below, the first pair works for LaTeX and the second pair ...
4
votes
0answers
334 views

How to save an eww buffer as an html file with all formatting preserved?

I would like to save an eww buffer as an html buffer with text formatting, hyperlinks, etc preserved. If I do C-x C-w, it saves only the raw text visible in the buffer. Here is my use case: I use the ...
3
votes
2answers
420 views

Emacs picking the wrong browser

I'm working under org-mode. When I click on a [http://example.com] link, it opens a tab in Firefox as expected. The .emacs config is: '(browse-url-browser-function (quote browse-url-firefox)) ...
3
votes
1answer
199 views

How to export readable HTML links in Org mode?

When exporting an Org file to HTML all internal links of the form [[link]] are given section indicators of the form X.Y.Z. This makes sentences in which words have been linked unreadable. Input * ...
3
votes
1answer
461 views

gnus to send html-formatted emails

I'm trying to send an html-formatted email via gnus. I found this: https://groups.google.com/forum/#!topic/gnu.emacs.help/nZBJxHHYdko which suggests: 1. M-x mml-insert-part enter 2. Content type: ...
3
votes
0answers
59 views

dvisvgm baseline in org-mode HTML export

When using #+OPTIONS: tex:dvisvgm and exporting to HTML with org-mode, the baseline of the latex exported images does not match the baseline of the text (when using subscripts, for instance). Is there ...
3
votes
0answers
144 views

Is AsciiMath Possible in Org-mode?

I have been using Org-mode for largely everything including for maths text. Although I have gotten pretty good at writing LaTeX snippets, I have a lot of trouble reading it. I much prefer the syntax ...
3
votes
0answers
37 views

syncing html with w3m

How can I split Emacs to two buffers, one for html and the other for w3m so that when I save the html it refreshes the w3m buffer. Also, when I press E in the w3m buffer it takes me to the ...
3
votes
0answers
48 views

Synchronised scrolling of HTML file and eww buffer

I am editing a HTML file. I have done C-x 3. Now, in the other split window, I want to open a browser, such as eww. And as I move in the HTML file, I want the browser window to show the ...
3
votes
0answers
75 views

eww filter rules

emacs-w3m has very useful function: w3m-filter. Namely, one can change html before rendering it. Does eww have something similar? For example on some site i want to change: <span class="tag">...
3
votes
0answers
295 views

how to expand org-mode macros in HTML blocks in export to HTML?

I'd like to use org-mode macro replacement to expand macros inside HTML blocks in org-mode export to HTML. I'd like this... #+MACRO: event-url bar #+HTML_HEAD: <meta property="og:url" content="...
3
votes
1answer
961 views

Org-mode export to HTML - problem with indentation

When I export an elisp source code block to html, the indentation of the code gets messed up. I've tried calling (setq org-src-preserve-indentation t), but that didn't help. I imagine there is perhaps ...
2
votes
2answers
2k views

Center image in GitHub's README.org

I want to center an image in my project's GitHub README.org file, but everything I've tried so far hasn't worked: #+ATTR_HTML style="center" [[/path/to/img.png]] #+ATTR_HTML align="center" [[/path/...
2
votes
1answer
250 views

How can I generate the <abbr> HTML tag from org-mode?

I'm trying to migrate my current blogging platform (Pelican) where I wrote the posts using Markdown to a one based in org-mode (still considering how). One of the problems that I found is that I have ...
2
votes
2answers
1k views

HTML editing with preview [duplicate]

Editing html is good but I really would like to have a way of fast previewing the changes that I made. Is there e.g. a script to open Chromium or refresh a site for that?
2
votes
1answer
794 views

Do not add TITLE as heading to body when exporting org file

This export option: #+TITLE: My title Does two things: adds a meta tag on the document's head: <title>My title</title> adds a heading at the start of the generated content div: <h1 ...
2
votes
1answer
85 views

How to prevent Emacs from converting JavaScript symbols to HTML code?

When I insert a portion of JavaScript code within an HTML file, Emacs convert some basic JS symbols to their HTML code. For example when I type >, Emacs convert it automatically to &gt; which ...
2
votes
1answer
397 views

Org-Mode: Exclude specific code line from html export

I'm writing a Lilypond typesetting tutorial in Org to be published on a web page. I would like to exclude the line with set-default-paper-size from html export, cause it doesn't belong to the tutorial ...
2
votes
2answers
624 views

Encode non-html characters to html equivalent?

I must be overlooking something obvious, but I can't find a way to encode a string/region into HTML, for example "Hölle" to "H&ouml;lle". Is there anything in emacs or web-mode or any other plugin ...
2
votes
1answer
432 views

Where is mhtml mode defined? And why am I getting it by default when I open HTML files?

Under some very special conditions (namely, performing one particular edit in one particular HTML file), my Emacs session will freeze completely, and starts consuming ~100% of the CPU. The only ...
2
votes
1answer
251 views

how can I control table column widths when exporting to html?

I would like to specify the width of each column in tables that are exported from an org mode file to html. In terms of html I can think of two possible solutions, (i) add class attributes to each ...
2
votes
1answer
33 views

Exporting help for multiple emacs lisp symbols into a single Texinfo file

I am looking for a way to produce HTML documentation for functions and variables defined in my .el files. One way I have seen suggested is by using texi2html tool. The challenge is to produce the ...
2
votes
1answer
75 views

eww/w3m search based on underlying page source

Is there a robust/general way in eww browser (or alternatively w3m in emacs) by which I can get the character position in a rendered page from a known character position in the page source? I'd like ...
2
votes
2answers
274 views

Changing HTML Table Formatting When Exporting from R

I am generating several tables in R and then exporting them to HTML(5). For instance: #+BEGIN_SRC R :session *R-org* :results output raw :exports results df <- data.frame(x=0.110, y=0.132) ...