emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Stewart Thomas <sjt015@bucknell.edu>
To: emacs-orgmode@gnu.org
Subject: [BUG] Tables with square brackets do not compile in PDF (latex) export [9.5 (release_9.5-59-g52e6f1 @ /home/sjt015/repo/emacs/lisp/org/)]
Date: Wed, 10 Nov 2021 11:16:10 -0500	[thread overview]
Message-ID: <CAO12V+wB18nAN0FuDPAeN94GHdt_2nbdJtc4u7n4W3HAZbaZsA@mail.gmail.com> (raw)

(Apologies for sending this from gmail, my mail setup was not working
with the -Q option in emacs.)

A table in which a first column begins with square brackets is not
compiling. The square bracket is interpreted by latex as an argument
to the preceding line break.

Example org table:
  | Input  | Output |
  | [1, 2] | {3, 4} |
  | [5, 6] | null   |

When exported to a PDF ( C-c C-e l o), I expect that the PDF to be rendered
with the brackets in the table as shown in org.

Instead, the result is a latex compilation error. The brackets are being
interpreted as length arguments to the preceding line break.

This is a relevant Stack Exchange issue (for pure latex) which suggests
some possible solutions.

with square bracket in table]]

To test, emacs was started with =emacs -q= to not load an init file.

Emacs  : GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.22.30, cairo version 1.15.12)
 of 2021-10-27
Package: Org mode version 9.5 (release_9.5-59-g52e6f1 @

current state:
 org-link-elisp-confirm-function 'yes-or-no-p
 org-bibtex-headline-format-function #[257 "\300%1\236A\207" [:title]
3 "\n\n(fn ENTRY)"]
 org-export-before-parsing-hook '(org-attach-expand-links)
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-odt-format-inlinetask-function 'org-odt-format-inlinetask-default-function
 org-ascii-format-drawer-function #[771 "%1\207" [] 4 "\n\n(fn NAME
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
 org-mode-hook '(#[0 "\300\301\302\303\304$\207"
           [add-hook change-major-mode-hook org-show-all append local]
         #[0 "\300\301\302\303\304$\207"
           [add-hook change-major-mode-hook org-babel-show-result-all
            append local]
         org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-latex-format-drawer-function #[514 "\207" [] 3 "\n\n(fn _ CONTENTS)"]
 org-latex-format-headline-function 'org-latex-format-headline-default-function
 org-confirm-shell-link-function 'yes-or-no-p
 org-html-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
 outline-isearch-open-invisible-function 'outline-isearch-open-invisible
 org-odt-format-headline-function 'org-odt-format-headline-default-function
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
 org-confirm-elisp-link-function 'yes-or-no-p
 org-speed-command-hook '(org-speed-command-activate
 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
 org-odt-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe
 org-link-shell-confirm-function 'yes-or-no-p
 org-babel-pre-tangle-hook '(save-buffer)
 org-agenda-loop-over-headlines-in-active-region nil
 org-occur-hook '(org-first-headline-recenter)
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-link-parameters '(("attachment" :follow org-attach-follow :complete
               ("id" :follow org-id-open)
               ("eww" :follow org-eww-open :store org-eww-store-link)
               ("rmail" :follow org-rmail-open :store
               ("mhe" :follow org-mhe-open :store org-mhe-store-link)
               ("irc" :follow org-irc-visit :store org-irc-store-link
            :export org-irc-export)
               ("info" :follow org-info-open :export org-info-export
            :store org-info-store-link)
               ("gnus" :follow org-gnus-open :store
               ("docview" :follow org-docview-open :export
            org-docview-export :store org-docview-store-link)
               ("bibtex" :follow org-bibtex-open :store
               ("bbdb" :follow org-bbdb-open :export org-bbdb-export
            :complete org-bbdb-complete-link :store
               ("w3m" :store org-w3m-store-link)
               ("doi" :follow org-link-doi-open :export
               ("file+sys") ("file+emacs")
               ("shell" :follow org-link--open-shell)
               ("news" :follow
            #[514 "\301\300\302%4Q%2\"\207"
              ["news" browse-url ":"] 6 "\n\n(fn URL ARG)"]
               ("mailto" :follow
            #[514 "\301\300\302%4Q%2\"\207"
              ["mailto" browse-url ":"] 6 "\n\n(fn URL ARG)"]
               ("https" :follow
            #[514 "\301\300\302%4Q%2\"\207"
              ["https" browse-url ":"] 6 "\n\n(fn URL ARG)"]
               ("http" :follow
            #[514 "\301\300\302%4Q%2\"\207"
              ["http" browse-url ":"] 6 "\n\n(fn URL ARG)"]
               ("ftp" :follow
            #[514 "\301\300\302%4Q%2\"\207" ["ftp" browse-url ":"]
              6 "\n\n(fn URL ARG)"]
               ("help" :follow org-link--open-help :store
               ("file" :complete org-link-complete-file)
               ("elisp" :follow org-link--open-elisp))
 org-html-format-headline-function 'org-html-format-headline-default-function
 org-metaup-hook '(org-babel-load-in-session-maybe)

             reply	other threads:[~2021-11-11 15:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-10 16:16 Stewart Thomas [this message]
2021-11-13 14:57 ` Max Nikulin

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:

  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=CAO12V+wB18nAN0FuDPAeN94GHdt_2nbdJtc4u7n4W3HAZbaZsA@mail.gmail.com \
    --to=sjt015@bucknell.edu \
    --cc=emacs-orgmode@gnu.org \
    --subject='Re: [BUG] Tables with square brackets do not compile in PDF (latex) export [9.5 (release_9.5-59-g52e6f1 @ /home/sjt015/repo/emacs/lisp/org/)]' \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this inbox:


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).