emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* float control in org
@ 2015-05-22  9:43 Zhihao Ding
  2015-05-22 10:07 ` Rasmus
  0 siblings, 1 reply; 3+ messages in thread
From: Zhihao Ding @ 2015-05-22  9:43 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

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?

Thanks very much!

Zhihao

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: float control in org
  2015-05-22  9:43 float control in org Zhihao Ding
@ 2015-05-22 10:07 ` Rasmus
  2015-05-22 12:44   ` Zhihao Ding
  0 siblings, 1 reply; 3+ messages in thread
From: Rasmus @ 2015-05-22 10:07 UTC (permalink / raw)
  To: emacs-orgmode

Zhihao Ding <zhihao.ding@imm.ox.ac.uk> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: float control in org
  2015-05-22 10:07 ` Rasmus
@ 2015-05-22 12:44   ` Zhihao Ding
  0 siblings, 0 replies; 3+ messages in thread
From: Zhihao Ding @ 2015-05-22 12:44 UTC (permalink / raw)
  To: Rasmus; +Cc: emacs-orgmode@gnu.org

Thanks a lot Rasmus. 

Zhihao

> On 22 May 2015, at 11:07, Rasmus <rasmus@gmx.us> wrote:
> 
> Zhihao Ding <zhihao.ding@imm.ox.ac.uk> 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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-05-22 12:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-22  9:43 float control in org Zhihao Ding
2015-05-22 10:07 ` Rasmus
2015-05-22 12:44   ` Zhihao Ding

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).