From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joe Corneli Subject: Bug: parsing latex ``$\mathit{math}$'' in export [9.0.5 (release_9.0.5-474-g942b62 @ /home/joe/org-mode/lisp/)] Date: Fri, 12 May 2017 14:41:39 +0100 Message-ID: <87inl619bg.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60290) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d9ApJ-00044S-7P for emacs-orgmode@gnu.org; Fri, 12 May 2017 09:41:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d9ApF-00063X-2y for emacs-orgmode@gnu.org; Fri, 12 May 2017 09:41:49 -0400 Received: from mail-wm0-x22a.google.com ([2a00:1450:400c:c09::22a]:33070) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d9ApE-000631-Mz for emacs-orgmode@gnu.org; Fri, 12 May 2017 09:41:45 -0400 Received: by mail-wm0-x22a.google.com with SMTP id f135so11303619wmd.0 for ; Fri, 12 May 2017 06:41:42 -0700 (PDT) Received: from Teacup (cpc2-flit3-2-0-cust79.9-1.cable.virginm.net. [213.105.32.80]) by smtp.gmail.com with ESMTPSA id o189sm4235490wmg.32.2017.05.12.06.41.40 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 May 2017 06:41:40 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org With the test file as follows: ====================================================================== #+TITLE: example #+AUTHOR: Joe Corneli #+DATE: May 12, 2017 #+DESCRIPTION: example #+LANGUAGE: en #+OPTIONS: H:3 num:t toc:t \n:nil @:t ::t |:t ^:nil -:t f:t *:t <:t #+OPTIONS: TeX:t LaTeX:nil skip:nil d:nil todo:t pri:nil tags:not-in-toc #+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js ``Every $P$ is a $P$'' ====================================================================== ... I see this behaviour: I run org-html-export-as-html, and the output file contains: ``Every P is a $P$'' ... I would have expected: ``Every P is a P'' ====================================================================== Emacs : GNU Emacs 25.1.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 3.14.13) of 2016-08-15 Package: Org mode version 9.0.5 (release_9.0.5-474-g942b62 @ /home/joe/org-mode/lisp/) current state: ============== (setq org-tree-slide-mode-hook '(toggle-org-cloaking) org-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-speed-command-hook '(org-speed-command-activate org-babel-speed-command-activate) org-agenda-diary-file "~/postdoc.git/org/work.org" org-occur-hook '(org-first-headline-recenter) org-use-fast-todo-selection 'prefix org-clock-in-prepare-hook '((lambda nil (if (not pomodoro-is-active) (let ((minutes (read-number "Start timer: " 90))) (when org-timer-current-timer (org-timer-stop)) (org-timer-set-timer minutes) (pomodoro-mode)) ) ) ) org-metaup-hook '(org-babel-load-in-session-maybe) org-html-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"] org-log-done 'note org-latex-format-inlinetask-function 'org-latex-format-inlinetask-default-function org-confirm-shell-link-function 'yes-or-no-p org-image-actual-width nil org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default org-latex-pdf-process '("latexmk -pdflatex='pdflatex -interaction nonstopmode' -pdf -bibtex -f %f") org-agenda-prefix-format '((agenda . " %i %-10:c%?-12t% s") (timeline . " % s") (todo . " %i %-12:c") (tags . " %i %-12:c") (search . " %i %-12:c")) org-agenda-custom-commands '(("a" agenda "" ((org-agenda-include-diary t) (org-agenda-remove-tags t)) ) ) org-latex-format-headline-function 'org-latex-format-headline-default-function org-default-notes-file "~/postdoc.git/org/blotter.org" org-todo-keyword-faces '(("META" :foreground "darkgreen" :background "snow" :box (:line-width -1)) ("NOTE" :foreground "lightgreen" :weight bold) ("LOW" :foreground "#cb4b16" :background "snow" :weight bold :box (:line-width -1)) ("MED" :foreground "goldenrod" :background "cornsilk" :weight bold :box (:line-width -1)) ("HIGH" :foreground "darkgreen" :background "honeydew" :weight bold :box (:line-width -1)) ("NICE" :foreground "blue" :background "honeydew" :weight bold :box (:line-width -1)) ("MUST" :foreground "purple" :background "honeydew" :weight bold :box (:line-width -1)) ("TODO" :foreground "black" :background "snow" :weight bold :box (:line-width -1)) ("DONE" . org-done) ("WONTFIX" . org-done) ("ONICE" . org-done) ("QUESTION" . org-done)) org-after-todo-state-change-hook '(org-clock-out-if-current) org-latex-format-drawer-function #[514 "\207" [] 3 "\n\n(fn _ CONTENTS)"] org-odt-format-headline-function 'org-odt-format-headline-default-function org-from-is-user-regexp "\\" org-html-postamble t org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-agenda-before-write-hook '(org-agenda-add-entry-text) org-babel-pre-tangle-hook '(save-buffer) org-mode-hook '((lambda nil (font-lock-add-keywords nil (quote (("^\\s-*?\\(-\\{1\\}\\|[0-9]+\\.\\)\\s-" 1 font-lock-warning-face t) ) ) ) (font-lock-add-keywords nil (quote (("^\\(-\\{5,\\}\\)" 1 font-lock-type-face t)))) ) (closure (org-inlinetask-min-level buffer-face-mode-face org-mode-map org-tbl-menu org-org-menu org-struct-menu org-entities org-last-state org-id-track-globally org-clock-start-time texmathp-why remember-data-file org-agenda-tags-todo-honor-ignore-options iswitchb-temp-buflist calc-embedded-open-mode calc-embedded-open-formula calc-embedded-close-formula align-mode-rules-list org-emphasis-alist org-emphasis-regexp-components org-export-registered-backends org-modules org-babel-load-languages t) nil (add-hook (quote change-major-mode-hook) (quote org-show-block-all) (quote append) (quote local)) ) #[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-babel-show-result-all append local] 5] org-babel-result-hide-spec org-babel-hide-all-hashes) org-refile-targets '((org-agenda-files :maxlevel . 1) ("~/postdoc.git/org/alt/backlog.org" :maxlevel . 1)) org-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3 "\n\n(fn ENTRY)"] org-archive-hook '(org-attach-archive-delete-maybe) org-make-link-description-function 'rewrite-link org-agenda-sorting-strategy '((agenda todo-state-down tag-up category-keep priority-down) (todo todo-state-down tag-up priority-down category-keep) (tags priority-down category-keep) (search category-keep)) org-ascii-format-drawer-function #[771 "\207" [] 4 "\n\n(fn NAME CONTENTS WIDTH)"] org-odt-format-inlinetask-function 'org-odt-format-inlinetask-default-function org-timer-done-hook '((lambda nil (message "Timer done!") (when pomodoro-is-active (save-excursion (set-buffer (get-file-buffer org-agenda-diary-file)) (pomodoro-mode -1)) (message "Pomodoro done!") (notifications-notify :title "time over" :body "record comments and take a break") (start-process-shell-command "cvlc" nil (concat "cvlc --play-and-exit --no-video " timer-done-sound-file) ) (org-clock-out)) ) ) org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-show-empty-lines org-optimize-window-after-visibility-change) org-agenda-hide-tags-regexp "write" org-html-postamble-format '(("en" "

