Re: [O] Issue with multiple references to the same footnote in LaTeX export

2014-07-12 Thread York Zhao
Hi list,

I'm re-posting this again because I just noticed that I shouldn't have
copied
the "Local Variables". Now it is a smaller ECM.

If I have multiple references to the same footnote, in LaTeX export only the
first reference is a clickable link, the rest are exported as dead number
referring to the footnote definition, but not clickable links. I have
`org-footnote-section' set to `nil' by the way.

Here's ECM:

--8<---cut here---start->8---
#+LaTeX_CLASS: article

* Multiple reference to the same footnote 1
This is footnote reference [fn:1]. This is another reference to the same
footnote [fn:1]

[fn:1] Footnote definition.

* Multiple reference to the same footnote 2
This is footnote reference [fn:myfootnote]. This is another reference to the
same footnote [fn:myfootnote]

[fn:myfootnote] Footnote definition.

* Multiple reference to the same footnote 3
This is footnote reference [fn:myfootnote3: Footnote definition.]. This is
another reference to the same footnote [fn:myfootnote3]

--8<---cut here---end--->8---

Regards,

York


Re: [O] An Org centric research lab: Goodbye MS word, excel, and powerpoint

2014-07-12 Thread Doyley, Marvin
jorge.a.alf...@gmail.com (Jorge A. Alfaro-Murillo) writes:

Thanks everybody for highlighting the benefits of python. I am exploring
python with a few undergraduates. I am impressed how well python plays
with Fortran, f2py is awesome. The syntax is very similar to MATLAB so
migration should be easy, if I decided to move in that direction.

Best Wishes,
M

 
> Grant Rettke  writes:
>
>> Octave is an option, too: https://www.gnu.org/software/octave/
>
> Since people are championing python, and R and Octave have been
> mentioned, let me throw this one into the discussion:
> http://www.sagemath.org/
>
> "Sage is a free open-source mathematics software system licensed under
> the GPL. It builds on top of many existing open-source packages: NumPy,
> SciPy, matplotlib, Sympy, Maxima, GAP, FLINT, R and many more"
>
> "Many more" includes Octave as well. If you know python, then you can
> use only python in Sage, no need for learning anything new.
>
> Actually you do not need to install anything to use it:
> https://cloud.sagemath.com/
>
> At Sage Math Cloud (SMC) besides Sage, you can access a terminal there
> and it has emacs already installed. Also you can ssh to their servers,
> and tramp with emacs locally works well connecting to it. That is what I
> use for research.
>
> Come to think about it, there is no ob-sage.el yet. I write my papers
> directly to LaTeX (and my collaborators write at SMC since they are not
> emacs users and it provides direct compilation and shows already the
> results) so I never thought about exporting to sage. Does someone have
> any plans for this?
>
> Jorge.
>
>
>

-- 




[O] Custom environment for LaTeX export

2014-07-12 Thread Julien Cubizolles
I need to export the same org file to both LaTeX and beamer, and I'd
like the headings that are exported to the "block" environment in beamer
to be exported to another environment in LaTeX (named
"consequence"). The LaTeX export engine allows one to specify any
environment but it doesn't suit my needs. Consider the following heading:

--8<---cut here---start->8---
 Puissance des force de Laplace sur un moment magnétique  :eleves:
#+ATTR_LATEX: :options [Puissance des force de Laplace sur un moment magnétique]
#+BEGIN_consequence
La puissance des forces de Laplace subies par un moment magnétique
plongé dans un champ magnétique et en rotation autour d'un axe
\(\Delta\) est:
#+BEGIN_LaTeX
\begin{equation*}
- m_\perp B_\perp \sin(\theta) \dot{\theta}.
\end{equation*}
#+END_LaTeX

#+END_consequence
--8<---cut here---end--->8---

If I export it to beamer, I get

--8<---cut here---start->8---

\begin{frame}[label=sec-1-1-1]{Puissance des forces de Laplace}
\begin{block}{Puissance des force de Laplace sur un moment magnétique}
\begin{consequence}[Puissance des force de Laplace sur un moment magnétique]
La puissance des forces de Laplace subies par un moment magnétique
plongé dans un champ magnétique et en rotation autour d'un axe
\(\Delta\) est:
\begin{equation*}
- m_\perp B_\perp \sin(\theta) \dot{\theta}.
\end{equation*}
\end{consequence}
\end{block}
\end{frame}
--8<---cut here---end--->8---

but I just want the \begin{block}..., not the \begin{consequence}...


If I export to LaTeX, I get:

