Re: [O] mathjax

2017-06-12 Thread Adam Aviv
Another change in moving to cloudflair was that it was https link rather
than a http. It could be the case that you have mixed content, https with
http as well. Does it still not render when you change to https?



On Sun, Jun 11, 2017 at 10:03 AM, Colin Baxter  wrote:

> Dear Kaushal,
>
> > "Kaushal" == Kaushal Modi  writes:
>
> Kaushal> So all the org-mode updates on Org Elpa or Melpa since then
> Kaushal> have that in effect, and even the releases starting with
> Kaushal> version 9.0.6.
>
> Kaushal> - What's your org version?  - What do you see when you do
> Kaushal> C-h v org-html-mathjax-options ?  --
>
>
> My org is version 9.0.8, and I've appended the output for
> org-html-mathjax-options. I'm guessing the relevant bit is at the bottom.
>
>  Begin 
>
> org-html-mathjax-options is a variable defined in `ox-html.el'.
> Its value is shown below.
>
> Documentation:
> Options for MathJax setup.
>
> Alist of the following elements.  All values are strings.
>
> path  The path to MathJax.
> scale Scaling with HTML-CSS, MathML and SVG output engines.
> align How to align display math: left, center, or right.
> font  The font to use with HTML-CSS and SVG output.  As of MathJax
> 2.5
>   the following values are understood: "TeX", "STIX-Web",
>   "Asana-Math", "Neo-Euler", "Gyre-Pagella",
>   "Gyre-Termes", and "Latin-Modern".
> linebreaksLet MathJax perform automatic linebreaks.  Valid values
>   are "true" and "false".
> indentIf align is not center, how far from the left/right side?
>   Valid values are "left" and "right"
> multlinewidth The width of the multline environment.
> autonumberHow to number equations.  Valid values are "None",
>   "all" and "AMS Math".
> tagindent The amount tags are indented.
> tagside   Which side to show tags/labels on.  Valid values are
>   "left" and "right"
>
> You can also customize this for each buffer, using something like
>
> #+HTML_MATHJAX: align: left indent: 5em tagside: left font: Neo-Euler
>
> For further information about MathJax options, see the MathJax
> documentation:
>
>   http://docs.mathjax.org/
>
> You can customize this variable.
>
> This variable was introduced, or its default value was changed, in
> version 8.3 of the Org package.
>
>
> Value: ((path "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/
> MathJax.js?config=TeX-AMS_HTML")
>  (scale "100")
>  (align "center")
>  (font "TeX")
>  (linebreaks "false")
>  (autonumber "AMS")
>  (indent "0em")
>  (multlinewidth "85%")
>  (tagindent ".8em")
>  (tagside "right"))
>
> -- End ---
>
>
> Best wishes,
>
> Colin.
>
> --
> --
> Colin Baxter
> m43...@yandex.com
> GnuPG fingerprint: 68A8 799C 0230 16E7 BF68  2A27 BBFA 2492 91F5 41C8
>
>


-- 
Adam J. Aviv, PhD
*Asst. Professor*
*Computer Science*
*U.S. Naval Academy*
*(410) 293- 6655*


Re: [O] Mathjax CDN to shutdown April 30th 2017

2017-04-15 Thread Adam Aviv
On Sat, Apr 15, 2017 at 12:22 PM, Nicolas Goaziou 
wrote:

> > Is there a plan to move the default org-mode mathjax header link over to
> > this by 30 April? It's a one line change in ox-htm.el for mathjax
> options.
> > I've attached that patch for convenience.  However, after a bit of
> > grepping, there should be some changes to the documentation which refers
> to
> > using the mathjax CDN and stuff.
>
> Would you want to provide a patch for that?


>
[...]
>
> Have you signed FSF papers? Otherwise, you need to include "TINYCHANGE"
> at the end of your commit message before I can apply it.
>

I've included both changes, to doc and the the html export in the attached
patch, now with properly commit message including the TINYCHANGE.

I would like to also figure out why (still can't track it down right now)
if you don't do the settings via (org-html-mathjax-options) you get
orgmode.org's hosting of mathjax.js via HTTP. It would seem wiser to either
host this under HTTPS so that the loading of mixed-content is not blocked
when using HTTPS or change that to also using the cdn.

-adam

-- 
Adam J. Aviv, PhD
*Asst. Professor*
*Computer Science*
*U.S. Naval Academy*
*(410) 293- 6655 <(410)%20293-6655>*


0001-Updating-mathjax-CDN-links-to-reflect-cdnjs.com-as-c.patch
Description: Binary data


[O] Mathjax CDN to shutdown April 30th 2017

2017-04-12 Thread Adam Aviv
Hi all,

I saw this blogpost recently about cdn.mathjax.org will be shutdown on
April 30th 2017.

https://www.mathjax.org/cdn-shutting-down/

There's a replacement to use cloudflair hosting instead

https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?...

Is there a plan to move the default org-mode mathjax header link over to
this by 30 April? It's a one line change in ox-htm.el for mathjax options.
I've attached that patch for convenience.  However, after a bit of
grepping, there should be some changes to the documentation which refers to
using the mathjax CDN and stuff.

On another note, the default option of using orgmode.org's hosting of
mathjax.sh should be updated to support HTTPS because most browsers block
scripts loaded under http if the page is loaded under https. Or, that
default should also change to the cloudflare cdn if it fits within the
terms of service. Perhaps that should be a discussion for another thread,
though.

-aja

-- 
Adam J. Aviv, PhD
*Asst. Professor*
*Computer Science*
*U.S. Naval Academy*
*(410) 293- 6655*


0001-Fixing-link-to-mathjax-cdn-as-cdn.mathjax.org-is-shu.patch
Description: Binary data


Re: [O] #+BEGIN_html/#+END_html tags not exporting literally to html anymore?

2016-07-24 Thread Adam Aviv
Thanks for the comments... very helpful! This is a perfect example of when
living on the bleeding edge of a library and searching for solutions can
come into conflict. I'll stick to looking at the docs built off the git
repo.

On Fri, Jul 22, 2016 at 5:15 PM, Nick Dokos <ndo...@gmail.com> wrote:

> Adam Aviv <a...@usna.edu> writes:
>
> > On Fri, Jul 22, 2016 at 12:38 PM, Charles C. Berry <ccbe...@ucsd.edu>
> wrote:
> >
> > It is updated. For example, see
> >
> > (info "(org) Special blocks")
> > and
> > (info "(org) results")
> >
> > and in ORG-NEWS.
> >
> > I see that now, but the online documentation is still out dated:
> >
> > http://orgmode.org/manual/Quoting-HTML-tags.html
> >
> > Is there a push cycle to keep the online documents up to date with the
> source documentation? Or is that
> > controlled differently?
> >
>
> That's because the online docs are for the stable version (the version
> you get from the maint branch of the git repo).
>
> If you are using latest (i.e. the master branch of the git repo), then
> you have to build and use the docs that come with it:
>
>   make info
>
> I do
>
> --8<---cut here---start->8---
>
> INFOPATH=$HOME/src/emacs/org/org-mode/doc:/usr/local/share/info:/usr/share/info
> export INFOPATH
> --8<---cut here---end--->8---
>
> in my login shell initialization file to make sure that I pick the
> version I built over any other versions installed on my system.
> There are other ways to do that - and even for this one, you will
> have to modify the paths appropriately.
>
> --
> Nick
>
>
>


-- 
Adam J. Aviv, PhD
*Asst. Professor*
*Computer Science*
*U.S. Naval Academy*
*(410) 293- 6655 <%28410%29%20293-%206655>*


Re: [O] #+BEGIN_html/#+END_html tags not exporting literally to html anymore?

2016-07-22 Thread Adam Aviv
On Fri, Jul 22, 2016 at 12:38 PM, Charles C. Berry  wrote:

> It is updated. For example, see
>
> (info "(org) Special blocks")
> and
> (info "(org) results")
>
> and in ORG-NEWS.
>

I see that now, but the online documentation is still out dated:

http://orgmode.org/manual/Quoting-HTML-tags.html

Is there a push cycle to keep the online documents up to date with the
source documentation? Or is that controlled differently?


-- 
Adam J. Aviv, PhD
*Asst. Professor*
*Computer Science*
*U.S. Naval Academy*
*(410) 293- 6655*


Re: [O] #+BEGIN_html/#+END_html tags not exporting literally to html anymore?

2016-07-22 Thread Adam Aviv
On Fri, Jul 22, 2016 at 10:17 AM, Eric S Fraga  wrote:

>
> > If so, is there a way to make compilation backwards compatible. I have
> > a lot of old org files that would be a pain to update.  Further, all
> > the documentation on the org site is also out of date.
>
> a simple regex replace (or two I guess) will fix all in a file?


Yes, I agree --- but that's a burden on long time users even if it is a
simple sed script.

I just wonder why the #+BEGIN_HTML was removed in the first place? What
harm was it doing? And, why was this change made without updating the
documentation to reflect it?




-- 
Adam J. Aviv, PhD
*Asst. Professor*
*Computer Science*
*U.S. Naval Academy*
*(410) 293- 6655*


[O] #+BEGIN_html/#+END_html tags not exporting literally to html anymore?

2016-07-22 Thread Adam Aviv
I just did an update to my org install, and when I recompiled my notes, I
noticed that I was not getting literal exporting for things between a
#+BEGIN_HTML and #+END_HTML tag, however #+HTML: prefix still exports
properly.

Am I to assume that

#+BEGIN_HTML
#+END_HTML

will be completely replaced now with

#+BEGIN_EXPORT html
#+END_HTML

If so, is there a way to make compilation backwards compatible. I have a
lot of old org files that would be a pain to update.  Further, all the
documentation on the org site is also out of date.



-- 
Adam J. Aviv, PhD
*Asst. Professor*
*Computer Science*
*U.S. Naval Academy*
*(410) 293- 6655*


Re: [O] Renaming of +NAME for code blocks to in HTML export, no longer user defined

2016-01-21 Thread Adam Aviv
On Thu, Jan 21, 2016 at 4:20 AM, Nicolas Goaziou 
wrote:

> That and the fact that one might introduce forbidden characters in the
> name (e.g., ask the user to know about forbidden characters in the
> target format). The generic names are pretty safe.
>
> Anyway, what about using special blocks to generate custom ?
>
>   #+attr_html: :property whatever
>   #+begin_something
>   ...
>   #+end_something
>
>
Thanks for the feedback. All of that makes sense. Is there really a
+begin_somthing tag? Or are you referring to any general tag? Sorry for my
obtuseness.

I'll look into the :property issue: I think that'd properly work for my
needs.


-- 
Adam J. Aviv, PhD
*Asst. Professor*
*Computer Science*
*U.S. Naval Academy*
*(410) 293- 6655*


Re: [O] Renaming of +NAME for code blocks to in HTML export, no longer user defined

2016-01-05 Thread Adam Aviv
On Mon, Jan 4, 2016 at 1:29 PM, Nick Dokos  wrote:

> It may be a bug: the code (in org-html-src-block) looks like this
>
>   (label (let ((lbl (and (org-element-property :name src-block)
>  (org-export-get-reference src-block
> info
>(if lbl (format " id=\"%s\"" lbl) ""
>
> and I'm wondering whether the "and" should be an "or".
>

Interesting. I don't know if it is a bug, though, as this seems intentional
and matches my experience. The idea being that if you want to label
something, you use the :name tag, but this will make it so the second item
is evaluated, producing a unique identifier. The unique identifier is then
assigned instead of the :name tag. If it was an, OR, however, then every
element block would get a label, and that might be suboptimal given that
not every block is referenced later.

I would still like to be able to add my own name tags, but understand why
this might have been changed to avoid to blocks having the same label.


-- 
Adam J. Aviv, PhD
*Asst. Professor*
*Computer Science*
*U.S. Naval Academy*
*(410) 293- 6655*


[O] Renaming of +NAME for code blocks to in HTML export, no longer user defined

2016-01-04 Thread Adam Aviv
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  (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:



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:



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  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*