Re: [O] Exporting source code blocks as LaTeX figures

2013-05-19 Thread Thomas S. Dye
Aloha James,

James Harkins  writes:

> On Sat, May 18, 2013 at 3:39 PM, Nicolas Goaziou  wrote:
>> instead? I.e., why don't you apply caption to src block? You can tweak
>> the position of the caption with "captionpos" option in listings
>> environment.
>
> Wow, I hadn't thought of that. Actually that works better in a lot of ways.
>
> Then the next problem... I'm going to have some figures that need to
> span two columns. According to [1], I should use \begin{figure*} ...
> \end{figure*}. Is there a way to do that using a special block? (First
> guess, "#+BEGIN_figure*" causes the special block not to be
> recognized.) Or do I need to write the literal LaTeX code for that?
>

No, you don't need to write literal LaTeX code. See Section 12.7.4 of
the manual, which describes setting the :float attribute to
'multicolumn'.

hth,
Tom

-- 
Thomas S. Dye
http://www.tsdye.com



Re: [O] Exporting source code blocks as LaTeX figures

2013-05-19 Thread James Harkins
On Sat, May 18, 2013 at 3:39 PM, Nicolas Goaziou  wrote:
> instead? I.e., why don't you apply caption to src block? You can tweak
> the position of the caption with "captionpos" option in listings
> environment.

Wow, I hadn't thought of that. Actually that works better in a lot of ways.

Then the next problem... I'm going to have some figures that need to
span two columns. According to [1], I should use \begin{figure*} ...
\end{figure*}. Is there a way to do that using a special block? (First
guess, "#+BEGIN_figure*" causes the special block not to be
recognized.) Or do I need to write the literal LaTeX code for that?

hjh

[1] 
http://en.wikibooks.org/wiki/LaTeX/Floats,_Figures_and_Captions#Wide_figures_in_two_column_documents



[O] CDLaTeX (4.0) not working in Org mode (8.0.3)?

2013-05-19 Thread Omid
I see the following strange behavior from Org-CDLaTeX (OCDL).

Outside a * heading it works. Inside a * heading (or anything under that)
it does NOT work. What can be causing this?

Here is a minimal example:

# Org CDLaTeX (OCDL) works here (at least does not issue an error)
\[
x^2
\]

* heading
** subheading
   # Org CDLaTeX (OCDL) does NOT work here. Pressing ^ (caret) or _
   # (underscore) causes the following error to appear in *Messages*
   # buffer:
   #
   # call-interactively: Symbol's value as variable is void:
   # last-command-char
   \[
   x
   \]
   # Same error here.
   \begin{align*}
   x
   \end{align*}


Re: [O] #+ATTR_LaTeX no longer honoured

2013-05-19 Thread Eric Abrahamsen
Nicolas Goaziou  writes:

> Hello,
>
> Eric Abrahamsen  writes:
>
>> Paul Stansell  writes:
>>
>>> Hello,
>>>
>>> I've noticed that #+ATTR_LaTeX seems to be no longer honoured (I'm
>>> using release_8.0.3-133-ga5872)
>>>
>>> This is demonstrated for the attached org file.  It's the exact
>>> example from http://orgmode.org/manual/Images-in-LaTeX-export.html.
>>>
>>> I expect the exported latex file (C-c C-e l l) to contain something like
>>>
>>>   \includegraphics[width=5cm,angle=90]{./dummy.png}
>>>
>>> but I instead it contains
>>>
>>>   \includegraphics[width=.9\linewidth]{./dummy.png}
>>>
>>> Thanks,
>>>
>>> Paul
>>>
>>> PS. I'm using Emacs 24.2.1 and I tested with the minimal org-mode
>>> set-up from http://orgmode.org/manual/Feedback.html.
>>
>> I won't even attempt to give an overview of how attribute syntax has
>> changed/is changing, or explain why and how the manual is out of date,
>> but while we're waiting for someone else to do that, here's the line
>> you're looking for:
>>
>> #+ATTR_LaTeX: :width 5cm :options angle=90
>
> The manual is up-to-date (sections about HTML and ODT export may lag
> a bit behind), but the URL isn't. In particular, see:
>
>   http://orgmode.org/org.html#LaTeX-specific-attributes
>
>> Very briefly, I think attributes that may be common to multiple backends
>> are now given as eg :width or :height (with no equals sign before the
>> value), while attributes that are rarer or likely backend-specific are
>> stuffed into one :options attribute, with the keys/values written more
>> literally.
>
> AFAIK, :options is specific to latex back-end. Common attributes are set
> the usual way, i.e. with ":attribute value" syntax. Though it's
> impossible to recognize them all. So :options is handy to add raw
> arguments.
>
> Anyway, all attributes should be documented in the manual.

