emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Garid Zorigoo <garidzorigoo@gmail.com>
To: garidzorigoo@gmail.com
Cc: emacs-orgmode@gnu.org
Subject: Re: [BUG] Org export LaTeX: Multiple dashes in ~code~/=verbatim= turn into wrong number of dashes [9.5.5 (release_9.5.5 @ /usr/share/emacs/28.2/lisp/org/)]
Date: Wed, 12 Apr 2023 15:12:40 +0900	[thread overview]
Message-ID: <2ed6592c-4d4f-eee4-0d27-f3d4184e7a45@gmail.com> (raw)
In-Reply-To: <CAEDgBW44j4NpYUpppLpOA5Pmmsfi-GbCzDH4rTmRjf-F64mSaA@mail.gmail.com>


I think I even found a solution much easier solution.

Just replace each - dash with {-} when exporting latex.

In other words:

|---------------+-------------------------------------|
| Original org  | New suggestion                      |
|---------------+-------------------------------------|
|               | ...                                 |
| * code        | \section{code}                      |
| 1. ~-~        | \label{sec:org532ffa5}              |
| 2. ~--~       | \begin{enumerate}                   |
| 3. ~---~      | \item \texttt{{-}}                  |
| 4. ~----~     | \item \texttt{{-}{-}}               |
| 5. ~-----~    | \item \texttt{{-}{-}{-}}            |
| 6. ~a------b~ | \item \texttt{{-}{-}{-}{-}}         |
|               | \item \texttt{{-}{-}{-}{-}{-}}      |
| * verbatim    | \item \texttt{a{-}{-}{-}{-}{-}{-}b} |
| 1. =-=        | \end{enumerate}                     |
| 2. =--=       |                                     |
| 3. =---=      | \section{verbatim}                  |
| 4. =----=     | \label{sec:org4a05ec4}              |
| 5. =-----=    | \begin{enumerate}                   |
| 6. =a------b= | \item \texttt{{-}}                  |
|               | \item \texttt{{-}{-}}               |
|               | \item \texttt{{-}{-}{-}}            |
|               | \item \texttt{{-}{-}{-}{-}}         |
|               | \item \texttt{{-}{-}{-}{-}{-}}      |
|               | \item \texttt{a{-}{-}{-}{-}{-}{-}b} |
|               | \end{enumerate}                     |
|               | ...                                 |
|---------------+-------------------------------------|

This will ensure each - character as a separate character.
This seems much easier to implement and readable.

Garid Z.



  reply	other threads:[~2023-04-12  6:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-11 15:10 [BUG] Org export LaTeX: Multiple dashes in ~code~/=verbatim= turn into wrong number of dashes [9.5.5 (release_9.5.5 @ /usr/share/emacs/28.2/lisp/org/)] Garid Zorigoo
2023-04-12  6:12 ` Garid Zorigoo [this message]
2023-04-12  8:59 ` Ihor Radchenko

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=2ed6592c-4d4f-eee4-0d27-f3d4184e7a45@gmail.com \
    --to=garidzorigoo@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).