Re: [O] Use custom program to process LaTeX fragments?

2011-06-16 Thread Uriel Avalos
On Thu, 9 Jun 2011 08:56:33 -0700 (PDT)
amscopub-m...@yahoo.com wrote:

> Currently, whenever you export to HTML, you have 3 options for processing 
> LaTeX 
> fragments: (1) dvipng, (2) jsmath, (3) or leave it as is. 
> 
> 
> Is it possible to use an arbitrary program to process LaTeX fragments?
> 
> What I want to do is use a commandline converter to turn the LaTeX fragments 
> directly into MathML. This way the final HTML document already has the 
> correct 
> MathML without the need to use javascript. (Why? I use princexml to convert 
> that 
> HTML file to a hi-quality PDF. JSmath is no good for that.)
> 

anyone?



Re: [O] Feature request: modify italic regexp list to include non-breaking space and other characters

2011-04-22 Thread Uriel Avalos
On Thu, 21 Apr 2011 00:48:21 +0530
Aankhen  wrote:

> On Wed, Apr 20, 2011 at 20:34,   wrote:
> > Sample code:
> >  Using /a/’s and /b/’s, write add /x/ + 2.
> >           ^         ^                ^ ^
> >       Right single quotation mark    Non-breaking space
> >
> > Expected HTML export:
> >  Using a’s and b’s, write x + 2.
> >
> > Actual HTML export:
> >  Using /a/’s and /b/’s, write add /x/ + 2.
> 
> Interestingly, the development version treats this differently, as it
> considers all the text from the first slash to the last part of the
> emphasis:
> 
> ,
> | Using a/’s and /b/’s, write add /x + 2.
> | 
> `
> 
> (This behaviour occurs in the original Org buffer as well, in case
> anyone’s wondering.  The exported HTML was just the easiest way to
> show it.)

Ouch. I hope the devs consider that to be a bug and fix it in the development 
version.

> 
> > If it's not clear, the sample code uses the unicode character "right single 
> > character" instead of an apostrophe and "non-breaking space" instead of 
> > regular white space.
> >
> > It makes sense to use these characters this way, however, orgmode neither 
> > displays the italic expressions correctly nor exports them correctly.
> >
> > I believe older versions of orgmode worked in the expected way.
> >
> > How can I modify the regexp list? Bold characters are also affected.
> 
> These two variables are used to configure the regexp:
> 
> ,[ C-h v org-emphasis-alist RET ]
> | org-emphasis-alist is a variable defined in `org.el'.
> | Its value is (("*" bold "" "")
> |  ("/" italic "" "")
> |  ("_" underline "" "")
> |  ("=" org-code "" "" verbatim)
> |  ("~" org-verbatim "" "" verbatim)
> |  ("+"
> |   (:strike-through t)
> |   "" ""))
> |
> |
> | Documentation:
> | Special syntax for emphasized text.
> | Text starting and ending with a special character will be emphasized, for
> | example *bold*, _underlined_ and /italic/.  This variable sets the marker
> | characters, the face to be used by font-lock for highlighting in Org-mode
> | Emacs buffers, and the HTML tags to be used for this.
> | For LaTeX export, see the variable `org-export-latex-emphasis-alist'.
> | For DocBook export, see the variable `org-export-docbook-emphasis-alist'.
> | Use customize to modify this, or restart Emacs after changing it.
> |
> | You can customize this variable.
> `
> 
> ,[ C-h v org-emphasis-regexp-components RET ]
> | org-emphasis-regexp-components is a variable defined in `org.el'.
> | Its value is (" ('\"{" "-   .,:!?;'\")}\\" "
> \n,\"'" "." 1)
> |
> |
> | Documentation:
> | Components used to build the regular expression for emphasis.
> | This is a list with five entries.  Terminology:  In an emphasis string
> | like " *strong word* ", we call the initial space PREMATCH, the final
> | space POSTMATCH, the stars MARKERS, "s" and "d" are BORDER characters
> | and "trong wor" is the body.  The different components in this variable
> | specify what is allowed/forbidden in each part:
> |
> | pre  Chars allowed as prematch.  Beginning of line will be
> allowed too.
> | post Chars allowed as postmatch.  End of line will be allowed too.
> | border   The chars *forbidden* as border characters.
> | body-regexp  A regexp like "." to match a body character.  Don't use
> |  non-shy groups here, and don't allow newline here.
> | newline  The maximum number of newlines allowed in an emphasis exp.
> |
> | Use customize to modify this, or restart Emacs after changing it.
> |
> | You can customize this variable.
> |
> | [back]
> `

Thanks!

> 
> I’d say that ‘pre’/‘post’ should really contain [[:space:]], but then
> Org’s syntax table seems to treat the non-breaking space as
> punctuation, so that wouldn’t help.  You could try adding the
> character itself to both of those categories for a fix.  You’ll need
> to restart Emacs afterwards (unless you used the Customize interface)
> so that ‘org-emph-re’ is updated accordingly.
> 
> > Using 7.4.
> 
> This little problem aside, you might want to upgrade (if not to the
> development version, at least to 7.5).
> 
> Aankhen

Oh I'm using nt emacs. I believe that's the latest they have out but will check 
again.



[O] Apply custom CSS class to headings in HTML export?

2011-03-31 Thread Uriel Avalos
Suppose that you export the following document to HTML:

  * Heading 1
  ** Heading 2

The HTML structure is pretty much the following:

  div class=outline-2
h2 Heading 1
div class=outline-text-2
div class=outline-3
  h3 Heading 2

Is there a way to apply a custom CSS class to the:

 1. containing div (outline-2)?
 2. heading itself (h2)?
 3. text inside of the heading (outline-3)?

Why? Suppose you have the following document

 * Heading 1
 ** Resources
 ** Answers
 * Heading 2
 ** Quiz 
 ** Resources
 ** Answers

You need to apply a different style to the Resources and
Quizzes. Unfortunately, these don't always appear in an
outline and they don't always appear in the same order. It
is infinitely easier to use a custom CSS class with each
heading.

--Thanks



Re: [Orgmode] Insert ampersand in HTML export?

2011-02-22 Thread Uriel Avalos
On Fri, 18 Feb 2011 10:04:52 +0100
Bastien  wrote:

> Nick Dokos  writes:
> 
> > #+BIND: org-export-html-protect-char-alist (("&" . "&"))
> 
> Yes, no quote needed.  Thanks Nick for correcting me.
> 
> -- 
>  Bastien


Also I found a bug in that version of org-mode. How do I report it or
should I report it because it's a development version?

There seems to be a problem with the escape character @. Anytime the
preceding character is *NOT* a white space (including non-breaking
space), the export breaks. 

This wasn't a problem before in 7.3.

In 7.3, this code exports fine:

  point @A@
   ^
   |
 non-breaking space

It exports to:

  point A

In the development version, that code snippet exports to:

  point @A

not at all what's intended

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Insert ampersand in HTML export?

On Fri, 18 Feb 2011 10:04:52 +0100
Bastien  wrote:

> Nick Dokos  writes:
> 
> > #+BIND: org-export-html-protect-char-alist (("&" . "&"))
> 
> Yes, no quote needed.  Thanks Nick for correcting me.
> 
> -- 
>  Bastien


OK, finally tried it out. Unfortunately, while the variable works, it doesn't 
stay local---if you include the file in SETUPFILE, the variable also applies to 
that file. 

Is there a way to make sure that variable stays local?

Ex:

macro.org

  #+BIND: org-export-html-protect-char-alist (("&" . "&"))
  #+MACRO: test & should stay as is

macro-import.org

  ##+SETUPFILE: macro.org

  * Hello World
  This & should receive the amp treatment. But doesn't.
  {{{test}}}


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Insert ampersand in HTML export?

On Thu, 17 Feb 2011 04:24:58 +0100
Bastien  wrote:

> Hi uriel,
> 
> Uriel Avalos  writes:
> 
> > #+BIND: org-export-html-protect-char-alist '("&" . "&")
> >
> > That's telling me I'm using the "wrong type argument: listp, quote"
> 
> It must be this:
> 
> #+BIND: org-export-html-protect-char-alist '(("&" . "&"))
> 
> The "-alist" suffix means it should be an alist -- see the Info node for
> Association lists in the Elisp manual.
> 
> -- 
>  Bastien
> 
> ___
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Nope. It still doesn't work. This is my test file:

   #+BIND: org-export-html-protect-char-alist '(("&" . "&"))
   #+MACRO test & should stay as is

   Hello world & 

I get the same error when I try to export: "wrong type argument: listp, quote"

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Insert ampersand in HTML export?

On Mon, 14 Feb 2011 01:04:16 +0100
Bastien  wrote:

> Uriel Avalos  writes:
> 
> > So this new variable is in the bleeding edge version of org-mode? 
> 
> Yes it is.
> 
> > Will download and test. Thanks
> 
> Thanks,
> 
> -- 
>  Bastien
> 
> ___
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Just installed the latest bleeding edge version of org.

How do I set that variable using BIND?

Recall, the goal is to export & to itself:

#+BIND: org-export-html-protect-char-alist '("&" . "&")

That's telling me I'm using the "wrong type argument: listp, quote"

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Insert ampersand in HTML export?

On Sun, 13 Feb 2011 10:10:13 +0100
Bastien  wrote:

> Hi Uriel,
> 
> Uriel Avalos  writes:
> 
> > What about some type of escape character like \&? That way \& is
> > exported as & instead of & or \$. Would that work?
> 
> Handling escape characters is quite tricky, I'd better not go that way.
> 
> > org-export-html-protect-char-alist may work in my case---the MATHML
> > macros are in a seperate #+SETUPFILE. As long as this variable doesn't
> > "bubble up" i.e., apply to the file that calls #+SETUPFILE, then it
> > will work.
> 
> Please tell me if it works.
> 
> Thanks!
> 
> -- 
>  Bastien
> 
> ___
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

So this new variable is in the bleeding edge version of org-mode? Will download 
and test. Thanks

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Insert ampersand in HTML export?

On Sat, 12 Feb 2011 16:24:23 +0100
Bastien  wrote:

> Hi Carsten,
> 
> Carsten Dominik  writes:
> 
> >> But I added a new variable `org-export-html-protect-char-alist'
> >> to allow fine tuning of what characters should be HTML proected.
> >
> > Can't we just use =&= or something like this?
> 
> For now =&= will be exported as &
> 
> Do you mean that everything within =...= should not go through
> `org-html-protect'?
> 
> And if so, that org-export-html-protect-char-alist might not be
> necessary anymore?
> 
> 
> PS: Well, I thought about this but couldn't solve Uriel's problem 
> this way...
> 
> -- 
>  Bastien
> 
> ___
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

What about some type of escape character like \&? That way \& is
exported as & instead of & or \$. Would that work?

org-export-html-protect-char-alist may work in my case---the MATHML
macros are in a seperate #+SETUPFILE. As long as this variable doesn't
"bubble up" i.e., apply to the file that calls #+SETUPFILE, then it
will work.

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Insert ampersand in HTML export?

On Fri, 11 Feb 2011 09:34:08 +0100
Carsten Dominik  wrote:

> 
> On Feb 10, 2011, at 9:25 PM, Uriel Avalos wrote:
> 
> > How do you insert the actual & character in an HTML export?
> >
> > I'm trying to write a macro to insert a MATHML snippet but org-mode  
> > converts & to &.
> >
> > How can I prevent that behavior?
> 
> Hi Uriel,
> 
> do you really want everyone here to construct their own test case for  
> this?
> 
> Please provide an example file with the macro definition and its
> use to make it as easy as possible for someone to try it out and fix it.
> 
> Thanks
> 
> - Carsten
> 

Look, there isn't really a "test" case. I'm just asking if this feature is 
available.
The docs just say that & exports to & in HTML export and \$ in latex 
export. 
I'm asking if there's a way to disable that feature on a case-by-case basis 
i.e., 
I want & to export to & in HTML export for some situations. Hope that's clear 
enough.

Here's a test macro:

#+MACRO: ANG @@@&x2220;@@$1@@@/math>

This should be "angle $1". The MATML snippet works fine in a HTML file in 
firefox linux but the macro does not. I get this in the HTML export:

  & #x2220;   ...   

& gets incorrectly converted to &

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Insert ampersand in HTML export?

How do you insert the actual & character in an HTML export?

I'm trying to write a macro to insert a MATHML snippet but org-mode converts & 
to &.

How can I prevent that behavior?

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: Keep URLs from automagically turning into links in HTML export?

On Mon, 13 Dec 2010 16:53:55 +0100
Giovanni Ridolfi  wrote:

> Oscar Carlsson  writes:
> 
> Uriel, if you reply please, CC the list,:
> 
> emacs-orgmode@gnu.org
> 
> I sent a reply to Oscar's post to the list, but Oscar did not 
> include you :-/, that's why I'm writing directly to you.
> 
> > Uriel Avalos  writes:
> >. 
> >> Suppose you have the following org file:
> >>, 
> >> * Hello World
> >> http://testlink.com
> >>
> >> How do you keep that URL from auto-magically turning into an HTML
> >> anchor (http://testlink.com>http://testlink.com) in the
> >> export?
> >>
> > In case I would only want the URL like it is, I would monospace it, like
> > =http://testlink.com=. I like to keep it simple.
> 
> [[ ][http://testlink.com]] 
> exports as:
> 
> http://testlink.com
> 
> Giovanni

Thanks for the reply.

Actually, is there some (per file) setting that disables that feature
all together? The context is a mathML macro that has a URL in the attribute:

#MACRO: mathml @http://www.w3.org/1998/Math/MathML";>

I could use a BEGIN_HTML block but these are meant to be inline, so I have to 
use @ to escape the html. Unfortunately, the above macro gets exported as

@$lt;math xmlns="http://...";>http://">

which is not the intended result. 

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Keep URLs from automagically turning into links in HTML export?

Suppose you have the following org file:

* Hello World
http://testlink.com

How do you keep that URL from auto-magically turning into an HTML anchor (http://testlink.com>http://testlink.com) in the export?

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Generate list of all tags in use?

Thanks for the reply and the code.

No I hadn't seen that post. What would also be awesome is that when you click 
on one of the tags in the generated list, it launches a search for all 
headlines with that tag (C-c C-o with the cursor on a tag). 

Unfortunately, I'm not a lisp programmer (yet).

On Wed, 08 Dec 2010 18:32:12 -0500
Matt Lundin  wrote:

> Uriel Avalos  writes:
> 
> > That's a start but not quite what I was looking for. First, I thinking
> > of a global tag list. Second, I was thinking in terms of some kind of
> > agenda view. That function just ouputs the buffer tags in the
> > mini-buffer at the bottom.
> 
> Did you see this post?
> 
> http://permalink.gmane.org/gmane.emacs.orgmode/34069
> 
> - Matt

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: Generate list of all tags in use?

That's a start but not quite what I was looking for. First, I thinking
of a global tag list. Second, I was thinking in terms of some kind of
agenda view. That function just ouputs the buffer tags in the
mini-buffer at the bottom.

On Wed, 24 Nov 2010 19:15:17 -0800
Richard Lawrence  wrote:

> Hi Uriel,
> 
> > Is there a way to generate a list of all tags in use in all agenda files?
> > I'm thinking of something like a tag cloud. 
> 
> Would org-get-buffer-tags help you out?
> 
> Richard
> 
> 
> ___
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Generate list of all tags in use?

Is there a way to generate a list of all tags in use in all agenda files?
I'm thinking of something like a tag cloud. 

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: Automatic global tag list?

Thanks. That did the trick. I found that I also had to disable 
org-use-fast-tag-selection. For some reason, with that set to t or
auto, I couldn't select from the global tag list.

On Wed, 24 Nov 2010 09:38:26 +0100
Sébastien Vauban  wrote:

> Hi Matt,
> 
> Matt Lundin wrote:
> > Have you tried the following setting?
> >
> > (setq org-complete-tags-always-offer-all-agenda-tags t)
> >
> >> BTW, where is the documentation? I'm using orgmode 7.03, perhaps it's
> >> not documented there?
> >
> > C-h f org-global-tags-completion-table.
> 
> C-h v org-complete-tags-always-offer-all-agenda-tags says:
> 
> ,
> | org-complete-tags-always-offer-all-agenda-tags is a variable defined in 
> `org.el'.
> | Its value is nil
> | 
> | Documentation:
> | If non-nil, always offer completion for all tags of all agenda files.
> | Instead of customizing this variable directly, you might want to
> | set it locally for remember buffers, because there no list of
> | tags in that file can be created dynamically (there are none).
> | 
> |   (add-hook 'org-remember-mode-hook
> | (lambda ()
> |   (set (make-local-variable
> | 'org-complete-tags-always-offer-all-agenda-tags)
> |t)))
> | 
> | You can customize this variable.
> | 
> | [back]
> `
> 
> (didn't know about that var)
> 
> You see that one should sed 's/remember/capture/g'.
> 
> --8<---cut here---start->8---
> --- INDEX:/lisp/org.el
> +++ WORKDIR:/lisp/org.el
> @@ -2732,10 +2732,10 @@ To disable these tags on a per-file basis, insert 
> anywhere in the file:
>  (defcustom org-complete-tags-always-offer-all-agenda-tags nil
>"If non-nil, always offer completion for all tags of all agenda files.
>  Instead of customizing this variable directly, you might want to
> -set it locally for remember buffers, because there no list of
> +set it locally for capture buffers, because there no list of
>  tags in that file can be created dynamically (there are none).
>  
> -  (add-hook 'org-remember-mode-hook
> +  (add-hook 'org-capture-mode-hook
>  (lambda ()
>(set (make-local-variable
>  'org-complete-tags-always-offer-all-agenda-tags)
> --8<---cut here---end--->8---
> 
> It seems there are a lot more references to remember, but I'm not sure which
> can be safely removed.
> 
> Best regards,
>   Seb
> 
> -- 
> Sébastien Vauban
> 
> 
> ___
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Automatic global tag list?

On Tue, 23 Nov 2010 06:52:34 +0100
Carsten Dominik  wrote:

> 
> On Nov 23, 2010, at 1:30 AM, Uriel Avalos wrote:
> 
> > Is there a way to auto-magically construct the global tag list (org- 
> > tag-alist)?
> > That is, tags would get added to the global list as you add them.
> >
> > Alternatively, is there a way to construct the global list of all tags
> > in use (in the agenda files or given set of files)?
> 
> There is the function `org-global-tags-completion-table' which will  
> construct this list for the agenda files or for any other list of  
> files you are giving it.  For each of these files it will at the tags  
> defined in #+TAGS: lines as well as any other tags being used in that  
> file.
> 
> HTH
> 
> - Carsten
> 

Thanks for the reply. However, I'm afraid that I'm not (yet) a lisp
programmer. What would the definition of such a function look like?
This function seems to be undocumented.

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Bug: LaTeX fragments export to invalid XHTML

This is the sample file:

  * Hello world
  \begin{align*}
  x&=\frac{-b^2\pm\sqrt{b^2-4ac}}{2a}
  \end{align*}

When you validate the resulting HTML file at the w3c site
(http://validator.w3.org/check), it fails the check.

If you recall, when org-export-with-latex-fragments is set to dvipng,
it produces PNG images with the ALT attribute equal to the
corresponding LaTeX equation. In this case, the resulting IMG tag
is:



Apparently, you can't have unescaped & (ampersands) in an ALT tag.
Thus, the resulting HTML file fails to validate.

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Automatic global tag list?

Is there a way to auto-magically construct the global tag list (org-tag-alist)?
That is, tags would get added to the global list as you add them.

Alternatively, is there a way to construct the global list of all tags
in use (in the agenda files or given set of files)?


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Change DOCTYPE declaration?

On Thu, 18 Nov 2010 10:35:50 -0500
Uriel Avalos  wrote:

> On Wed, 17 Nov 2010 19:45:06 -0200
> Juan Pechiar  wrote:
> 
> > Yo can set variables on a per-file basis.
> > 
> > Check EXPORT OPTIONS on the manual. You can set variables there (but
> > not add hooks), so maybe something like this works:
> > 
> > #+begin_src emacs-lisp
> > 
> > ;; in your .emacs file:
> > 
> > (add-hook 'org-export-html-final-hook
> >   (lambda ()
> >(if ( (boundp 'uriel-change-doctype) )
> > 
> >(let ((kill-whole-line t))
> > (goto-char (point-min))
> > (next-line)
> > (kill-line 2)
> > (insert " > \"http://www.w3.org/TR/html4/strict.dtd\";>\n")
> > )
> >)
> >   )
> > 
> >   )
> > 
> > #+end_src
> > 
> > So the hook body will only execute if uriel-change-doctype is bound to
> > some value.
> > 
> > Then, on your document, include
> > 
> > #+BIND uriel-change-doctype t
> > 
> > Not tested, good luck!
> > 
> > .j.
> > 
> > 
> > On Wed, Nov 17, 2010 at 03:23:08PM -0500, Uriel Avalos wrote:
> > > Thanks for the reply. After some monkeying around, I found I could do 
> > > this:
> > >
> > > (add-hook 'org-export-html-final-hook
> > >   (lambda ()
> > >(let ((kill-whole-line t))
> > > (goto-char (point-min))
> > >   (next-line)
> > > (kill-line 2)
> > >   (insert " > > \"http://www.w3.org/TR/html4/strict.dtd\";>\n")
> > >   )
> > >  )
> > > )
> > >
> > > To undo it, I can call this:
> > >
> > > (setq org-export-html-final-hook nil)
> > >
> > > However, one question, the above sets the doctype GLOBALLY. Is there
> > > a way to do set this automagically per file? (I.e., some kind of
> > > file-specific export option)
> > >
> > > Juan Pechiar  wrote:
> > >
> > > > The DOCTYPE declaration is hardcoded inside org-html.el
> > > >
> > > > You may change it by defining a hook and modifying the generated HTML.
> > > > Have a look at the following message, where they get rid of the
> > > > declaration:
> > > >
> > > > http://lists.gnu.org/archive/html/emacs-orgmode/2010-06/msg00063.html
> > > >
> > > > you may add some 'insert' there with your own declaration.
> > > >
> > > > On Wed, Nov 17, 2010 at 01:04:09PM -0500, Uriel Avalos wrote:
> > > > > How do I change the doctype declaration?
> 
> Great. It's working like a charm. If uriel-change-doctype is not defined, it 
> leaves the doctype alone. Otherwise, it changes it. (Note that there's a 
> small typo in the code, an extra parentheses before var but it otherwise 
> works very well.) Thanks!
> 
> The only problem is that #+BIND is not working. I tried setting 
> org-export-allow-BIND to t and it still does not work. Ideas?
> 
> ___
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Nevermind, I forgot the : in #+BIND. DOH! It's working fine now. For the 
reference, here's what works:

In .emacs:

(add-hook 'org-export-html-final-hook
(lambda ()
 (if (boundp 'uriel-mathml-doctype)
 (let ((kill-whole-line t))
   (goto-char (point-min))
   (next-line)
   (kill-line 2)
   (insert "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd\";>\n")
   )
   )
 )
)

Then in the file:

#+BIND: uriel-mathml-doctype t

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Change DOCTYPE declaration?

On Wed, 17 Nov 2010 19:45:06 -0200
Juan Pechiar  wrote:

> Yo can set variables on a per-file basis.
> 
> Check EXPORT OPTIONS on the manual. You can set variables there (but
> not add hooks), so maybe something like this works:
> 
> #+begin_src emacs-lisp
> 
> ;; in your .emacs file:
> 
> (add-hook 'org-export-html-final-hook
>   (lambda ()
>(if ( (boundp 'uriel-change-doctype) )
> 
>(let ((kill-whole-line t))
> (goto-char (point-min))
>   (next-line)
> (kill-line 2)
>   (insert " \"http://www.w3.org/TR/html4/strict.dtd\";>\n")
>   )
>  )
> )
> 
> )
> 
> #+end_src
> 
> So the hook body will only execute if uriel-change-doctype is bound to
> some value.
> 
> Then, on your document, include
> 
> #+BIND uriel-change-doctype t
> 
> Not tested, good luck!
> 
> .j.
> 
> 
> On Wed, Nov 17, 2010 at 03:23:08PM -0500, Uriel Avalos wrote:
> > Thanks for the reply. After some monkeying around, I found I could do this:
> >
> > (add-hook 'org-export-html-final-hook
> >   (lambda ()
> >(let ((kill-whole-line t))
> > (goto-char (point-min))
> > (next-line)
> > (kill-line 2)
> > (insert " > \"http://www.w3.org/TR/html4/strict.dtd\";>\n")
> > )
> >)
> >   )
> >
> > To undo it, I can call this:
> >
> > (setq org-export-html-final-hook nil)
> >
> > However, one question, the above sets the doctype GLOBALLY. Is there
> > a way to do set this automagically per file? (I.e., some kind of
> > file-specific export option)
> >
> > Juan Pechiar  wrote:
> >
> > > The DOCTYPE declaration is hardcoded inside org-html.el
> > >
> > > You may change it by defining a hook and modifying the generated HTML.
> > > Have a look at the following message, where they get rid of the
> > > declaration:
> > >
> > > http://lists.gnu.org/archive/html/emacs-orgmode/2010-06/msg00063.html
> > >
> > > you may add some 'insert' there with your own declaration.
> > >
> > > On Wed, Nov 17, 2010 at 01:04:09PM -0500, Uriel Avalos wrote:
> > > > How do I change the doctype declaration?

Great. It's working like a charm. If uriel-change-doctype is not defined, it 
leaves the doctype alone. Otherwise, it changes it. (Note that there's a small 
typo in the code, an extra parentheses before var but it otherwise works very 
well.) Thanks!

The only problem is that #+BIND is not working. I tried setting 
org-export-allow-BIND to t and it still does not work. Ideas?

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Change DOCTYPE declaration?

Thanks for the reply. After some monkeying around, I found I could do this:

(add-hook 'org-export-html-final-hook
  (lambda ()
   (let ((kill-whole-line t))
(goto-char (point-min))
(next-line)
(kill-line 2)
(insert "http://www.w3.org/TR/html4/strict.dtd\";>\n")
)
   )
  )

To undo it, I can call this:

(setq org-export-html-final-hook nil)

However, one question, the above sets the doctype GLOBALLY. Is there a way to 
do set this automagically per file? (I.e., some kind of file-specific export 
option)


On Wed, 17 Nov 2010 16:34:27 -0200
Juan Pechiar  wrote:

> Hi,
> 
> The DOCTYPE declaration is hardcoded inside org-html.el
> 
> You may change it by defining a hook and modifying the generated HTML.
> Have a look at the following message, where they get rid of the
> declaration:
> 
> http://lists.gnu.org/archive/html/emacs-orgmode/2010-06/msg00063.html
> 
> you may add some 'insert' there with your own declaration.
> 
> Regards,
> .j.
> 
> On Wed, Nov 17, 2010 at 01:04:09PM -0500, Uriel Avalos wrote:
> > How do I change the doctype declaration?
> >
> > Is there an export option or variable I can set? I tried searching
> > for the variable. Perhaps I'm using a version of orgmode that's too
> > old?
> >
> > The only thing I could find was org-export-html-xml-declaration but
> > that's not the same thing.

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Change DOCTYPE declaration?

How do I change the doctype declaration?

Is there an export option or variable I can set? I tried searching for the 
variable. Perhaps I'm using a version of orgmode that's too old?

The only thing I could find was org-export-html-xml-declaration but that's not 
the same thing.

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Export literally but convert math equations?

It would be nice to have that feature available as an option :-) Or is there a 
way to preserve whitespace in other blocks? I set the variable 
org-src-preserve-indentation for SRC blocks but that had no effect.

I'm typing up an HTML doc with lots of (simple) math. However, I'm trying to 
avoid using latex as much as possible. I thus need a way to align equations 
(incidentally, whitespace is good enough). 

Why not use latex/tex? Because I work for a publisher that uses MathType. And 
unfortunately, the current version of MathType is buggy when it comes to 
converting latex/tex, so I need to minimize it's use. 

Thanks for the reply!

--Uriel

On Fri, 28 May 2010 17:36:00 +0200
Carsten Dominik  wrote:

> 
> On May 28, 2010, at 5:32 PM, Uriel Avalos wrote:
> 
> > Is there a way to convert latex equations and math inside of EXAMPLE  
> > and HTML blocks?
> 
> 
> Well, the whole idea of example blocks is to *not* do this.  What is  
> the application for this?
> 
> - Carsten
> 
> >
> > For example, I would like to the following equation to display as an  
> > equation in the HTML:
> >
> > #+BEGIN_EXAMPLE
> >   Hello world
> >   $2^2+\sqrt(2) = 2$
> > #+END_EXAMPLE
> >
> > The current behavior just gives me the literal example. I would use  
> > other blocks (like BLOCKQUOTE); except that I need to preserve the  
> > extra whitespace.
> >
> > Alternatively: is there a way to preserve whitespace in the HTML  
> > export?--
> > --Thanks!
> > Uriel
> >
> > ___
> > Emacs-orgmode mailing list
> > Please use `Reply All' to send replies to the list.
> > Emacs-orgmode@gnu.org
> > http://lists.gnu.org/mailman/listinfo/emacs-orgmode
> 
> - Carsten
> 
> 
> 


-- 
--Thanks!
Uriel

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Export literally but convert math equations?

Is there a way to convert latex equations and math inside of EXAMPLE and HTML 
blocks?

For example, I would like to the following equation to display as an equation 
in the HTML:

#+BEGIN_EXAMPLE
   Hello world
   $2^2+\sqrt(2) = 2$
#+END_EXAMPLE

The current behavior just gives me the literal example. I would use other 
blocks (like BLOCKQUOTE); except that I need to preserve the extra whitespace. 

Alternatively: is there a way to preserve whitespace in the HTML export?-- 
--Thanks!
Uriel

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Org-mode and appt

Hi all, I've been following the blog post below, to get popups for org 
appointments via appt. 

http://emacs-fu.blogspot.com/2009/11/showing-pop-ups.html

The notifications are working fine on my system. However, I have a question 
about appt. I noticed (1) if two appointments are scheduled for the same time 
(in the same file), appt only reports the first one it encounters. It doesn't 
warn you about the other. (2) Say, you set appt to warn you 15 minutes before. 
It won't report any appointments within 15 minutes of the first appointment it 
encounters. Ex: say your org file is this:

* TODO Test
  DEADLINE: <2010-04-16 Fri 15:20>
* TODO Test 2
  DEADLINE: <2010-04-16 Fri 15:22>

You won't receive a warning for Test 2. 

Is there any way to make appt report appointments scheduled at the same time? 
Is there way to fix #2?

-- 
--Thanks!
Uriel


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Pure CSS in HTML export?

Hi. I just noticed that when I export a file to HTML, certain things are 
hardcoded into the HTML (like table borders and cellpadding). Is there a way to 
disable that feature globally? I would rather use CSS to style my tables...

-- 
--Thanks!
Uriel


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Renumber HTML ordered lists from org-mode?

In HTML, one way of renumbering OL lists is to use "start". (Ex: ... restarts the numbering at 13.) 

Is there anyway to do that from within org-mode without hacking the
exported HTML file? 

Is there a +ATTR_HTML:  planned for OL and UL lists?


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] How to insert apostrophe (') into code and verbatim text?

So I guess it's too complicated for the gurus. :-)

I'm already doing '=life= but I thought perhaps there was a quick hack to get 
='life= to work. Oh well, not a biggie, life moves on...

On Thu, 04 Feb 2010 11:53:30 -0500
Nick Dokos  wrote:

> Uriel Avalos  wrote:
> 
> > Here's an easy one for the guru's, why does an apostrophe at the beginning 
> > of a =code= not work? When I export the following text to HTML, the "'life" 
> > variable isn't set as code (and the = symbols show up):
> > 
> > Select ='life= for the x variable.
> > 
> > If I escape the apostrophe, I course get back the escape character in the 
> > HTML:
> > 
> > Select =\'life= for the x variable.
> > 
> 
> Emphasis is applied by matching against a regular expression stored in the 
> variable
> org-emph-re. I get
> 
> ,
> | org-emph-re is a variable defined in `org.el'.
> | Its value is 
> | "\\([   ('\"{]\\|^\\)\\(\\([*/_=~+]\\)\\([^ 
> \n,\"']\\|[^  
> \n,\"'].*?\\(?:\n.*?\\)\\{0,1\\}[^
> \n,\"']\\)\\3\\)\\([- .,:!?;'\")}\\]\\|$\\)"
> | 
> | Documentation:
> | Regular expression for matching emphasis.
> `
> 
> which is way too complicated for my simple mind to wrap around without
> some guidance. But the doc for org-export-with-emphasize says:
> 
> ,
> | org-export-with-emphasize is a variable defined in `org-exp.el'.
> | Its value is t
> | 
> | Documentation:
> | Non-nil means, interpret *word*, /word/, and _word_ as emphasized text.
> | If the export target supports emphasizing text, the word will be
> | typeset in bold, italic, or underlined, respectively.  Works only for
> | single words, but you can say: I *really* *mean* *this*.
> | Not all export backends support this.
> | 
> | This option can also be set with the +OPTIONS line, e.g. "*:nil".
> `
> 
> so *words* are emphasized[1].
> 
> Can you write
> 
>   Select '=life= for the x variable.
> 
> instead? The quote is not part of the  block, but does that
> make much difference? And if it does, a little postprocessing on the
> HTML might be all that is needed[2].
> 
> HTH,
> Nick
> 
> [1] although after staring at it for a while and with the hindsight
> provided by the org-export-with-emphasize doc, the part that goes [^  
> ^M\n,\"']
> specifically excludes spaces, tabs, carriage returns, newlines,
> commas, double quotes and single quotes as components of words.
> 
> [2] You might try changing the RE (it is constructed in
> org.el:org-set-emph-re()) - but regular expressions are very unforgiving
> beasts: you forget one character or add one too many and the whole thing
> goes to hell in a handbasket, faster than a bat out of hell - choose
> your own cliche' :-)


-- 
--Thanks!
Uriel


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] How to insert apostrophe (') into code and verbatim text?

Here's an easy one for the guru's, why does an apostrophe at the beginning of a 
=code= not work? When I export the following text to HTML, the "'life" variable 
isn't set as code (and the = symbols show up):

Select ='life= for the x variable.

If I escape the apostrophe, I course get back the escape character in the HTML:

Select =\'life= for the x variable.

-- 
--Thanks!
Uriel


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Agenda not working or am I misunderstanding how it works?


Ah... that was the problem. I updated Emacs to a more recent version. I'm now 
running version 6.30c of org-mode. The problem went away, all is well now. 
Thanks for your help.

On Sat, 05 Dec 2009 13:44:09 -0500
Matt Lundin  wrote:

> Uriel Avalos  writes:
> 
> > Thanks for replying. I tried that before as well... Restarted emacs and
> > C-c C-c on the line. I think I figured out what's going on... it may be
> > a bug!
> >
> > If I have this simple file:
> >
> > #+SEQ_TODO: TODO WAITING | PUBLISHED REJECTED
> > * PUBLISHED test
> >   DEADLINE: <2009-12-05 Sat>
> >
> > it works! (It doesn't show up in the agenda.) However, if I put the
> > completed TODO item under a subheading, it stops working! The following
> > simple file doesn't work:
> >
> > #+SEQ_TODO: TODO WAITING | PUBLISHED REJECTED
> > * [2009-12-05 Sat]
> > ** PUBLISHED test
> >   DEADLINE: <2009-12-05 Sat>
> 
> I can't replicate this. In neither case does the todo item appear in the
> agenda. 
> 
> > The test TODO item shows up in the agenda. Is this a bug? I'm using
> > Emacs 23.0.0.1 on Windows and whatever version of org-mode that came
> > with it -- 5.03b
> 
> That's a very old version of org-mode. Emacs 23 shipped with version
> 6.21b. Could you confirm your version of org-mode by typing "M-x
> org-version".
> 
> - Matt
> 
> 


-- 
--Thanks!
Uriel


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Install orgmode alongside older version?

I'm running NTemacs. I thought it was a "bleeding" edge version but it is 
apparantly running an old version of orgmode (5.03b). How can I install the 
latest version? Can I follow the official docs? The docs seem to assume that 
orgmode is *not* installed on your system. If I add a load-path, will that 
overwrite the old orgmode installed on my system?

-- 
--Thanks!
Uriel


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Agenda not working or am I misunderstanding how it works?

Thanks for replying. I tried that before as well... Restarted emacs and
C-c C-c on the line. I think I figured out what's going on... it may be
a bug!

If I have this simple file:

#+SEQ_TODO: TODO WAITING | PUBLISHED REJECTED
* PUBLISHED test
  DEADLINE: <2009-12-05 Sat>

it works! (It doesn't show up in the agenda.) However, if I put the
completed TODO item under a subheading, it stops working! The following
simple file doesn't work:

#+SEQ_TODO: TODO WAITING | PUBLISHED REJECTED
* [2009-12-05 Sat]
** PUBLISHED test
  DEADLINE: <2009-12-05 Sat>

The test TODO item shows up in the agenda. Is this a bug? I'm using
Emacs 23.0.0.1 on Windows and whatever version of org-mode that came
with it -- 5.03b

 On Fri, 4 Dec 2009 17:00:17 +0100
Carsten Dominik  wrote:

> Hi U,
> 
> my guess is that you did type these keyword but that you did not
> update the internal keyword lists by restarting Emacs, or by
> pressing `C-c C-c' on the line.
> 
> - Carsten
> 
> On Dec 4, 2009, at 4:01 PM, U Avalos wrote:
> 
> > Someone suggested I use the variable
> > org-agenda-skip-deadline-if-done. It works on "standard" org files
> > using the default todo keywords -- if I give
> > a TODO item a deadline and then set it to DONE, it doesn't show up  
> > in agenda.
> > Yay!
> >
> > HOWEVER, if I use custom todo keywords per file, it stops working  
> > for that
> > file. I'm using these keywords:
> >
> > #+SEQ_TODO: TODO WAITING | PUBLISHED REJECTED
> >
> > Todo items set to PUBLISHED and REJECTED still show up in the  
> > agenda. Any
> > ideas?
> >
> > On Wednesday 25 November 2009 11:54:19 U Avalos wrote:
> >> I have the following completed todo item:
> >>
> >> ** DONE pay Yolanda
> >>   DEADLINE: <2009-11-24 Tue> CLOSED: [2009-11-25 Wed 11:18]
> >>
> >> Yet it still appears in the weekly agenda. Is it not working
> >> right or is
> >> that how it's supposed to work?
> >>
> >> Also, when I hit C-c C-w (show deadlines in current buffer), I
> >> get ALL todo
> >> items, even completed items that are really old. Restricting it  
> >> with a
> >> numeric prefix (ex: Esc 5 C-c C-w), doesn't work either. I just
> >> get all
> >> items plus or minus the number of days.
> >>
> >>
> >> ___
> >> Emacs-orgmode mailing list
> >> Please use `Reply All' to send replies to the list.
> >> Emacs-orgmode@gnu.org
> >> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
> >
> >
> >
> > ___
> > Emacs-orgmode mailing list
> > Please use `Reply All' to send replies to the list.
> > Emacs-orgmode@gnu.org
> > http://lists.gnu.org/mailman/listinfo/emacs-orgmode
> 
> - Carsten
> 
> 
> 



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode