[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] float control in org
From: |
Zhihao Ding |
Subject: |
Re: [O] float control in org |
Date: |
Fri, 22 May 2015 12:44:16 +0000 |
Thanks a lot Rasmus.
Zhihao
> On 22 May 2015, at 11:07, Rasmus <address@hidden> wrote:
>
> Zhihao Ding <address@hidden> writes:
>
>> Hi there,
>>
>> Could I ask for some advice on using the latex float
>> package in org mode? I’d like to have some control on
>> the positions of the figures, tables, code blocks etc.
>> Currently I am doing it using latex entirely, just for
>> my code blocks, as below
>>
>> #+BEGIN_LaTeX
>> \floatstyle{ruled}
>> \newfloat{Program}{tbp}{lop}[section]
>> \begin{Program}
>> \begin{verbatim}
>> ./somescripts.sh someargs
>> \end{verbatim}
>> \caption{my caption}
>> \label{mylabel}
>> \end{Program}
>> #+END_LaTeX
>>
>> There must be better ways of doing this?
>
> Maybe something like this
>
> #+latex_header: \floatstyle{ruled}
> #+latex_header: \newfloat{program}{tbp}{lop}[section]
>
> #+caption: my program
> #+begin_program
> #+BEGIN_SRC sh
> ./somescripts.sh someargs
> #+END_SRC
> #+end_program
>
> —Rasmus
>
> --
> It was you, Jezebel, it was you