[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] question about org-coderef-label-format and HTML export
From: |
D M German |
Subject: |
Re: [O] question about org-coderef-label-format and HTML export |
Date: |
Wed, 07 Dec 2016 01:13:36 -0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Nicolas Goaziou twisted the bytes to say:
Nicolas> Hello,
Nicolas> dmg <address@hidden> writes:
>> I was playing with org-coderef-label-format to reference lines of code
>> in blocks.
>>
>> I created a small example that overrides the default value:
>>
>> #+BEGIN_SRC C++ :main no :flags -std=c++14 -Wall --pedantic -Werror
>> :results output :exports both -r -l "//(ref:%s)" +n
Nicolas> Switches are to be located before Babel parameters:
#+begin_src C++ -r -l "//(ref:%s)" +n :main no ..
Thank you, Nicolas, I appreciate your response. It almost works now.
I think I found a bug. It works in some cases but not in others:
the following code properly defines the references abc and bfc. But it
does not define the one for (ref:jump). Here is a link to the exported
HTML file:
http://turingmachine.org/~dmg/temp/ref-test.html
http://turingmachine.org/~dmg/temp/ref-test.org
#+BEGIN_SRC C++ -r -l "//(ref:%s)" +n :main no :results output :exports both
#include <iostream>
int main()
{ //(ref:abc)
std::cout << "Hello world" << std::endl;
std::cout << "Hello world 2" << std::endl;
//(ref:jump)
return 0; //(ref:bcf)
}
#+END_SRC
Nicolas> Regards,
thank you again,
--daniel
Nicolas> --
Nicolas> Nicolas Goaziou
--
Daniel M. German "Computer Science is no more
about computers than astronomy
Edsger Dijkstra -> is about telescopes"
http://turingmachine.org/
http://silvernegative.com/
dmg (at) uvic (dot) ca
replace (at) with @ and (dot) with .