Re: [O] Name of code pieces when exported to PDF

2016-09-26 Thread Nick Dokos
John Kitchin  writes:

> It is #+label that is deprecated in favor of #+name. 
>

Ah, thanks!

> On Monday, September 26, 2016, Nick Dokos  wrote:
>
> ...   
> I was under the impression that #+CAPTION is deprecated and #+NAME is
> to be used in its place going forward. If that's the case, then the
> listings problem needs fixing.  If not, can somebody summarize the
> actual situation?
>

-- 
Nick




[O] Name of code pieces when exported to PDF

2016-09-26 Thread John Kitchin
It is #+label that is deprecated in favor of #+name.

On Monday, September 26, 2016, Nick Dokos > wrote:

> Sebastian Christ  writes:
>
> > On 2016-09-26 18:48, claude fuhrer  wrote:
> >  > \lstset{language=java,label=secondBlock,caption=
> ,captionpos=b,numbers=none}
> >  > \begin{lstlisting}
> >  > .
> >  > \end{lstlisting}
> >  >
> >  > But I wanted to have the "caption" filled with the same value as the
> >  > label. Is it possible ?
> >  >
> > Yes, use caption!
> >
> > #+caption: MainClass
> > #+name: MainClass
> >
> > #+begin_src ...
> >
>
> That seems indeed to be necessary (at least in a few experiments that
> I've run), but it's less than ideal (duplication of information).
>
> I was under the impression that #+CAPTION is deprecated and #+NAME is
> to be used in its place going forward. If that's the case, then the
> listings problem needs fixing.  If not, can somebody summarize the
> actual situation?
>
> Thanks!
> --
> Nick
>
>
>

-- 
John

---
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu


Re: [O] Name of code pieces when exported to PDF

2016-09-26 Thread Nick Dokos
Sebastian Christ  writes:

> On 2016-09-26 18:48, claude fuhrer  wrote:
>  > \lstset{language=java,label=secondBlock,caption= 
> ,captionpos=b,numbers=none}
>  > \begin{lstlisting}
>  > .
>  > \end{lstlisting}
>  > 
>  > But I wanted to have the "caption" filled with the same value as the
>  > label. Is it possible ?
>  > 
> Yes, use caption!
>
> #+caption: MainClass
> #+name: MainClass
>
> #+begin_src ...
>

That seems indeed to be necessary (at least in a few experiments that
I've run), but it's less than ideal (duplication of information).

I was under the impression that #+CAPTION is deprecated and #+NAME is
to be used in its place going forward. If that's the case, then the
listings problem needs fixing.  If not, can somebody summarize the
actual situation?

Thanks!
-- 
Nick




Re: [O] Getting rid of the default agenda dispatcher text

2016-09-26 Thread Igor Sosa Mayor
Nicolas Goaziou  writes:

> Hello,

> I don't think so.
>
> Besides, even showing only custom keys would be intrusive for
> a so-called "expert" mode. Maybe something like the export dispatcher
> would be better.
>

thanks for your answer and your work!

-- 
:: Igor Sosa Mayor :: joseleopoldo1...@gmail.com ::
:: GnuPG: 0x1C1E2890   :: http://www.gnupg.org/  ::
:: jabberid: rogorido  ::::




Re: [O] Name of code pieces when exported to PDF

2016-09-26 Thread Sebastian Christ
On 2016-09-26 18:48, claude fuhrer  wrote:
 > \lstset{language=java,label=secondBlock,caption= ,captionpos=b,numbers=none}
 > \begin{lstlisting}
 > .
 > \end{lstlisting}
 > 
 > But I wanted to have the "caption" filled with the same value as the
 > label. Is it possible ?
 > 
Yes, use caption!

#+caption: MainClass
#+name: MainClass
#+begin_src ...

Regards,
Sebastian 
-- 
Sebastian (Rudolfo) Christ
http://rudolfochrist.github.io
GPG Fingerprint: 306D 8FD3 DFB6 4E44 5061
 CE71 6407 D6F8 2AC5 55DD




Re: [O] Name of code pieces when exported to PDF

2016-09-26 Thread claude fuhrer

Hi Nicolas


On 26/09/16 17:34, Nicolas Goaziou wrote:

Hello,

claude fuhrer  writes:


[...]

It should be

   #+name: MainClass
   #+begin_src ...

i.e, with dots and no blank line in-between.


Thank you for your quick answer, but I do not really understand how to 
use it. I've corrected the syntax as you mentioned and shows what is the 
generated latex code. The export process gives then:




\lstset{language=java,label=secondBlock,caption= ,captionpos=b,numbers=none}
\begin{lstlisting}
.
\end{lstlisting}

But I wanted to have the "caption" filled with the same value as the 
label. Is it possible ?


Thank you once again for your help.

regards
claude




Regards,






Re: [O] Getting rid of the default agenda dispatcher text

2016-09-26 Thread Nicolas Goaziou
Hello,

Igor Sosa Mayor  writes:

> is there a way to open org-agenda and not show the usual text org
> normally shows about the default keys and only show the own defined keys
> por the org-custom-commands?

I don't think so.

Besides, even showing only custom keys would be intrusive for
a so-called "expert" mode. Maybe something like the export dispatcher
would be better.


Regards,

-- 
Nicolas Goaziou



Re: [O] problem with html export of links

2016-09-26 Thread Nicolas Goaziou
Hello,

Johannes Brauer  writes:

> I have two files.
>
>  a.org contains the anchor defined by custom_id property
>
> * headline
>   :PROPERTIES:
>   :CUSTOM_ID: anchor
>   :END:
>
> and
>
> b.org contains the link to a headline in a.org with custom id #anchor
>
> [[file:a.org::#anchor]]
>
> Clicking the link in b.org all works fine. But exporting b.org to html I get 
>
> …
>   b.org contains the link to a headline in a.org with custom id #anchor
>   
>
>   
>   a.html#MissingReference
>   
> ...
> with #MissingReference instead of #anchor. I cannot figure out, what
> the failure is.

You probably need to upgrade Org, as I cannot reproduce the error.

Regards,

-- 
Nicolas Goaziou



Re: [O] Name of code pieces when exported to PDF

2016-09-26 Thread Nicolas Goaziou
Hello,

claude fuhrer  writes:

> To explain a small program, I've broken it down into small pieces. My
> org file looks something like
>
> # =
> #+NAME MainClass
>
> #+BEGIN_SRC java :noweb tangle :tangle Test.java
> public class Test
> {
> <>
> <>
> }
> #+END_SRC

It should be

  #+name: MainClass
  #+begin_src ...

i.e, with dots and no blank line in-between.

Regards,

-- 
Nicolas Goaziou



[O] problem with html export of links

2016-09-26 Thread Johannes Brauer
Hi!

I have two files.

 a.org contains the anchor defined by custom_id property

* headline
  :PROPERTIES:
  :CUSTOM_ID: anchor
  :END:

and

b.org contains the link to a headline in a.org with custom id #anchor

[[file:a.org::#anchor]]

Clicking the link in b.org all works fine. But exporting b.org to html I get 

…
  b.org contains the link to a headline in a.org with custom id #anchor
  

  
  a.html#MissingReference
  
...
with #MissingReference instead of #anchor. I cannot figure out, what the 
failure is.

Johannes

[O] Name of code pieces when exported to PDF

2016-09-26 Thread claude fuhrer

Hello

To explain a small program, I've broken it down into small pieces. My
org file looks something like

# =
#+NAME MainClass
#+BEGIN_SRC java :noweb tangle :tangle Test.java
public class Test
{
   <>
   <>
}
#+END_SRC

some text

#+NAME secondBlock
#+BEGIN_SRC java :noweb tangle
int a, b;
#+END_SRC

and then

#+NAME thirdBlock
#+BEGIN_SRC java :noweb tangle
a = 17;
b = a / 2;
#+END_SRC
# =

Org-babel-tangle give me exactly what I want.

But, is it possible to have the "NAME" value displayed in the
lstlisting parameters when I export the org document as pdf ? I've
included the following lines in the beginning of my org file

#+LaTeX_HEADER:\lstset{language=Java,
#+LaTeX_HEADER:numbers=left,
#+LaTeX_HEADER:basicstyle=\footnotesize\ttfamily,
#+LaTeX_HEADER:basicstyle=\ttfamily,
#+LaTeX_HEADER:backgroundcolor=\color{LightYellow},
#+LaTeX_HEADER:stringstyle=\color{blue},
#+LaTeX_HEADER:frame=single,
#+LaTeX_HEADER:columns=fullflexible,
#+LaTeX_HEADER:numberstyle=\scriptsize\color{red},
#+LaTeX_HEADER:commentstyle=\color{ForestGreen}}

The package listing provides a "title" or "caption" keyword, but I do
not know how to pass the "NAME" argument. Can you please help me or
give me a pointer ? Thank you in advance for your help.




[O] Getting rid of the default agenda dispatcher text

2016-09-26 Thread Igor Sosa Mayor
Hi,

is there a way to open org-agenda and not show the usual text org
normally shows about the default keys and only show the own defined keys
por the org-custom-commands?

Many thanks in advance.

-- 
:: Igor Sosa Mayor :: joseleopoldo1...@gmail.com ::
:: GnuPG: 0x1C1E2890   :: http://www.gnupg.org/  ::
:: jabberid: rogorido  ::::