all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [beamer] Code blocks in lists?
@ 2012-02-06 12:58 Sebastien Vauban
  2012-02-06 13:11 ` Nicolas Goaziou
  0 siblings, 1 reply; 7+ messages in thread
From: Sebastien Vauban @ 2012-02-06 12:58 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hello,

I've identified a couple of troubles related to code blocks inside lists (in
Beamer):

- code blocks break the list

- "relative" indentation of the code inside its frame is wrong except when
  code begins at column 0: is this a requirement?

- sometimes, "ORG-LIST-END-MARKER" is exported in PDF and in HTML.

Here is an ECM to show all of the above.

For the impatient, see 2 screenshots at http://i.imgur.com/2iiWq.png.

Best regards,
Seb


--8<---------------cut here---------------start------------->8---
#+TITLE:     Code blocks in lists
#+DATE:      2012-02-06
#+LANGUAGE:  en
#+OPTIONS:   H:3 num:t toc:nil

#+startup: beamer
#+LaTeX_CLASS: beamer
#+LaTeX_CLASS_OPTIONS: [presentation,t]
#+BEAMER_HEADER_EXTRA: \usetheme{Madrid}\usecolortheme{default}
#+BEAMER_FRAME_LEVEL: 1
#+COLUMNS: %40ITEM %10BEAMER_env(Env) %10BEAMER_envargs(Env Args) %4BEAMER_col(Col) %8BEAMER_extra(Extra)

#+begin_latex
\definecolor{keywords}{HTML}{0000FF}
\definecolor{back}{HTML}{EFEFEF}
\definecolor{frame}{HTML}{DDDDDD}
\lstset{
  basicstyle=\ttfamily\scriptsize,
  keywordstyle=\color{keywords},
  backgroundcolor=\color{back},
  frame=single,
  rulecolor=\color{frame}
}
#+end_latex

* Code in lists \\ Correct Org syntax

- This is an item

  This is some text to show how it's aligned...

  This is some extra text...

- This code block is properly indented in Org

  #+begin_src java
  if (test)
  {
      doit
  }
  #+end_src

  but *no correct relative indentation* in both PDF and HTML: see the code
  within its frame. There is a /left margin/ appended, not intended. Do I have
  to begin *all code blocks in column 0*?

- @Without this line@, there is a @bug@: output of =ORG-LIST-END-MARKER=.

* Code in lists \\ Workarounds?

- Weird indentation in Org

  #+begin_src java
if (test)
{
    doit
}
  #+end_src

  But *correct relative indentation* of the code (in PDF and HTML) in its frame.

- Wrong indentation in Org

#+begin_src java
if (test) {doit}
#+end_src

  Same (good) results regarding the relative indentation...

- In all cases, @putting code blocks seems to put an end to the list@

--8<---------------cut here---------------end--------------->8---

-- 
Sebastien Vauban

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

end of thread, other threads:[~2012-02-09 16:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-06 12:58 [beamer] Code blocks in lists? Sebastien Vauban
2012-02-06 13:11 ` Nicolas Goaziou
2012-02-06 16:07   ` Sebastien Vauban
2012-02-06 16:37     ` Nicolas Goaziou
2012-02-07 22:39       ` Sebastien Vauban
2012-02-07 23:21         ` Nick Dokos
2012-02-09 16:34         ` Nicolas Goaziou

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.