emacs-orgmode
[Top][All Lists]
Advanced

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

[BUG] Org export LaTeX: Multiple dashes in ~code~/=verbatim= turn into w


From: Garid Zorigoo
Subject: [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 00:10:04 +0900

I'm exporting the following org file (left-side) to a LaTeX pdf file.
The org file contains the multiple dashes in the ~code~ =verbatim=
format. The exported PDF file doesn't have the correct number of dashes.

|----------------+-----------------------------------|
| Original org   |   Exported  tex file  section     |
|----------------+-----------------------------------|
|                |    ....                           |
|* 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}                |
|                |    ...                            |
|----------------+-----------------------------------|

These multiple dashes need `{}` separator in between (i.e. `-{}-`).
However, I believe that ~----~ should become \texttt{-{}-{}-{}-{}-}
(actual 4 dashes) instead of \texttt{-{}--{}-} (dash + en.dash + dash)?

It may be needed {} in between every dash. (I read from here)

Basically what I'm saying is that. I might need the following in 
order to have the correct number of dashes. 

|----------------+--------------------------------------|
| Original org   |   Maybe it should have exported      |
|----------------+--------------------------------------|
|                |   ...                                |
|* 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}                    |
|                |    ...                               |
|----------------+--------------------------------------|


The possible place this bug might reside:
It's possible that while exporting, it replaces -- with -{}-.
So 4 dashes (----) has 2 -- so each couple gets replaced
with -{}- finally forming -{}--{}-. 


I was suggested to report this possible bug in the following forum question.


If this was an intentional feature I'm sorry.


Garid Z.



Emacs  : GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.36, cairo version 1.17.6)
 of 2023-01-03
Package: Org mode version 9.5.5 (release_9.5.5 @ /usr/share/emacs/28.2/lisp/org/)

reply via email to

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