Re: [O] Drupal syntax on html-export for image links

2012-05-27 Thread Nicolas Goaziou
Hello,

William Crandall bc3141...@gmail.com writes:

 Is it true that:

 1. The org-export Package is a Generic Export Engine
and is intended to support a new generation of
org export tools (to HTML, LaTeX, ODT, etc).

Correct.

 2. It is now an experimental Contributed Package:
http://orgmode.org/worg/org-contrib

Correct.

 3. The current (old) export command (C-c C-e) executes
a function called org-export in org-exp.el (line 943)
but it is not related to the new org-export package.

Correct.

 4. API documentation for the new org-export, and it's family
(org-e-ascii.el, org-e-html.el, org-e-latex.el, org-e-odt.el
org-e-publish.el org-element.el), is here:
http://orgmode.org/worg/org-api/

Correct, but be warned that some functions in org-exp.el use org-export-*
prefix and might be found under org-export section.

 5. Documentation for back-end developers working on new
export tools is here:
http://orgmode.org/worg/dev/org-export-reference.html

Correct.

 6. Current org tutorials describe the old tool set, e.g.,
Publishing Org-mode files to HTML, not the new:
http://orgmode.org/worg/org-tutorials/org-publish-html-tutorial.html

Correct.

 7. No end-user documentation for the org-export package