--8<---cut here---start->8---
\begin{enumerate}
\item Puissance des force de Laplace sur un moment magnétique
\label{sec-1-1-1-1}
\begin{consequence}[Puissance des force de Laplace sur un moment magnétique]
La puissance des forces de Laplace subies par un moment magnétique
plongé dans un champ magnétique et en rotation autour d'un axe
\(\Delta\) est:
\begin{equation*}
- m_\perp B_\perp \sin(\theta) \dot{\theta}.
\end{equation*}
\end{consequence}
\end{enumerate}
--8<---cut here---end--->8---

but I don't want the \item Puissance..., only the
\begin{consequence}[...

Any ideas how I should go about this ?

Julien.




[O] How does org-babel-post-tangle-hook work?

2014-07-12 Thread Grant Rettke
Hi,

In this document

http://orgmode.org/manual/Extracting-source-code.html#Extracting-source-code

the hook 'org-babel-post-tangle-hook is explained as

,
| This hook is run from within code files tangled by org-babel-tangle.
Example applications could include post-processing, compilation or
evaluation of tangled code files.
`

I know what a hook is and how to use them and where they run.

My trouble is that I don't understand what this documentation is saying.

Is it saying that if this hook exists in a file that was tangled by
org that it will be executed? If so does it only work for elisp files
or any kind of file?

Kind regards,

Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
g...@wisdomandwonder.com | http://www.wisdomandwonder.com/
“Wisdom begins in wonder.” --Socrates
((λ (x) (x x)) (λ (x) (x x)))
“Life has become immeasurably better since I have been forced to stop
taking it seriously.” --Thompson



Re: [O] How to filter agenda for Word1 OR Word2?

2014-07-12 Thread Samuel Wales
= \(word\) should work.

c-c a s {\(word\)} should work [possibly depending on text search settings]

the full power of org-agenda-filter-by-tag is not yet implemented with
text search.

if it were, that would be EXCELLENT.

even better would be searching the body text and not just the headline!

samuel

-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com

The disease DOES progress.  MANY people have died from it.  And
ANYBODY can get it.

Denmark: free Karina Hansen NOW.



Re: [O] An Org centric research lab: Goodbye MS word, excel, and powerpoint

2014-07-12 Thread TP
On Tue, Jul 8, 2014 at 5:24 PM, Doyley, Marvin M. 
wrote:

> Since the gentle approach didn't work, I made it
> mandatory requirement that all junior members must generate
> manuscripts in org,
>

"It's good to be the king." :)


Re: [O] Removing the title in LaTeX export

2014-07-12 Thread Thomas S. Dye
Aloha Julien,

Julien Cubizolles  writes:

> Is there a way to remove the title from during a LaTeX export? the
> ":with-toc nil" keyword in org-publish-project-alist removes the table
> of contents but I "with-title nil" doesn't seem to be recognized.
>
> Julien.
 
I use (setq org-latex-title-command "").

hth,
Tom

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



Re: [O] How to call org-display-inline-images so that after a graphviz block is evaluated the image is refreshed?

2014-07-12 Thread Grant Rettke
Perfect!
Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
g...@wisdomandwonder.com | http://www.wisdomandwonder.com/
“Wisdom begins in wonder.” --Socrates
((λ (x) (x x)) (λ (x) (x x)))
“Life has become immeasurably better since I have been forced to stop
taking it seriously.” --Thompson


On Fri, Jul 11, 2014 at 7:28 PM, Ken Mankoff  wrote:
>
> Try (org-redisplay-inline-images). Note "re".
>
> #+BEGIN_SRC  :post (org-redisplay-inline-images)
> #+END_SRC
> #+RESULTS:
>
>   -k.
>
> * On 2014-07-11 at 20:14, Grant Rettke wrote:
>> Hi,
>>
>> The ability to use graphviz in an org document is stellar and makes it
>> so much more productive to use org.
>>
>> Combined with inline image display, it is a powerhouse combo.
>>
>> After evaluating my source block, I would like to refresh the generated 
>> image.
>>
>> Thus far, I just call org-display-inline-image.
>>
>> What is the best way to automate it so that the images are always up to date?
>>
>> Kind regards,
>>
>> Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
>> g...@wisdomandwonder.com | http://www.wisdomandwonder.com/
>> “Wisdom begins in wonder.” --Socrates
>> ((λ (x) (x x)) (λ (x) (x x)))
>> “Life has become immeasurably better since I have been forced to stop
>> taking it seriously.” --Thompson
>



Re: [O] An Org centric research lab: Goodbye MS word, excel, and powerpoint

2014-07-12 Thread Jorge A. Alfaro-Murillo
Grant Rettke  writes:

> Octave is an option, too: https://www.gnu.org/software/octave/

Since people are championing python, and R and Octave have been
mentioned, let me throw this one into the discussion:
http://www.sagemath.org/

"Sage is a free open-source mathematics software system licensed under
the GPL. It builds on top of many existing open-source packages: NumPy,
SciPy, matplotlib, Sympy, Maxima, GAP, FLINT, R and many more"

"Many more" includes Octave as well. If you know python, then you can
use only python in Sage, no need for learning anything new.

Actually you do not need to install anything to use it:
https://cloud.sagemath.com/

At Sage Math Cloud (SMC) besides Sage, you can access a terminal there
and it has emacs already installed. Also you can ssh to their servers,
and tramp with emacs locally works well connecting to it. That is what I
use for research.

Come to think about it, there is no ob-sage.el yet. I write my papers
directly to LaTeX (and my collaborators write at SMC since they are not
emacs users and it provides direct compilation and shows already the
results) so I never thought about exporting to sage. Does someone have
any plans for this?

Jorge.




Re: [O] remove directory structure in latex export

2014-07-12 Thread Nick Dokos
Julien Cubizolles  writes:


> I've tried playing with :headline-levels so that all headings get
> translated as section, subsection, subsubsection and redefining the
> \section,\subsection,\subsubsection commands in the LaTeX class to
> \relax but for some reason, the third level still gets translated as an
> enumerate list.
>

#+OPTIONS: H:4

perhaps?

Nick





[O] Removing the title in LaTeX export

2014-07-12 Thread Julien Cubizolles
Is there a way to remove the title from during a LaTeX export? the
":with-toc nil" keyword in org-publish-project-alist removes the table
of contents but I "with-title nil" doesn't seem to be recognized.

Julien.




[O] remove directory structure in latex export

2014-07-12 Thread Julien Cubizolles
When exporting an Org file to LaTeX, I'd like to be able to remove all
headings with levels inferior to the ones explicitly selected with a
select-tag. In the following example, I'd like the LaTeX file to include
only the "Puissance des force de Laplace sur un moment magnétique"
heading, not the "Cas d'un moment magnétique", "Puissance et énergie
potentielle"...

I've tried playing with :headline-levels so that all headings get
translated as section, subsection, subsubsection and redefining the
\section,\subsection,\subsubsection commands in the LaTeX class to
\relax but for some reason, the third level still gets translated as an
enumerate list.

Julien.

--8<---cut here---start->8---
#+begin_src emacs-lisp :tangle yes :exports none
  (setq org-publish-project-alist
'(
  ("beamer"
   :base-directory "./"
   :publishing-directory "./"
   :publishing-function org-beamer-publish-to-pdf
   :exclude ".*"
   :latex-class "mpsi_beamer"
   :include ("reglages.org")
   :completion-function jc-org-publish-rename-beamer-pdf)
  ("eleves"
   :base-directory "./"
   :publishing-directory "./"
   :publishing-function org-latex-publish-to-pdf
   :exclude ".*"
   :latex-class "mpsi"
   :include ("reglages.org")
   :select-tags ("eleves")
   :headline-levels "10"
   :completion-function jc-org-publish-rename-eleves-pdf
   )
  ))
#+end_src

#+RESULTS:
| beamer | :base-directory | ./ | :publishing-directory | ./ | 
:publishing-function | org-beamer-publish-to-pdf | :exclude | .* | :latex-class 
| mpsi_beamer | :include | (reglages.org) | :completion-function | 
jc-org-publish-rename-beamer-pdf |  ||  
|  |
| eleves | :base-directory | ./ | :publishing-directory | ./ | 
:publishing-function | org-latex-publish-to-pdf  | :exclude | .* | :latex-class 
| mpsi| :include | (reglages.org) | :select-tags | (eleves) 
| :headline-levels | 10 | :completion-function | 
jc-org-publish-rename-eleves-pdf |

#+TAGS: eleves

* Cas d'un moment magnétique
** Puissance et énergie potentielle
*** Puissance des forces de Laplace
 Puissance des force de Laplace sur un moment magnétique  :eleves:
La puissance des forces de Laplace subies par un moment magnétique
plongé dans un champ magnétique et en rotation autour d'un axe
\(\Delta\) est:
#+BEGIN_LaTeX
\begin{equation*}
- m_\perp B_\perp \sin(\theta) \dot{\theta}.
\end{equation*}
#+END_LaTeX
--8<---cut here---end--->8---





Re: [O] How to filter agenda for Word1 OR Word2?

2014-07-12 Thread Thorsten Jolitz
Alexander Baier  writes:

> On 2014-07-12 10:18 Thorsten Jolitz wrote:
>> Alexander Baier  writes:
>>> Using \(Word1\)\|\(Word2\) works for me. If you find it troublesome to
>>> type a lot of these escaped parens, you might want to try
>>> smartparens-mode for auto insertion of the closing _escaped_ paren.
>>>
>> I always wondered how this C-c a s search should work. I can only enter
>> one word, just like the OP.
>
> I forgot to mention that I did not use C-c a s, but created an agenda
> and pressed = to start a regexp-match.

Yes, then the usual regexp syntax works:

,
| \(foo\|bar\)
`

but what about filtering in the agenda (in search view), using {} []?
Either this is broken and does nothing or I do not really understand what 

,
| http://orgmode.org/manual/Filtering_002flimiting-agenda-items.html
`

tries to tell me ...

-- 
cheers,
Thorsten




Re: [O] How to filter agenda for Word1 OR Word2?

2014-07-12 Thread Alexander Baier
On 2014-07-12 10:18 Thorsten Jolitz wrote:
> Alexander Baier  writes:
>> Using \(Word1\)\|\(Word2\) works for me. If you find it troublesome to
>> type a lot of these escaped parens, you might want to try
>> smartparens-mode for auto insertion of the closing _escaped_ paren.
>>
> I always wondered how this C-c a s search should work. I can only enter
> one word, just like the OP.

I forgot to mention that I did not use C-c a s, but created an agenda
and pressed = to start a regexp-match.

Regards,
-- 
Alexander Baier



[O] Get headline number w/o link?

2014-07-12 Thread D. C. Toedt
During HTML export, I'm trying to automatically get the headline number of
the then-current headline, WITHOUT a link, so I don't want to use [[$1]].
 EXAMPLE:

=== ORG MODE TEXT: ===

* Definitions {{{HL-NUM}}}

** Affiliate Definition {{{HL-NUM}}}

*[body text omitted]*

** Arbitration {{{HL-NUM}}}

*[body text omitted]*



=== DESIRED EXPORTED TEXT: ===

1. Affiliate Definition [1]

1.1  Affiliate Definition [1.1]

*[body text omitted]*

1.2  Arbitration [1.2]

*[body text omitted]*


Suggestions?  I've gone rummaging through org.el, ox.el, and the HTML
exporter.  I tried the following but it doesn't work:

#+MACRO: HL-NUM (eval (org-export-get-headline-number (org-get-heading nil
nil)) nil)

I'm a cargo-cult programmer at best and am just scratching the surface of
Lisp and emacs Lisp.

Thanks in advance.

Regards,

--D. C.

*D*ell *C*harles "D. C." Toedt III  *(my** last name is pronounced "Tate") *
Attorney and neutral arbitrator -- tech contracts and intellectual property
​Editor, ​​​Common Draft  project:  Model
contract term sheets & clauses, annotated
d...@toedt.com LinkedIn: dctoedt 
Calendar

(redacted)
O: +1 (713) 364-6545C: +1 (713) 516-8968
​​

​
Houston, Texas (Central time zone)

Unless expressly stated otherwise, this message is not intended
to serve as an electronic signature nor as assent to an agreement.


Re: [O] How to filter agenda for Word1 OR Word2?

2014-07-12 Thread Thorsten Jolitz
Alexander Baier  writes:

> On 2014-07-11 13:26 Martin Beck wrote:
>> I have a search result (created by a search agenda C-C a s) and I
>> want to narrow it down further with additional criteria.
>> I tried to use the "=" key for "Narrow to entries matching regexp",
>> but I did not find out how to combine several terms in here.
>>  
>> As long as I only enter one word, it works. But if I want to filter
>> for criteria like
>>  
>> Word1 OR Word2
>> or (Word1 OR Word2) AND Word3
>> or (Word1 OR Word2) AND NOT (Word3 OR Word4)
>>  
>> I get no results just by entering
>> e.g. Word1|Word2
>> or Word1&Word2
>>  
>> I'm sure this is trivial, but I'm not an expert in regular
>> expressions and currently don't see how to solve that.
>> :-(
>
> Using \(Word1\)\|\(Word2\) works for me. If you find it troublesome to
> type a lot of these escaped parens, you might want to try
> smartparens-mode for auto insertion of the closing _escaped_ paren.
>
> As an example, if you type "\(", smartparens will automatically insert
> "\)" after point. You can even navigate over these groups via sexps
> commands.

I always wondered how this C-c a s search should work. I can only enter
one word, just like the OP.

None of these (valid) regexps works here:

,
| (foo|bar)
| \(foo\|bar\)
| \\(foo|bar\\)
`

This does not work either

,
| \(foo\)\|\(bar\)
`

nor does 

,
| \(\(foo\)\|\(bar\)\)
`

or simply

,
| foo|bar
`

-- 
cheers,
Thorsten