emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rasmus <rasmus@gmx.us>
To: emacs-orgmode@gnu.org
Subject: Re: float control in org
Date: Fri, 22 May 2015 12:07:03 +0200	[thread overview]
Message-ID: <87wq01c4e0.fsf@gmx.us> (raw)
In-Reply-To: 23489a2c-1e91-4eff-8179-e33e3de97f9b@HUB04.ad.oak.ox.ac.uk

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

  reply	other threads:[~2015-05-22 10:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-22  9:43 float control in org Zhihao Ding
2015-05-22 10:07 ` Rasmus [this message]
2015-05-22 12:44   ` Zhihao Ding

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wq01c4e0.fsf@gmx.us \
    --to=rasmus@gmx.us \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).