has been created, describing for example, how to link
to an external CSS file (as #+STYLE used to work).

Correct.

 8. The Manual does not (yet) document the org-export package:
http://orgmode.org/manual/index.html

Correct.

 9. This mailing list is the best place to ask questions.

Correct.



 Turning to my immediate challenge, exporting to html,
 I have some questions ( M-x org-export-dispatch h ):

Since I don't maintain `e-html' back-end, I'll only answer partially.

 5. Removing Pre- and Postamble

 What now works like:

(setq org-export-html-preamble nil)
(setq org-export-html-postamble nil)

 Now, there is no preamble.

 The postamble is:

div id=postamble
p class=date Date: 2012-05-26 20:59:51 Pacific Daylight Time /p
p class=author Author : William BC Crandall/p
p class=creator Generated by Org mode 7.8.11 in Emacs 24.1.50.1. /p
   a href=http://validator.w3.org/check?uri=referer;Validate XHTML
 1.0/a
/div

 I'd like to remove both.

You may have a look at `org-e-html-preamble' and `org-e-html-postamble'
variables.

 --


 6. Special strings

 I was able to get a TM (trade) in the old system with:

 (eval-after-load org
   '(setq org-export-html-special-string-regexps
  (append org-export-html-special-string-regexps
  '((-TM- . trade;)

 How now?

You can add a filter to plain text objects, which will only be applied
to `e-html' back-end:

#+begin_src emacs-lisp
(defun my-html-trademark-markup (text backend info)
  (if (not (eq back-end 'e-html)) text
(replace-regexp-in-string -TM- trade; text)))

(add-to-list 'org-export-filter-plain-text-functions
 'my-html-trademark-markup)
#+end_src

Though, I would suggest to use entity \trade instead.


Regards,

-- 
Nicolas Goaziou



Re: [O] Code for feature for showing progress in lisp code for creation of Gantt charts

2012-05-27 Thread Sean O'Halpin
On Fri, May 25, 2012 at 8:49 AM,  julia.jacob...@arcor.de wrote:

 Thanks for your answer. The key-combination C-c C-c unfortunately creates the 
 new additional block of code surrounded by the lines
 #+RESULTS:
 #+begin_latex
  Here's the created LaTeX code
 #+end_latex
 right after the lisp function.

 This code block has to be moved just before the line beginning with
 #+   \\draw...
 to get the order right again.

 I tried to include the results of the evaluation of the lisp function there 
 by placing
 #+RESULTS: elispgantt
 there (because there's a line saying #+source: elispgantt), but for unknown 
 reasons,
 the results of code evaluation are always placed just after the elispgantt 
 function.
 Any help to fix that is appreciated.

Use

  #+name: elispgantt

instead of

  #+source: elispgantt

I've tried it with your example and it works. AFAIR #+source was
deprecated a while ago.

Regards,
Sean



Re: [O] Variable `org-mobile-directory` must point to an existing directory. Multiplatform setup, howto

2012-05-27 Thread Ian Barton

On 26/05/12 20:00, Orlando López D. wrote:

I configured emacs org-mode on a Mac, working properly, having my org
files and MobileOrg file within my DropBox folder ( ~/DropBox/ ).

Now, I will like to get my emacs setup working properly on my Windows
box. I have been able to get it working in terms of reading my .emacs
file and emacs.d folder, shared through simlink config.

Everything seems to be working properly, except that when I  want to
execute org-mobile-pull or org-mobile-push on Windows, I get the
following error: Variable `org-mobile-directory` must point to an
existing directory 

The problem seems to be that emacs isn't configured to read or point to
the org-mobile directory , per the paths set in .emacs (eg. =
~/DropBox/ ...).



Running on Linux I found I needed the following in my .emacs:

(setq org-directory ~/dropbox/org/org_files)
(setq org-mobile-directory ~/dropbox/MobileOrg)
(setq org-mobile-inbox-for-pull 
~/dropbox/org/org_files/tasks/org_inbox.org)


Have you got all these set? Somewhere there is a possible bug where a 
misleading error message gets displayed referring to 
org-mobile-directory, when it means org-directory. I keep meaning to try 
and track it down.


Ian.



Re: [O] Drupal syntax on html-export for image links

2012-05-27 Thread Jambunathan K

The exporter is new.  Needless to say there are bugs, known and
unknown. (Think, Rome wasn't built in a day)

I have fixed few things.  I will respond later for unresolved other
things in your list.

 7. No end-user documentation for the org-export package
    has been created, describing for example, how to link
    to an external CSS file (as #+STYLE used to work).

This is fixed now.  

 8. The Manual does not (yet) document the org-export package:
    http://orgmode.org/manual/index.html

The new exporter should behave exactly the same way as the old one.
Otherwise, it is a bug.

For all practical purposes, 
  M-x customize-group RET org-export-e-html RET 
should suffice.

Note that the defcustoms have `org-e-html-' as prefix. (Note the e in
e-html)

 1. UTF-8

 How can I change the encoding, which defaults to:

Use `org-e-html-coding-system'.

 --

 2. CSS

 I used to link to an external style file thus:

    #+STYLE: link rel=stylesheet type=text/css href=css/
 about.css /

 What syntax works now?

This is fixed.

 5. Removing Pre- and Postamble

 What now works like:

    (setq org-export-html-preamble nil)
    (setq org-export-html-postamble nil)

 Now, there is no preamble.

 The postamble is:

    div id=postamble
    p class=date Date: 2012-05-26 20:59:51 Pacific Daylight Time
 /p
    p class=author Author : William BC Crandall/p
    p class=creator Generated by Org mode 7.8.11 in Emacs
 24.1.50.1. /p
   a href=http://validator.w3.org/check?uri=referer;Validate
 XHTML 1.0/a
    /div

 I'd like to remove both.

Use `org-e-html-preamble' and `org-e-html-postamble'.


 --


 6. Special strings

 I was able to get a TM (trade) in the old system with:

 (eval-after-load org
   '(setq org-export-html-special-string-regexps
      (append org-export-html-special-string-regexps
          '((-TM- . trade;)

 How now?

Nicolas has responded to this question.

FYI, `org-export-html-special-string-regexps' becomes
`org-e-html-special-string-regexps'.



 3. Configuring paths to images

    #+ATTR_HTML: alt=BC Crandall
    [[/sites/a.png]]

 Exports to:

    img src=g:/sites/a.png alt=BC Crandall//p

 One win; one fail.

 #+ATTR_HTML: works fine!

 But I'd like the path to be  img src=/sites/a.png ..
 without  g:


 --

 4. Paths to files

    [[/sites/my-file][My link]]

 Exports to:

    a href=file://g:/sites/my-fileMy link/a

 How can I keep the path as it was, and get this:

    a href=/sites/my-fileMy link/a

 without file://g:


 --


I will respond to 3 and 4 separately.  I need to look at this area
closely. (I know nothing about HTML or HTML exporter.)

What is g:/ here.  Is it the publishing directory or the current
directory.  Given that, does removing the leading g:/ a specific
requirement of yours or is it generally useful to anyone.



Re: [O] Drupal syntax on html-export for image links

2012-05-27 Thread Jambunathan K
 Since I don't maintain `e-html' back-end, I'll only answer partially.

I don't want to take over the maintainership of org-e-html.  

What I am saying is that, anyone with commit access to Orgmode - this
includes me - can fix or patch up org-e-html without it being routed via
me.

+1 to Bastien for recommending the use of org-e-html.
-- 



Re: [O] Drupal syntax on html-export for image links

2012-05-27 Thread William Crandall
Hello Nicolas and Jambunathan,

Many thanks, to you both, for such quick and detailed responses!

I look forward to checking things out later today.

And yes, +1 to Bastien for recommending!


Regarding your notes on image and file paths:

JK I will respond to 3 and 4 separately.  I need to look at
JK this area closely. (I know nothing about HTML or HTML exporter.)

JK What is g:/ here.  Is it the publishing directory or
JK the current directory.  Given that, does removing the leading
JK g:/ a specific requirement of yours or is it generally useful
JK to anyone.

The g:/ is a Windows artifact, indicating the  drive. On Unix
systems, root / is unique; on Windows there can be many drives
indicated by letters at the root (c:/, d:/, .. z:/). The most common
default for first hard disk is c:/, but other letters are often used.
http://en.wikipedia.org/wiki/Drive_letter_assignment

I think that it would be generally useful to be able to remove
the drive letter, so that c:/ or g:/ is transposed into just /
so that when the link-string is passed to a publishing system,
such as Drupal, it can easily digest it for further processing.

Thanks again for all your work on this!

-BC


On Sun, May 27, 2012 at 5:37 AM, Jambunathan K kjambunat...@gmail.comwrote:


 The exporter is new.  Needless to say there are bugs, known and
 unknown. (Think, Rome wasn't built in a day)


[. . .]


  3. Configuring paths to images
 
 #+ATTR_HTML: alt=BC Crandall
 [[/sites/a.png]]
 
  Exports to:
 
 img src=g:/sites/a.png alt=BC Crandall//p
 
  One win; one fail.
 
  #+ATTR_HTML: works fine!
 
  But I'd like the path to be  img src=/sites/a.png ..
  without  g:
 
 
  --
 
  4. Paths to files
 
 [[/sites/my-file][My link]]
 
  Exports to:
 
 a href=file://g:/sites/my-fileMy link/a
 
  How can I keep the path as it was, and get this:
 
 a href=/sites/my-fileMy link/a
 
  without file://g:
 
 
  --
 

 I will respond to 3 and 4 separately.  I need to look at this area
 closely. (I know nothing about HTML or HTML exporter.)

 What is g:/ here.  Is it the publishing directory or the current
 directory.  Given that, does removing the leading g:/ a specific
 requirement of yours or is it generally useful to anyone.



[O] (MobileOrg) automatic pulling

2012-05-27 Thread Dennis Yurichev
Hi.

This question is probably boring as... so excuse me in advance!
I want to run org-mobile-pull command after I turn on org-mode in emacs.
I wrote this in emacs config:

(defun org-my()
(interactive)
(find-file R:/Dropbox/orgmode/agenda.org)
(org-mobile-pull)
)

But org-mobile-pull can't work, probably because buffer is not yet created?

=
Debugger entered--Lisp error: (error Selecting deleted buffer)
  org-mobile-move-capture()
  org-mobile-pull()
  org-my()
  call-interactively(org-my t nil)
  execute-extended-command(nil)
  call-interactively(execute-extended-command nil nil)
=

What should I do?

GNU Emacs 23.4.1 (i386-mingw-nt6.1.7601)



[O] help with org-mobile-push

2012-05-27 Thread Madan Ramakrishnan
Hello all!

I'm trying to get the MobileOrg app working on my iPhone.  I've followed
the instructions at
http://mobileorg.ncogni.to/doc/getting-started/using-dropbox/; for sanity
checking purposes here are the values of the vars referenced there:

org-directory: ~/Dropbox/org/
org-mobile-inbox-for-pull: ~/Dropbox/org/inbox.org
org-mobile-directory: ~/Dropbox/MobileOrg/

I've run the MobileOrg app on my phone, linked to Dropbox (setting the
index file to /MobileOrg/index.org -- not sure if that's correct, but I
couldn't find any insight on what that value should be), and then from
emacs, run org-mobile-push. I see files created in the MobileOrg directory
in dropbox.  When I then go back to my phone and sync, I see nothing show
up in outlines.

Interestingly, syncing in the other direction works just fine; if I create
a new capture, sync, and then run org-mobile-pull from emacs, the new note
ends up in inbox.org.  It's just the push functionality that I'm running
into trouble with.  The files in MobileOrg look correct to me, so my guess
is that org-mobile-push is working just fine, but I've misconfigured
something on the phone app side.

Thanks in advance for any insight that you folks can provide.

Madan R.


Re: [O] preview latex fragments

2012-05-27 Thread Nick Dokos
Nick Dokos nicholas.do...@hp.com wrote:

 Andreas Leha andreas.l...@med.uni-goettingen.de wrote:
 
 ...
   I experience a problem with the preview of latex fragments:  I can not
   change the foreground color (in org-format-latex-options).  On a dark
   background, the black fragments are barely visible.
  
  Actually, now I can again reproduce it.  The problem seems to be tikz:
  With tikz in the latex header, foreground is always black.  So probably
  more a LaTeX-issue?
  
  ...
 
  Can I make the foreground changing work even with tikz loaded in the
  latex document?
  
 
 I can reproduce it too, without tikz. I have a green-on-black setup but
 I think the underlying reason (at least in my case: Andreas's case might
 be different) is minted. I'm appending an org file with my
 investigation.
 
 Nick

 ... investigation elided...

 So either the production of the fragment is wrong or the production of
 the png from the fragment, probably the former. The latex code for the
 fragment follows. If I again do the latex/dvipng run by hand (with
 --shell-escape to accommodate minted) I get an all-black png. If I
 comment out minted, it works.
 
 #+BEGIN_SRC latex
 \documentclass{article}
 \usepackage[usenames]{color}
 \usepackage{amsmath}
 \usepackage[mathscr]{eucal}
 \pagestyle{empty} % do not remove
 \usepackage{minted}
 \usepackage[utf8]{inputenc}
 \usepackage[T1]{fontenc}
 % Package fixltx2e omitted
 \usepackage{graphicx}
 % Package longtable omitted
 % Package float omitted
 % Package wrapfig omitted
 \usepackage{soul}
 \usepackage{textcomp}
 \usepackage{marvosym}
 \usepackage{wasysym}
 \usepackage{latexsym}
 \usepackage{amssymb}
 % Package hyperref omitted
 \tolerance=1000
 % The settings below are copied from fullpage.sty
 \setlength{\textwidth}{\paperwidth}
 \addtolength{\textwidth}{-3cm}
 \setlength{\oddsidemargin}{1.5cm}
 \addtolength{\oddsidemargin}{-2.54cm}
 \setlength{\evensidemargin}{\oddsidemargin}
 \setlength{\textheight}{\paperheight}
 \addtolength{\textheight}{-\headheight}
 \addtolength{\textheight}{-\headsep}
 \addtolength{\textheight}{-\footskip}
 \addtolength{\textheight}{-3cm}
 \setlength{\topmargin}{1.5cm}
 \addtolength{\topmargin}{-2.54cm}
 \begin{document}
 \[
 2 + 2 = 4
 \]
 \end{document}
 
 #+END_SRC


I asked on comp.text.tex and Philipp Stephani provided the following
explanation (fragment2.tex is a simplified version of the above tex
file):

,
| nick nob...@nowhere.non writes:
| 
|  If I process the following file through latex and dvipng:
| 
| latex [--shell-escape] fragment2.tex
| dvipng -fg rgb 0 1 0 -bg rgb 0 0 0 -T tight -D 140\
|   -o fragment2.png fragment2.dvi
| 
|  I get a black blob as output if the \usepackage{minted} line
|  is included, but the expected image (a green-on-black 2 + 2 = 4),
|  ...
|  Is this a minted bug? a dvipng bug? both? neither?
| 
| It's a feature/unavoidable technical limitation.  A more minimal example
| that doesn't even require minted is
| 
| \documentclass{article}
| \usepackage{xcolor}
| \begin{document}
| a
| \end{document}
| 
| xcolor is loaded by minted, and it explicitly initializes the foreground
| color.  According to the dvipng man page,
| 
| -fg color_spec
|Choose foreground color for the images. *This option will be
|ignored if there is a foreground color \special in the DVI.*
| 
| So you should rather set the desired foreground color in the TeX file,
| that's less fragile.
| 
| -- 
| Philipp Stephani
`

So it might be worth thinking about doing that when previewing latex
fragments. I haven't tried anything out yet, but I thought I'd post this
for any intrepid souls who might like to experiment with it.

Nick





[O] Blank equation when exported to HTML using dvipng

2012-05-27 Thread Richard Stanton
Here's a very simple ORG file:



#+OPTIONS: LaTeX:dvipng

* Test file
\begin{equation}
x=\sqrt{b}
\end{equation}   

--

When I export this to HTML (Org-mode version 7.8.11 (release_7.8.11-12-gc55405 
@ c:/emacs/site-lisp/org-mode/lisp/)), the equation comes out blank. 

The HTML file contains the following code:

img src=ltxpng/test_660c6efb146974e9d77e2de45f258385867ef389.png 
alt=\begin{equation}
x=\sqrt{b}
\end{equation}/

However, directory ltxpng is empty.

I'm running Emacs 24.0.97 under Windows Vista with MikTeX 2.09 installed and 
PATH set so that I can call pdflatex, dvipng, etc. from the command line just 
fine.

Any thoughts about what might be going wrong?