Sure enough, I should have just stopped with the working example!




[O] Org 8.0 HTML Export

2013-05-19 Thread Scott Randby
I'm working on switching to 8.0 and I'm having a few difficulties. I use
my own style sheet for web pages, and I figured out that I needed to
change #+STYLE: to #+HTML_HEAD: in order to use my style sheet. However,
I don't want to include the default style and the default script when I
export. I've been looking around in the ORG-NEWS file and the
documentation, but I don't see anything different than what I have now.
I have this in my init.el:

(setq org-export-html-style "")
(setq org-export-html-style-include-default nil)
(setq org-export-html-style-include-scripts nil)
(setq org-export-html-table-tag "")

What do I need to change?

Thanks,
Scott Randby



Re: [O] [patch] ox-koma-letter.el: clean-up/semantic bug [4/4]

2013-05-19 Thread Rasmus

It seems there are some semantic bugs in ox-koma-letter.el in that new
variables are introduces for SENDER (as opposed to AUTHOR) and a
separate email variable as well.  This seems like a semantic bug IMO.
This patch fixes these issues if they in fact are issues.

–Rasmus

-- 
And let me remind you also that moderation in the pursuit of justice
is no virtue
>From 0cb47f73c2e3579a78c2ae7e7d9777012f142f20 Mon Sep 17 00:00:00 2001
From: "rasmus.pank" 
Date: Sun, 19 May 2013 22:14:54 +0200
Subject: [PATCH 4/4] Changed =#+SENDER= to =#+AUTHOR= and removed duplicated
 email and author variables in =ox-koma-letter.el=.

* ox-koma-letter.el: changed the unorthodox =SENDER= keyword to
  the ordinary =AUTHOR= keyword.
* ox-koma-letter.el: changed email to work as in standard
  latex exporter and dropped dedicated ox-koma-letter variable.
---
 contrib/lisp/ox-koma-letter.el | 15 ---
 1 file changed, 4 insertions(+), 11 deletions(-)

diff --git a/contrib/lisp/ox-koma-letter.el b/contrib/lisp/ox-koma-letter.el
index 8ae9fc5..16bcb86 100644
--- a/contrib/lisp/ox-koma-letter.el
+++ b/contrib/lisp/ox-koma-letter.el
@@ -82,10 +82,6 @@
   :group 'org-export-koma-letter
   :type 'string)
 
