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.
149
questions
28
votes
2answers
6k 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.
...
27
votes
3answers
8k 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 ...
27
votes
1answer
4k 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 ...
14
votes
2answers
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 ...
13
votes
1answer
462 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
3answers
3k 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
4answers
116 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
2answers
4k views
Built-in way of decoding HTML entities (i.e. " or ')
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 "how to fold xml"...
11
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 ...
9
votes
2answers
5k 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 ...
9
votes
1answer
869 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 ...
9
votes
3answers
2k 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 ...
9
votes
1answer
2k 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 ...
9
votes
1answer
786 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 ...
8
votes
2answers
3k 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....
8
votes
1answer
3k 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 ...
8
votes
1answer
154 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 ...
7
votes
3answers
963 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
1answer
3k 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).
...
7
votes
1answer
642 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
2answers
4k 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 ...
6
votes
1answer
535 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 ...
6
votes
0answers
380 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="...
5
votes
1answer
718 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
1k 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
3k 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/...
4
votes
2answers
445 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
2answers
640 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))
...
4
votes
0answers
139 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 ...
4
votes
0answers
927 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
390 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
53 views
Emacs script to indent files from the command line
I am trying to create an Emacs script that indents HTML files from the command line. This is what I have so far:
#!/usr/bin/env -S emacs --script
(require 'web-mode)
(indent-region (point-min) (point-...
3
votes
2answers
2k 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?
3
votes
1answer
653 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 ...
3
votes
1answer
685 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
3answers
773 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.
3
votes
1answer
2k views
Live view an html document in emacs
Running emacs 25.2.2.
Here is something (apparently) simple I want to do, but am unable to:
I am editing an html document. I want to see the same document in the
internal browser in a vertically ...
3
votes
1answer
293 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
156 views
Properly exporting latex to HTML from org-mode using dvisvgm / dvipng
I need to export my org notes containing latex to HTML format. Example document :
#+latex_class: article
#+latex_header: \usepackage{chemfig}
#+latex_header: \usepackage[version=3]{mhchem}
#+...
3
votes
0answers
348 views
exporting .svg images to .pdf in org-mode
I have a set of .svg images that I need to export to pdf by using org-mode. Even though I can see the images inside emacs, I cannot export them to .pdf. On the other hand, if I export my .org file to ...
3
votes
0answers
203 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
60 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
79 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
1answer
1k 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
1answer
312 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
902 views
Embbed html/javascript in org-mode html export
Is it possible to embed an html file within an html exported from org-mode?
I don't mean to "quote" the source of the file (which is possible with #+INCLUDE: "someFile.html" src html).
My use case ...
2
votes
1answer
874 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
107 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 > which ...
2
votes
1answer
638 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 ...