emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Valentin Wüstholz" <wuestholz@gmail.com>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: [PATCH] LaTeX export: Use the same regular expression for identifying horizontal lines as in HTML export
Date: Mon, 24 Jan 2011 10:25:35 +0100	[thread overview]
Message-ID: <AANLkTinv-vkQF8CWC2FE_xQ1okKwXK2=C8B7cuR9Xibd@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 330 bytes --]

Hi,

I have attached a small patch that makes LaTeX export use the same
regular expression as HTML export for identifying horizontal lines.
The regular expression used in HTML export seems more useful, since it
allows for leading whitespace, which is for instance introduced by
auto-indenting the buffer.

Best regards,

Valentin

[-- Attachment #2: org-latex.el.diff --]
[-- Type: application/octet-stream, Size: 501 bytes --]

diff --git a/lisp/org-latex.el b/lisp/org-latex.el
index ecaf1c0..242b001 100644
--- a/lisp/org-latex.el
+++ b/lisp/org-latex.el
@@ -2261,7 +2261,7 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER."
 
   ;; Convert horizontal rules
   (goto-char (point-min))
-  (while (re-search-forward "^----+.$" nil t)
+  (while (re-search-forward "^[ \t]*-\\{5,\\}[ \t]*$" nil t)
     (org-if-unprotected
      (replace-match (org-export-latex-protect-string "\\hrule") t t)))
 

[-- Attachment #3: Type: text/plain, Size: 201 bytes --]

_______________________________________________
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

             reply	other threads:[~2011-01-24  9:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-24  9:25 Valentin Wüstholz [this message]
2011-02-10 16:05 ` [PATCH] LaTeX export: Use the same regular expression for identifying horizontal lines as in HTML export Bastien

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='AANLkTinv-vkQF8CWC2FE_xQ1okKwXK2=C8B7cuR9Xibd@mail.gmail.com' \
    --to=wuestholz@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 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).