-(defcustom org-koma-letter-sender nil
-  "Sender's name, as a string."
-  :group 'org-export-koma-letter
-  :type 'string)
 
 (defcustom org-koma-letter-from-address nil
   "Sender's address, as a string."
@@ -97,10 +93,6 @@
   :group 'org-export-koma-letter
   :type 'string)
 
-(defcustom org-koma-letter-email nil
-  "Sender's email, as a string."
-  :group 'org-export-koma-letter
-  :type 'string)
 
 (defcustom org-koma-letter-place nil
   "Place from which the letter is sent."
@@ -212,10 +204,10 @@ content temporarily.")
 (org-export-define-derived-backend 'koma-letter 'latex
   :options-alist
   '((:lco "LCO" nil org-koma-letter-class-option-file)
-(:sender "SENDER" nil org-koma-letter-sender newline)
+(:sender "AUTHOR" nil user-full-name t)
 (:from-address "FROM_ADDRESS" nil org-koma-letter-from-address newline)
 (:phone-number "PHONE_NUMBER" nil org-koma-letter-phone-number)
-(:email "EMAIL" nil org-koma-letter-email)
+(:email "EMAIL" nil user-mail-address t)
 (:to-address "TO_ADDRESS" nil nil newline)
 (:place "PLACE" nil org-koma-letter-place)
 (:opening "OPENING" nil org-koma-letter-opening)
@@ -361,7 +353,8 @@ holding export options."
 	(setq lco-def (format "%s\\LoadLetterOption{%s}\n" lco-def lco-file)))
 	  lco-def))
   ;; Define "From" data.
-  (when sender (format "\\setkomavar{fromname}{%s}\n" sender))
+  (when sender (format "\\setkomavar{fromname}{%s}\n"
+			   (org-export-data sender info)))
   (when from-address (format "\\setkomavar{fromaddress}{%s}\n" from-address))
   (when phone-number (format "\\setkomavar{fromphone}{%s}\n" phone-number))
   (when email (format "\\setkomavar{fromemail}{%s}\n" email))
-- 
1.8.2.3



[O] [patch] ox-koma-letter.el: credit [3/4]

2013-05-19 Thread Rasmus

This is probably the most fun change.  It adds special tags PS, ENCL,
CC, AFTER_CLOSING as in my last patch set, but it uses heading this
time.  E.g. ENCLs are under the heading * ENCL :ENCL:.  This was
suggested by Nicolas, and it's nicer.  The ideas comes from
ox-groff.el file ¹.  Thanks Luis!

One thing I'd like to discuss is whether to adopt headings for TO and
FROM also.  The Groff exporter already does so for it's letters.  The
main benefit is that it allows for org-syntax.  IMO it's a lot nicer
to look at as well.  Check the org-groff site in the footnote for an
example.

I'd be happy to look into this the next time I have a free day for
programming if you guys (also) find in a more appealing.  (One
additional benefit would be that for simple documents it wouldn't
matter whether groff or scrlttr2 was used as backend).

–Rasmus


Footnotes: 
 ¹   
http://orgmode.org/worg/org-tutorials/org-e-groff-documentation.html#sec-1-5

-- 
Powered by magic pixies!
>From eeaa129b6807465566be881b96a94e14706c9a28 Mon Sep 17 00:00:00 2001
From: "rasmus.pank" 
Date: Sun, 19 May 2013 21:50:14 +0200
Subject: [PATCH 3/4] Added support for after closing and after document
 entities in ox-koma-letter.

* ox-koma-letter.el (org-koma-letter-special-tags-after-closing): specials tags inserted after =\end{closing}=
* ox-koma-letter.el (org-koma-letter-special-tags-other): other special tags
* ox-koma-letter.el (org-koma-letter-special-tags): collect
the two previoues lists (this might be done in a wrong way).
* ox-koma-letter.el (org-koma-letter-ps-prefix): a prefix for
PS since scrlttr does not provide it.
* ox-koma-letter.el (org-koma-letter-headline): stores content
in a special list if it is =`org-koma-letter-special-tags'= as
in ox-groff.  Only returns contents if not tags not in special
tags.
* ox-koma-letter.el (org-koma-letter-special-content): holds special
content temporarily.
* ox-koma-letter.el (org-koma-letter-template): added support
for the headings with special tags.

The following example will now export a sensible manner.

* my letter
here's a letter
* PS :PS:
it's requires this patch
* CC :CC:
Nicolas, Viktor and Alan
* ENCL :ENCL:
many patches
1. this patch
2. another patch.
* include patches :AFTER_LETTER:
\myspecial macro

Namely, content of PS, ENCL and CC headings will be exported after
\closing{.}  in the order prescribed by
=`org-koma-letter-special-tags-after-closing'=.  The concent
of the =AFTER_LETTER= heading will be inserted after
=\end{letter}=, ideal for e.g. =pdfpages= commands.
---
 contrib/lisp/ox-koma-letter.el | 86 +++---
 1 file changed, 81 insertions(+), 5 deletions(-)

diff --git a/contrib/lisp/ox-koma-letter.el b/contrib/lisp/ox-koma-letter.el
index 77d21c7..8ae9fc5 100644
--- a/contrib/lisp/ox-koma-letter.el
+++ b/contrib/lisp/ox-koma-letter.el
@@ -183,6 +183,29 @@ Use `foldmarks:true' to activate default fold marks or
   :group 'org-export-koma-letter
   :type 'boolean)
 
+(defcustom org-koma-letter-ps-prefix "\\textsc{ps}: "
+  "The prefix of PS.  Used to construct PS as \"PS-SUFFIX PS\""
+  :group 'org-export-koma-letter
+  :type 'string)
+
+
+(defconst org-koma-letter-special-tags-after-closing
+  '("PS" "ENCL" "CC")
+  "Headers tags to be inserted after closing")
+
+(defconst org-koma-letter-special-tags-other
+  '("FROM" "AFTER_LETTER")
+  "Headers tags to be inserted after closing")
+
+(defconst org-koma-letter-special-tags
+  (append org-koma-letter-special-tags-other
+	  org-koma-letter-special-tags-after-closing)
+  "Header tags with special meaning")
+
+(defvar org-koma-letter-special-content nil "holds special
+content temporarily.")
+
+
 
 ;;; Define Back-End
 
@@ -198,15 +221,18 @@ Use `foldmarks:true' to activate default fold marks or
 (:opening "OPENING" nil org-koma-letter-opening)
 (:closing "CLOSING" nil org-koma-letter-closing)
 (:signature "SIGNATURE" nil org-koma-letter-signature newline)
+(:ps-prefix nil "ps-prefix" org-koma-letter-ps-prefix)
 
 (:with-backaddress nil "backaddress" org-koma-letter-use-backaddress)
 (:with-foldmarks nil "foldmarks" org-koma-letter-use-foldmarks)
 (:with-phone nil "phone" org-koma-letter-use-phone)
 (:with-email nil "email" org-koma-letter-use-email)
 (:with-place nil "place" org-koma-letter-use-place)
+(:with-after-closing nil "after-closing-order" org-koma-letter-special-tags-after-closing)
 (:with-subject nil "subject" org-koma-letter-subject-format))
   :translate-alist '((export-block . org-koma-letter-export-block)
 		 (export-snippet . org-koma-letter-export-snippet)
+		 (headline . org-koma-letter-headline)
 		 (keyword . org-koma-letter-keyword)
 		 (template . org-koma-letter-template))
   :menu-entry
