From: Adam Aviv <aviv@usna.edu>
To: Emacs-orgmode@gnu.org
Subject: Renaming of +NAME for code blocks to in HTML export, no longer user defined
Date: Mon, 4 Jan 2016 13:04:08 -0500 [thread overview]
Message-ID: <CAJV1HcyKEixhmcbTjY3WbzPF-LNiD3eOE6cq+pv3tPb0nsRReQ@mail.gmail.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 1427 bytes --]
Hi all,
I've been using org-mode for some time to manage a course website, and I
developed a hack for source blocking where if I use the +NAME tag for
source doe like so:
#+NAME: helloworld.cpp
#+BEGIN_SRC c++ -r
#include <iostream> (ref:include)
using namespace std; (ref:namespace)
// Hello World in C++
int main(int argc, char * argv[]){
cout << "Hello World" << endl; (ref:speak)
}
#+END_SRC
Then I could retrieve the name tag in the HTML source via the id when
exported, like so:
<pre class="src src-c++" id="helloworld.cpp">
I can then use the id tag and CSS to have it float next to the code like
this:
[image: Inline image 1]
However, since I updated org-mode recently to version 8.3.2, the +NAME
tagging is no longer user defined. Instead, it get's a generic, org defined
name, such as orgsrcblock1. This means my little hack no longer works and I
get something that looks like this in the HTML exporting:
<pre class="src src-c++" id="orgsrcblock1">
I have two questions for the group:
1) Is there a way to overwrite the generic source block naming? Or turn off
this feature somewhere? I can't seem to figure that out for myself.
2) Is there another hack that someone can suggest? For example, is there a
way to have a user defined <div> tag around the src code that will get
exported?
Thanks!
adam
--
Adam J. Aviv, PhD
*Asst. Professor*
*Computer Science*
*U.S. Naval Academy*
*(410) 293- 6655*
[-- Attachment #1.2: Type: text/html, Size: 2482 bytes --]
[-- Attachment #2: Screenshot 2016-01-04 12.53.57.png --]
[-- Type: image/png, Size: 40401 bytes --]
next reply other threads:[~2016-01-04 18:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-04 18:04 Adam Aviv [this message]
2016-01-04 18:29 ` Renaming of +NAME for code blocks to in HTML export, no longer user defined Nick Dokos
2016-01-05 16:44 ` Adam Aviv
2016-01-21 9:20 ` Nicolas Goaziou
2016-01-21 14:21 ` Adam Aviv
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAJV1HcyKEixhmcbTjY3WbzPF-LNiD3eOE6cq+pv3tPb0nsRReQ@mail.gmail.com \
--to=aviv@usna.edu \
--cc=Emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).