[O] special blocks

2017-03-14 Thread Marvin Doyley
Does anybody know how to set the foreground color of special blocks ?

Cheers,
M



Re: [O] special blocks require whitespace

2016-04-13 Thread Eric S Fraga
On Wednesday, 13 Apr 2016 at 12:48, pray...@unimelb.edu.au wrote:
> This is probably documented somewhere but I was surprised that I
> needed to add some white space in order to get special blocks
> recognized as such.

Your example works fine for me.

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.90.1, Org release_8.3.3-535-g7213aa



[O] special blocks require whitespace

2016-04-13 Thread prayner
This is probably documented somewhere but I was surprised that I
needed to add some white space in order to get special blocks
recognized as such.
Here is a simple example:

#+Options: num:nil toc:nil
#+TITLE: 
#+AUTHOR: 

#+BEGIN_CENTER
this is not handled correctly
#+END_CENTER
#+BEGIN_CENTER 
but this is
#+END_CENTER
--
Here is the generated LaTeX
% Created 2016-04-13 Wed 22:25
% Intended LaTeX compiler: pdflatex
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{grffile}
\usepackage{longtable}
\usepackage{wrapfig}
\usepackage{rotating}
\usepackage[normalem]{ulem}
\usepackage{amsmath}
\usepackage{textcomp}
\usepackage{amssymb}
\usepackage{capt-of}
\usepackage{hyperref}
\date{\today}
\title{}
\hypersetup{
 pdfauthor={},
 pdftitle={},
 pdfkeywords={},
 pdfsubject={},
 pdfcreator={Emacs 24.5.1 (Org mode 8.3.3)}, 
 pdflang={English}}
\begin{document}

\#+BEGIN\(_{\text{CENTER}}\)
this is not handled correctly
\#+END\(_{\text{CENTER}}\)
\begin{center}
but this is
\end{center}
\end{document}
--
It's hard to see but the difference between the two examples is that
the 2nd has a single space after the #+BEGIN_CENTER