Author: %a

\n

Created: %d

\n

Revised: May 12, 2017

\n

%v

") ) org-archive-location "~/postdoc.git/org/work.org::datetree/" org-agenda-use-time-grid nil org-agenda-finalize-hook '(remove-todo-and-cookies place-agenda-tags) org-export-before-processing-hook '((lambda (x) (setq org-html-postamble-format (list (list "en" (concat "

Author: %a

\n

Created: %d

\n

Revised: " (format-time-string "%B %-d, %Y") "

\n

%v

") ) ) ) ) ) org-todo-keywords '((sequence "META(M)" "NOTE(n)" "NICE(i)" "LOW(l)" "MED(m)" "HIGH(h)" "MUST(u)" "TODO(t)" "|" "DONE(d)" "WONTFIX(w)" "ONICE(o)" "QUESTION(q)") ) org-timer-default-timer 90 org-export-allow-bind-keywords t org-babel-tangle-lang-exts '(("clojure" . "clj") ("emacs-lisp" . "el") ("elisp" . "el")) org-confirm-elisp-link-function 'yes-or-no-p org-metadown-hook '(org-babel-pop-to-session-maybe) org-odt-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"] org-html-format-headline-function 'org-html-format-headline-default-function org-link-parameters '(("id" :follow org-id-open) ("rmail" :follow org-rmail-open :store org-rmail-store-link) ("mhe" :follow org-mhe-open :store org-mhe-store-link) ("irc" :follow org-irc-visit :store org-irc-store-link) ("info" :follow org-info-open :export org-info-export :store org-info-store-link) ("gnus" :follow org-gnus-open :store org-gnus-store-link) ("docview" :follow org-docview-open :export org-docview-export :store org-docview-store-link) ("bibtex" :follow org-bibtex-open :store org-bibtex-store-link) ("bbdb" :follow org-bbdb-open :export org-bbdb-export :complete org-bbdb-complete-link :store org-bbdb-store-link) ("w3m" :store org-w3m-store-link) ("cite" :follow org-bibtex-goto-citation :export nil) ("mu4e" :follow org-mu4e-open :export nil) ("file+sys") ("file+emacs") ("doi" :follow org--open-doi-link) ("elisp" :follow org--open-elisp-link) ("file" :complete org-file-complete-link) ("ftp" :follow (lambda (path) (browse-url (concat "ftp:" path)))) ("help" :follow org--open-help-link) ("http" :follow (lambda (path) (browse-url (concat "http:" path)))) ("https" :follow (lambda (path) (browse-url (concat "https:" path)))) ("mailto" :follow (lambda (path) (browse-url (concat "mailto:" path)))) ("news" :follow (lambda (path) (browse-url (concat "news:" path)))) ("shell" :follow org--open-shell-link)) org-structure-template-alist '(("s" "#+BEGIN_SRC ?\n\n#+END_SRC") ("e" "#+BEGIN_EXAMPLE\n?\n#+END_EXAMPLE") ("q" "#+BEGIN_QUOTE\n?\n#+END_QUOTE") ("v" "#+BEGIN_VERSE\n?\n#+END_VERSE") ("V" "#+BEGIN_VERBATIM\n?\n#+END_VERBATIM") ("c" "#+BEGIN_CENTER\n?\n#+END_CENTER") ("l" "#+BEGIN_LaTeX\n?\n#+END_LaTeX") ("L" "#+LaTeX: ") ("h" "#+BEGIN_HTML\n?\n#+END_HTML") ("H" "#+HTML: ") ("a" "#+BEGIN_ASCII\n?\n#+END_ASCII") ("A" "#+ASCII: ") ("i" "#+INDEX: ?") ("I" "#+INCLUDE: %file ?") ("x" "#+BEGIN_COMMENT\n?\n#+END_COMMENT")) org-babel-load-languages '((clojure . t) (emacs-lisp . t)) org-clock-sound t org-cycle-global-at-bob t org-tree-slide-slide-in-effect nil org-agenda-include-deadlines nil org-html-format-inlinetask-function 'org-html-format-inlinetask-default-function org-agenda-mode-hook '(hide-notes) org-agenda-files '("~/postdoc.git/org/") org-clock-out-hook '((lambda nil (when (timerp org-timer-countdown-timer) (save-excursion (set-buffer (get-file-buffer org-agenda-diary-file)) (pomodoro-mode -1)) (cancel-timer org-timer-countdown-timer)) (let ((comments (read-string "Comments: "))) (save-excursion (org-set-property "SUMMARY" comments))) (let ((minutes (read-number "Take a break: " 5))) (when (> minutes 0) (org-agenda-list) (org-agenda-diary-entry-in-org-file-programmatically (concat (int-to-string minutes) " minute break " (substring (current-time-string) 11 16)) ) (org-agenda-list) (search-forward "break") (goto-char (line-beginning-position)) (org-timer-set-timer minutes)) ) ) org-clock-remove-empty-clock-drawer) )