@@ -253,12 +279,47 @@ channel."
 (if (equal key "KOMA-LETTER") value
   (org-export-with-backend 'latex keyword contents info
 
+
+;; The following is taken from/inspired by ox-grof.el
+;; Thanks, Luis!
+
+(defun o

[O] [patch] ox-koma-letter.el: subject changes [2/4]

2013-05-19 Thread Rasmus

This could be a problematic change.  It changes the way :with-subject
works.  I've added changes to allow the subject style to be choose as
a radio list with customize.  The reason is that LaTeX becomes unhappy
if it is not a supported value.  If #+OPTIONS subject:t the default is
used.  If #+OPTIONS subject:my-crazy-string it tries that and most
likely hell will break loose.

Viktor, you're usage of ox-koma-letter.el is quite different from mine
in that you rely (heavily?) on LCO files.  If you could test this and
see what you think of it it would be great.  On my system it doesn't
break anything vital but I might have missed something.  

I have probably overlooked some important case in which case I can try
to fix the patch or drop it.

–Rasmus

-- 
El Rey ha muerto. ¡Larga vida al Rey!>From 3847d0074c23d782abb1756a35b2cf44175f8684 Mon Sep 17 00:00:00 2001
From: "rasmus.pank" 
Date: Sun, 19 May 2013 17:32:44 +0200
Subject: [PATCH 2/4] ox-koma-letter: changed handling of subject

* ox-koma-letter.el: org-koma-letter-subject-format is now a
radio list.  If nil neither subject format nor type is
exported.
* ox-koma-letter.el: allow for t value of #+OPTIONS: subject:VALUE
* ox-koma-letter.el: export of subject format is independent
of title, but title is not independent of :with-subject.

The issue is that I could select #+OPTIONS: subject:t and this
would give a wrong value.  Hopefully this bevaior is better.
---
 contrib/lisp/ox-koma-letter.el | 55 +-
 1 file changed, 43 insertions(+), 12 deletions(-)

diff --git a/contrib/lisp/ox-koma-letter.el b/contrib/lisp/ox-koma-letter.el
index 2389025..77d21c7 100644
--- a/contrib/lisp/ox-koma-letter.el
+++ b/contrib/lisp/ox-koma-letter.el
@@ -6,7 +6,6 @@
 ;; Alan Schmitt 
 ;; Viktor Rosenfeld 
 ;; Rasmus Pank Roulund 
-
 ;; Keywords: org, wp, tex
 
 ;; This program is free software: you can redistribute it and/or modify
@@ -123,10 +122,36 @@
   :group 'org-export-koma-letter
   :type 'string)
 
-(defcustom org-koma-letter-use-subject "untitled"
-  "Use the title as the letter's subject."
-  :group 'org-export-koma-letter
-  :type 'string)
+(defcustom org-koma-letter-subject-format "left"
+  "Use the title as the letter's subject.  At the time of writing
+the following values are allowed:
+
+ - fteropening: subject after opening
+ - beforeopening: subject before opening
+ - centered: subject centered
+ - left:subject left-justified
+ - right: subject right-justified
+ - titled: add title/description to subject
+ - underlined: set subject underlined (see note in text please)
+ - untitled: do not add title/description to subject.
+ - No-export: like untitled but the title is not inserted into
+   the exported document.
+
+Please refer to the KOMA-script manual (Table 4.16. in the
+English manual of 2012-07-22)"
+  :type '(radio (const  "fteropening")
+		(const  "beforeopening")
+		(const  "centered")
+		(const  "left")
+		(const  "right")
+		(const  "titled")
+		(const  "underlined")
+		(const  "untitled")
+		(const :tag "No-export" nil)
+		(string))
+  :group 'org-export-koma-letter)
+
+
 
 (defcustom org-koma-letter-use-backaddress t
   "Print return address in small line above to address."
@@ -179,7 +204,7 @@ Use `foldmarks:true' to activate default fold marks or
 (:with-phone nil "phone" org-koma-letter-use-phone)
 (:with-email nil "email" org-koma-letter-use-email)
 (:with-place nil "place" org-koma-letter-use-place)
-(:with-subject nil "subject" org-koma-letter-use-subject))
+(:with-subject nil "subject" org-koma-letter-subject-format))
   :translate-alist '((export-block . org-koma-letter-export-block)
 		 (export-snippet . org-koma-letter-export-snippet)
 		 (keyword . org-koma-letter-keyword)
@@ -300,12 +325,18 @@ holding export options."
;; Document start
"\\begin{document}\n\n"
;; Subject
-   (let ((with-subject (plist-get info :with-subject)))
- (when with-subject
-   (concat
-	(format "\\KOMAoption{subject}{%s}\n" with-subject)
-	(format "\\setkomavar{subject}{%s}\n\n"
-		(org-export-data (plist-get info :title) info)
+   (let* ((with-subject (plist-get info :with-subject))
+	  (subject-format (if (member with-subject '("True" t "true" "TRUE"))
+  ;; FIXME: could this be done more elegantly?
+  ;; I.e. force lower face of with-subject if string.
+			  org-koma-letter-subject-format
+			with-subject))
+	  (subject (org-export-data (plist-get info :title) info)))
+ (concat
+  (when with-subject
+	(format "\\KOMAoption{subject}{%s}\n\n" subject-format))
+  (when (and subject with-subject)
+	(format "\\setkomavar{subject}{%s}\n\n" subject
;; Letter start
(format "\\begin{letter}{%%\n%s}\n\n"
 	   (or (plist-get info :to-address) "no address given"))
-- 
1.8.2.3



Re: [O] Org-mode styled beamer presentations

2013-05-19 Thread Rasmus
Marcin Borkowski  writes:
> https://twitter.com/marcin_mbork/status/335890494980767746
> http://mbork.pl/2013-05-18_A_presentation_on_LaTeX_editing_%28en%29
> https://github.com/mbork/beamerorgtheme

Excellent!  It reminds me of brain-damage.sty ¹ :)

Here's Marcin's pdf example:

   http://mbork.pl/download/Slides_about_LaTeX_editing.pdf

Super cool! Thanks!
–Rasmus

Footnotes: 
 ¹   http://users.wfu.edu/cottrell/brain_damage.sty

-- 
. . . Stallman was indeed the tallest possible mountain and by
standing on his shoulders you could see forever. . .




[O] [patch] ox-koma-letter.el: credit [1/4]

2013-05-19 Thread Rasmus
With this and the following patches I have tried to add some
functionality to the ox-koma-letter.el-file.  I'll try to summarize in
each email.

This one just updates the credit: most importantly with Viktor.

As neither git, changelongs nor lisp are incorporated as a natural
element of my native tongue I'd very much appreciate any criticisms
and test reports.  My lisp skills are very basic.

I haven't signed any FSF papers, but I'm happy to do so if the patches
are of interest.  Probably it isn't really that important with the
file only living in contrib.

–Rasmus

Two bonus question:

  - In this patch I tried to get git remove the second part
where it adds and removes the "lco" part.  But with two rebase goes I
did not succeed.  Is it safe to hand edit git-produced patches?

  - Is it me or is there no option to have git send-email just fix a
the subject and heads and let the email program do the rest?!  The
manual and various blog post did not reveal how on earth to get it
to just use Gnus for sending. . .  The program seems not really to
follow the Unix principle. . .

--
Dung makes an excellent fertilizer



[O] Converting Twitter export JSON to Org-mode file

2013-05-19 Thread Karl Voit
Hi!

If you want to make use of the Twitter export data[1] within
Org-mode, you might want to check out my Python script[2] that
converts Twitter's JSON files to one Org-mode file.


NOTE: If you happen to use the Twitter-RSS-feed with the Memacs-RSS
module[3] (like I did): it seems to be the case that Twitter
discontinued the RSS feed or they keep on changing the RSS feed
URLs. I gave up on the Twitter RSS feed.

HTH

  1. https://blog.twitter.com/2012/your-twitter-archive
  2. https://github.com/novoid/twitter-json_to_orgmode
  3. https://github.com/novoid/Memacs
-- 
mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <

https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github




Re: [O] why I can not output my file to PDF in Chinese?

2013-05-19 Thread Feng Shu
Yingjie Sun  writes:

> why I can not output my file to PDF in Chinese? Can you handle this?
> thanks

You need many special setting in both org and texlive
1. you should let texlive  correct resolve chinese(for example: use ctexkit)
2. you should install chinese fonts (simsun, microhei or adobe fonts)
3. you should let org export correct chinese latex file which can
   compile to pdf by latex


My configure can  export chinese correctly, may be it can help you :


https://github.com/tumashu/emacs-helper/blob/master/eh-org.el

Note:  you need config xelatex correctly



#+LaTeX_CLASS: ctexart
#+LATEX_HEADER: \setCJKmainfont[ItalicFont={AR PL UKai CN}]{SimSun}% 文鼎宋体和楷书
#+LATEX_HEADER: \setCJKsansfont{WenQuanYi Micro Hei}% 文泉驿的黑体
#+LATEX_HEADER: \setCJKmonofont{WenQuanYi Micro Hei}

---



-- 



Re: [O] emphasis is hard-coded in org-element

2013-05-19 Thread Rasmus
Jonas Bernoulli  writes:

> Handling of emphasized text is hard-coded in org-element.el. 

I think this is a feature.  It's been discussed a couple of times on
the list and I think Carsten argued that it should be possible to make
custom formats in the buffer; with export there'd be various ways such
as the infamous [[latex:type][link]].

(Links can export whatever however, although it is not a very
ecstatically pleasing solution).

> Wouldn't it be better if bold, underline, ... would all use the same
> parser and interpreter?  I don't see another option that would allow
> custom emphasize styles to be used with org-element.

I guess that's the compromise (mentioned above).  You can use the
emphasis-alist for something crazy if you so desire.  But I guess the
org syntax as defined by org-element is 'fixed'.  And that's probably
also OK.

–Rasmus

-- 
When the facts change, I change my mind. What do you do, sir?




[O] Org-mode styled beamer presentations

2013-05-19 Thread Marcin Borkowski


Hi list,

many of you use Org-mode to create Beamer presentations.  How about the
other way round?  I wrote an Org-mode styled Beamer theme.  Please use,
enjoy and report bugs and feature requests!

https://twitter.com/marcin_mbork/status/335890494980767746
http://mbork.pl/2013-05-18_A_presentation_on_LaTeX_editing_%28en%29
https://github.com/mbork/beamerorgtheme



Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University



[O] why I can not output my file to PDF in Chinese?

2013-05-19 Thread Yingjie Sun
why I can not output my file to PDF in Chinese? Can you handle this?
thanks

-- 
Yingjie Sun




[O] Minor problems with dvipng latex image preview

2013-05-19 Thread Nick Dokos
The main problem is that the latex->dvi invocation is hard-wired in
org-create-formula-image-with-dvipng and in addition, when the latex
file is created, the value of org-latex-packages-alist is spliced in.

That in itself is fine, except in the case when (for normal latex
processing) I choose minted for code prettification. Following the
docstring of or-export-latex-listings, I set:

(setq org-export-latex-listings 'minted)
(add-to-list 'org-latex-packages-alist '("" "minted"))

in which case, I end up with a \usepackage{minted} in the preview
latex file. But minted requires that latex be invoked with
--shell-escape, which cannot be done because the latex->dvi invocation
is hardwired.

A customizable variable to hold such options could be used, but there
might be cleaner ways. For now, I've used the even dirtier approach of
hard-wiring the option into the latex->dvi call in the above function:

--8<---cut here---start->8---
...
(call-process "latex" nil nil nil "--shell-escape" texfile))
...
--8<---cut here---end--->8---

If a customizable variable is added, then the docstring for
org-export-latex-listings will need to be modified to mention it.

And finally, the same docstring also refers to org-latex.el and
org-latex-to-pdf-process, rather than using the 8.x names.

If you want to experiment, here is a small file:

--8<---cut here---start->8---
* Euler

\[
e^{i\pi} = -1
\]
--8<---cut here---end--->8---

Hit C-c C-x C-l for the preview, C-c C-c to go back.

Org-mode version 8.0.2 (release_8.0.2-116-gd54209)
GNU Emacs 24.3.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.10) of 
2013-04-09

-- 
Nick






[O] emphasis is hard-coded in org-element

2013-05-19 Thread Jonas Bernoulli
Handling of emphasized text is hard-coded in org-element.el. 

Unfortunaly fixing this requires more than teaching
`org-element-text-markup-successor' about `org-emphasis-alist' because
separate `org-element-TYPE-{parser,interpreter} functions are used for
each type of emphasized text.

Wouldn't it be better if bold, underline, ... would all use the same
parser and interpreter?  I don't see another option that would allow
custom emphasize styles to be used with org-element.

  Thanks,
  Jonas



Re: [O] #+ATTR_LaTeX no longer honoured

2013-05-19 Thread Nicolas Goaziou
Hello,

Eric Abrahamsen  writes:

> Paul Stansell  writes:
>
>> Hello,
>>
>> I've noticed that #+ATTR_LaTeX seems to be no longer honoured (I'm
>> using release_8.0.3-133-ga5872)
>>
>> This is demonstrated for the attached org file.  It's the exact
>> example from http://orgmode.org/manual/Images-in-LaTeX-export.html.
>>
>> I expect the exported latex file (C-c C-e l l) to contain something like
>>
>>   \includegraphics[width=5cm,angle=90]{./dummy.png}
>>
>> but I instead it contains
>>
>>   \includegraphics[width=.9\linewidth]{./dummy.png}
>>
>> Thanks,
>>
>> Paul
>>
>> PS. I'm using Emacs 24.2.1 and I tested with the minimal org-mode
>> set-up from http://orgmode.org/manual/Feedback.html.
>
> I won't even attempt to give an overview of how attribute syntax has
> changed/is changing, or explain why and how the manual is out of date,
> but while we're waiting for someone else to do that, here's the line
> you're looking for:
>
> #+ATTR_LaTeX: :width 5cm :options angle=90

The manual is up-to-date (sections about HTML and ODT export may lag
a bit behind), but the URL isn't. In particular, see:

  http://orgmode.org/org.html#LaTeX-specific-attributes

> Very briefly, I think attributes that may be common to multiple backends
> are now given as eg :width or :height (with no equals sign before the
> value), while attributes that are rarer or likely backend-specific are
> stuffed into one :options attribute, with the keys/values written more
> literally.

AFAIK, :options is specific to latex back-end. Common attributes are set
the usual way, i.e. with ":attribute value" syntax. Though it's
impossible to recognize them all. So :options is handy to add raw
arguments.

Anyway, all attributes should be documented in the manual.


Regards,

-- 
Nicolas Goaziou



Re: [O] odt import

2013-05-19 Thread Uwe Brauer
>> "Ethan" == Ethan Ligon  writes:

   > Uwe Brauer  mat.ucm.es> writes:
   >> 
   >> Uwe Brauer 
   >> 
   >> 

   > Presumably a reference to

   > https://bitbucket.org/josemaria.alkala/odt2org/wiki/Home

   > I haven't used it, and it's rather old (predates org-elements, I think).  

Thanks but there are now files for downloading so I presume this project
is dead.


Uwe 


smime.p7s
Description: S/MIME cryptographic signature


Re: [O] Build fail with emacs 24.3.1

2013-05-19 Thread Achim Gratz
Bastien writes:
>> Aside from the issue of whether using macros here is needed or
>> appropriate, I can't find anything wrong with the macros or their use so
>> far.  If that upholds, the test not working points to a rather
>> substantial bug in either the test framework or Emacs 24.3. 
>
> It's not too late to explore this.

This has been whittled down to a small test case after reverting the
changes locally and finally reported as Emacs bug #14422.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptations for Waldorf Q V3.00R3 and Q+ V3.54R2:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada




Re: [O] Tbl: precision for cells

2013-05-19 Thread Suvayu Ali
On Sun, May 19, 2013 at 06:11:03AM +0200, Manfred Lotz wrote:
> 
> I know that I could add ;%.2f to each formula in the table. However, I
> would like to specify %.2f only one time for the whole table. 

The format specifier is per formula.  I do not know of any way to have a
per table format specifier, sorry.

Cheers,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] #+ATTR_LaTeX no longer honoured

2013-05-19 Thread Eric Abrahamsen
Paul Stansell  writes:

> Hello,
>
> I've noticed that #+ATTR_LaTeX seems to be no longer honoured (I'm
> using release_8.0.3-133-ga5872)
>
> This is demonstrated for the attached org file.  It's the exact
> example from http://orgmode.org/manual/Images-in-LaTeX-export.html.
>
> I expect the exported latex file (C-c C-e l l) to contain something like
>
>   \includegraphics[width=5cm,angle=90]{./dummy.png}
>
> but I instead it contains
>
>   \includegraphics[width=.9\linewidth]{./dummy.png}
>
> Thanks,
>
> Paul
>
> PS. I'm using Emacs 24.2.1 and I tested with the minimal org-mode
> set-up from http://orgmode.org/manual/Feedback.html.

I won't even attempt to give an overview of how attribute syntax has
changed/is changing, or explain why and how the manual is out of date,
but while we're waiting for someone else to do that, here's the line
you're looking for:

#+ATTR_LaTeX: :width 5cm :options angle=90

Very briefly, I think attributes that may be common to multiple backends
are now given as eg :width or :height (with no equals sign before the
value), while attributes that are rarer or likely backend-specific are
stuffed into one :options attribute, with the keys/values written more
literally.

More than that I can't venture...

Eric




[O] #+ATTR_LaTeX no longer honoured

2013-05-19 Thread Paul Stansell
Hello,

I've noticed that #+ATTR_LaTeX seems to be no longer honoured (I'm
using release_8.0.3-133-ga5872)

This is demonstrated for the attached org file.  It's the exact
example from http://orgmode.org/manual/Images-in-LaTeX-export.html.

I expect the exported latex file (C-c C-e l l) to contain something like

  \includegraphics[width=5cm,angle=90]{./dummy.png}

but I instead it contains

  \includegraphics[width=.9\linewidth]{./dummy.png}

Thanks,

Paul

PS. I'm using Emacs 24.2.1 and I tested with the minimal org-mode
set-up from http://orgmode.org/manual/Feedback.html.


attr_latex.org
Description: Binary data


Re: [O] Can't preview latex fragment

2013-05-19 Thread Feng Shu
Nicolas Goaziou  writes:

> Hello,
>
> Feng Shu  writes:
>
>> The error is like this:
>>
>> Creating image...1
>> let: Symbol's value as variable is void: org-export--default-title
>
> Thank you for the report.
>
> The problem should be fixed. Could you confirm it?

It's work, thanks!

>
>
> Regards,

-- 



Re: [O] Can't preview latex fragment

2013-05-19 Thread Nicolas Goaziou
Hello,

Feng Shu  writes:

> The error is like this:
>
> Creating image...1
> let: Symbol's value as variable is void: org-export--default-title

Thank you for the report.

The problem should be fixed. Could you confirm it?


Regards,

-- 
Nicolas Goaziou