emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] special blocks require whitespace


From: prayner
Subject: [O] special blocks require whitespace
Date: Wed, 13 Apr 2016 22:48:11 +1000

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 <http://www.nespurban.edu.au>
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: address@hidden TWITTER: @raynerstrings
google scholar profile 
<http://scholar.google.com.au/citations?user=H3up71wAAAAJ&hl=en>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]