The behaviour arises from
((looking-at "\\+BEGIN_\\(\\S-+\\)")

This is with org version 8.3.3

Should this be considered a bug?
Please respond directly as well as to the list since I'm way behind with this 
list
regards
Peter



-- 
Peter Rayner
Leader, Clean Air and Urban Landscapes NESP hub 
room 343 
School of Earth Sciences, University of Melbourne, 3010, Vic, Australia
tel: work: +61 (0)3 8344 9708; fax: +61 (0)3 8344 7761 
mobile +61 402 752 379, skype: petermorag 
mail-to: pray...@unimelb.edu.au TWITTER: @raynerstrings
google scholar profile 




Re: [O] Special blocks with options in LaTeX export

2015-07-30 Thread Sebastien Vauban
Rasmus ras...@gmx.us writes:
 Suvayu Ali fatkasuvayu+li...@gmail.com writes:
 I am trying to export special blocks with options.  But it seems the
 options part is being ignored completely.  I expect the following:

   #+begin_aside :options {Combinatorial background}
   It is all random!
   #+end_aside

 to be exported as:

   \begin{aside}{Combinatorial background}
   It is all random!
   \end{aside}

 However what I get is without the extra argument to the environment.

 Am I missing something, or is this a bug?

 #+attr_latex: :options test

 #+begin_aside 
 random 
 #+end_aside

I think Suvayu uncovers something interesting: how do we give a title
to such an admonition (note, warning, tip, sidebar, etc.)?

If we want to export our document to multiple backends, we would be
forced to have:

--8---cut here---start-8---
  #+attr_html: :options {By the way...}
  #+attr_latex: :options {By the way...}
  #+attr_odt: :options {By the way...}
  #+begin_note
  This is a useful note (with a title).
  #+end_note
--8---cut here---end---8---

Wouldn't it make more sense to get the title as part of the admonition,
as Suvayu tried it in his OP?

--8---cut here---start-8---
  #+begin_note :options {By the way...}
  This is a useful note (with a title).
  #+end_note
--8---cut here---end---8---

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Special blocks with options in LaTeX export

2015-07-30 Thread Rasmus
Sebastien Vauban sva-n...@mygooglest.com
writes:

 Rasmus ras...@gmx.us writes:
 Suvayu Ali fatkasuvayu+li...@gmail.com writes:
 I am trying to export special blocks with options.  But it seems the

 options part is being ignored completely.  I expect the following:

   #+begin_aside :options {Combinatorial background}
   It is all random!
   #+end_aside

 to be exported as:

   \begin{aside}{Combinatorial background}
   It is all random!
   \end{aside}

 However what I get is without the extra argument to the environment.

 Am I missing something, or is this a bug?

 #+attr_latex: :options test

 #+begin_aside 
 random 
 #+end_aside

 I think Suvayu uncovers something interesting: how do we give a title
 to such an admonition (note, warning, tip, sidebar, etc.)?

 If we want to export our document to multiple backends, we would be
 forced to have:

   #+attr_html: :options {By the way...}
   #+attr_latex: :options {By the way...}
   #+attr_odt: :options {By the way...}
   #+begin_note
   This is a useful note (with a title).
   #+end_note

Isn't this too stylized?   Wouldn't it rather be

#+attr_html: :options title='BTW'
#+attr_latex: :options {BTW}
#+begin_note
This is a useful note (with a title).
#+end_note

ox-html has not restrictions on attr_html BTW.

 Wouldn't it make more sense to get the title as part of the admonition,
 as Suvayu tried it in his OP?

   #+begin_note :options {By the way...}
   This is a useful note (with a title).
   #+end_note

If you have something that should be shared across identically across
backends.  For a title I guess you'd use a caption, right?  A macro would
be a quick way to allow solutions once you know the right mapping between
the option element and backend transforming.

Rasmus

-- 
Dobbelt-A




Re: [O] Special blocks with options in LaTeX export

2015-06-28 Thread Rasmus
Suvayu Ali fatkasuvayu+li...@gmail.com writes:

 Hi,

 I am trying to export special blocks with options.  But it seems the
 options part is being ignored completely.  I expect the following:

   #+begin_aside :options {Combinatorial background}
   It is all random!
   #+end_aside

 to be exported as:

   \begin{aside}{Combinatorial background}
   It is all random!
   \end{aside}

 However what I get is without the extra argument to the environment.

 Am I missing something, or is this a bug?

#+attr_latex: :options test
#+begin_aside 
random 
#+end_aside

Options are read via 

(org-export-read-attribute :attr_latex special-block :options).

As to whether special blocks should support options via a keyword like in
your example, I do not know.  FWIW ox-html also reads attributes for
special blocks via an ATTR_BACKEND line.

Rasmus


-- 
There are known knowns; there are things we know that we know




Re: [O] Special blocks with options in LaTeX export

2015-06-28 Thread Suvayu Ali
Hi Rasmus,

On Sun, Jun 28, 2015 at 01:30:33PM +0200, Rasmus wrote:
 
 Options are read via 
 
 (org-export-read-attribute :attr_latex special-block :options).
 
 As to whether special blocks should support options via a keyword like in
 your example, I do not know.  FWIW ox-html also reads attributes for
 special blocks via an ATTR_BACKEND line.

I expected it to work because the manual says so, see Special blocks in
LaTeX export in (info (org) LaTeX specific attributes).

A brief quote:

  In LaTeX back-end, special blocks become environments of the same name.
  Value of ‘:options’ attribute will be appended as-is to that
  environment’s opening string.  For example: [...]

Cheers,

-- 
Suvayu

Open source is the future. It sets us free.



[O] Special blocks with options in LaTeX export

2015-06-28 Thread Suvayu Ali
Hi,

I am trying to export special blocks with options.  But it seems the
options part is being ignored completely.  I expect the following:

  #+begin_aside :options {Combinatorial background}
  It is all random!
  #+end_aside

to be exported as:

  \begin{aside}{Combinatorial background}
  It is all random!
  \end{aside}

However what I get is without the extra argument to the environment.

Am I missing something, or is this a bug?

Thanks,

-- 
Suvayu

Open source is the future. It sets us free.