From: Carsten Dominik <carsten.dominik@gmail.com>
To: Chris Gray <chrismgray@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: multicolumn figures in latex
Date: Sat, 15 May 2010 14:27:18 +0200 [thread overview]
Message-ID: <CE3F787A-CCBC-4CD6-9227-1409960A6A64@gmail.com> (raw)
In-Reply-To: <86mxwdcm4e.fsf@portan.ibr.cs.tu-bs.de>
Hi Chris, thanks a lot for this patch - it is in. I have only added
documentation.
- Carsten
On May 6, 2010, at 1:20 PM, Chris Gray wrote:
> Hi,
>
> I wanted to make a figure that spanned multiple lines in LaTeX. The
> way to do that is via the figure* environment. Since org-mode didn't
> seem to support that, I hacked it in. The patch is attached.
>
> Cheers,
> Chris
>
> commit 4cb1a153245189aa062db4545dad76bdf413a1e1
> Author: Chris Gray <chrismgray@gmail.com>
> Date: Thu May 6 12:58:00 2010 +0200
>
> Add support for multicolumn figures in LaTeX.
>
> Modified lisp/ChangeLog
> diff --git a/lisp/ChangeLog b/lisp/ChangeLog
> index 7f1a507..74ee48d 100644
> --- a/lisp/ChangeLog
> +++ b/lisp/ChangeLog
> @@ -1,3 +1,8 @@
> +2010-05-06 Chris Gray <chrismgray@gmail.com>
> +
> + * org-latex.el (org-export-latex-format-image): Add support
> + for multicolumn figures in LaTeX.
> +
> 2010-05-02 Dan Davison <davison@stats.ox.ac.uk>
>
> * org-src.el (org-edit-src-code): allow-write-back-p had
> Modified lisp/org-latex.el
> diff --git a/lisp/org-latex.el b/lisp/org-latex.el
> index 2051de1..22833b2 100644
> --- a/lisp/org-latex.el
> +++ b/lisp/org-latex.el
> @@ -1881,14 +1881,17 @@ The conversion is made depending of STRING-
> BEFORE and STRING-AFTER."
>
> (defun org-export-latex-format-image (path caption label attr)
> "Format the image element, depending on user settings."
> - (let (ind floatp wrapp placement figenv)
> + (let (ind floatp wrapp multicolumnp placement figenv)
> (setq floatp (or caption label))
> (setq ind (org-get-text-property-any 0 'original-indentation
> path))
> (when (and attr (stringp attr))
> (if (string-match "[ \t]*\\<wrap\\>" attr)
> (setq wrapp t floatp nil attr (replace-match "" t t attr)))
> (if (string-match "[ \t]*\\<float\\>" attr)
> - (setq wrapp nil floatp t attr (replace-match "" t t attr))))
> + (setq wrapp nil floatp t attr (replace-match "" t t attr)))
> + (if (string-match "[ \t]*\\<multicolumn\\>" attr)
> + (setq multicolumnp t attr (replace-match "" t t attr))))
> +
>
> (setq placement
> (cond
> @@ -1912,6 +1915,11 @@ The conversion is made depending of STRING-
> BEFORE and STRING-AFTER."
> \\includegraphics[%attr]{%path}
> \\caption{%labelcmd%caption}
> \\end{wrapfigure}")
> + (multicolumnp "\\begin{figure*}%placement
> +\\centering
> +\\includegraphics[%attr]{%path}
> +\\caption{%labelcmd%caption}
> +\\end{figure*}")
> (floatp "\\begin{figure}%placement
> \\centering
> \\includegraphics[%attr]{%path}
>
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
- Carsten
prev parent reply other threads:[~2010-05-15 12:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-06 11:20 multicolumn figures in latex Chris Gray
2010-05-15 12:27 ` Carsten Dominik [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CE3F787A-CCBC-4CD6-9227-1409960A6A64@gmail.com \
--to=carsten.dominik@gmail.com \
--cc=chrismgray@gmail.com \
--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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.