emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* \minus entity and LaTeX export
@ 2022-05-14  3:46 Max Nikulin
  2022-05-14  6:17 ` Timothy
  2022-05-14  6:30 ` Ihor Radchenko
  0 siblings, 2 replies; 4+ messages in thread
From: Max Nikulin @ 2022-05-14  3:46 UTC (permalink / raw)
  To: orgmode; +Cc: Timothy

Hi,

I was checking which changes had been landed to the main branch as the 
result of Ihor's work and I noticed a commit unrelated to my initial 
curiosity but that might be questionable:

> commit 15d25644cc8d88fd5cd0ad53caedaedad3635d8d
> author TEC Sat Jan 22 20:41:55 2022 +0800
> 
> org-entities: Change \minus to -
> 
> * lisp/org-entities.el: The LaTeX command \minus doesn't exist, but a
> hyphen in math mode produces a minus symbol.
> 
> diff --git a/lisp/org-entities.el b/lisp/org-entities.el
> index 2bd4f2fe3..9c64cb854 100644
> --- a/lisp/org-entities.el
> +++ b/lisp/org-entities.el
> @@ -307,7 +307,7 @@ packages to be loaded, add these packages to `org-latex-packages-alist'."
>       ("trade" "\\texttrademark{}" nil "™" "TM" "TM" "™")
>  
>       "** Science et al."
> -     ("minus" "\\minus" t "−" "-" "-" "−")
> +     ("minus" "-" t "−" "-" "-" "−")

Should it be "\textminus" instead? I never used it but my expectation 
that it was added for text mode outside of equations: \minus1. It 
required \usepackage{textcomp} in the past, but it seems it is not the 
issue any more, so the symbol is available out of the box. I was not 
following that changes in LaTeX so I may miss something.

>       ("pm" "\\textpm{}" nil "±" "+-" "±" "±")
>       ("plusmn" "\\textpm{}" nil "±" "+-" "±" "±")
>       ("times" "\\texttimes{}" nil "×" "*" "×" "×")


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: \minus entity and LaTeX export
  2022-05-14  3:46 \minus entity and LaTeX export Max Nikulin
@ 2022-05-14  6:17 ` Timothy
  2022-05-14  6:30 ` Ihor Radchenko
  1 sibling, 0 replies; 4+ messages in thread
From: Timothy @ 2022-05-14  6:17 UTC (permalink / raw)
  To: Max Nikulin; +Cc: orgmode

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

Hi Max,

> I was checking which changes had been landed to the main branch as the result of
> Ihor’s work and I noticed a commit unrelated to my initial curiosity but that
> might be questionable:
>> org-entities: Change − to -
>> * lisp/org-entities.el: The LaTeX command − doesn’t exist, but a
>> hyphen in math mode produces a minus symbol.

I made that commit after having a look at
<http://tug.ctan.org/info/symbols/comprehensive/symbols-a4.pdf> and only seeing
`\minus' from `MnSymbol' and `fdsymbol', leading me to conclude that `\minus' was
erroneous. Your point about text mode symbols is a good one, and now leads me to
think that switching to text mode and using `\textminus' would be the most
appropriate value (which I can confirm is both provided by `textcomp' and now
works OOTB with TeXLive 2022).

How does that sound?

All the best,
Timothy

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: \minus entity and LaTeX export
  2022-05-14  3:46 \minus entity and LaTeX export Max Nikulin
  2022-05-14  6:17 ` Timothy
@ 2022-05-14  6:30 ` Ihor Radchenko
  2022-05-14 10:13   ` Max Nikulin
  1 sibling, 1 reply; 4+ messages in thread
From: Ihor Radchenko @ 2022-05-14  6:30 UTC (permalink / raw)
  To: Max Nikulin; +Cc: orgmode, Timothy

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

Max Nikulin <manikulin@gmail.com> writes:

>>       "** Science et al."
>> -     ("minus" "\\minus" t "&minus;" "-" "-" "−")
>> +     ("minus" "-" t "&minus;" "-" "-" "−")
>
> Should it be "\textminus" instead? I never used it but my expectation 
> that it was added for text mode outside of equations: \minus1. It 
> required \usepackage{textcomp} in the past, but it seems it is not the 
> issue any more, so the symbol is available out of the box. I was not 
> following that changes in LaTeX so I may miss something.

\textminus appears to work without textcomp. However, I am not sure if it
should be used instead of math version.

Look at the attached screenshot where I tried to compare how \textminus
vs. $-$ would look inside a document. I find the math version to be more
visually appealing. Of course, we can always change to \textminus if
people more familiar with typography jump in and ask for the change.

Best,
Ihor


[-- Attachment #2: 2022-05-14_14-26.png --]
[-- Type: image/png, Size: 58140 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: \minus entity and LaTeX export
  2022-05-14  6:30 ` Ihor Radchenko
@ 2022-05-14 10:13   ` Max Nikulin
  0 siblings, 0 replies; 4+ messages in thread
From: Max Nikulin @ 2022-05-14 10:13 UTC (permalink / raw)
  To: emacs-orgmode

On 14/05/2022 13:30, Ihor Radchenko wrote:
> Max Nikulin writes:
> 
>>>        "** Science et al."
>>> -     ("minus" "\\minus" t "&minus;" "-" "-" "−")
>>> +     ("minus" "-" t "&minus;" "-" "-" "−")
>>
>> Should it be "\textminus" instead? I never used it but my expectation
>> that it was added for text mode outside of equations: \minus1. It
>> required \usepackage{textcomp} in the past, but it seems it is not the
>> issue any more, so the symbol is available out of the box. I was not
>> following that changes in LaTeX so I may miss something.
> 
> \textminus appears to work without textcomp. However, I am not sure if it
> should be used instead of math version.

Timothy tried texlive-2022, I had 2019 installed, users of old versions 
may add \usepackage{textcomp}.

> Look at the attached screenshot where I tried to compare how \textminus
> vs. $-$ would look inside a document. I find the math version to be more
> visually appealing. Of course, we can always change to \textminus if
> people more familiar with typography jump in and ask for the change.

I am a bit lazy to check what font and what codepoint is used in each case.

 From my point of view, the correct way to type negative numbers is 
\(-1\), not \(-\)1. TeX math mode sets proper spaces around the 
character, e.g. \(1 - 1\) has larger spaces around. I considered \minus 
as something special for cases when a user has reasons to avoid math, 
e.g. to avoid MathJax or images when a document contains only a few of 
simple expressions.



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-05-14 10:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-14  3:46 \minus entity and LaTeX export Max Nikulin
2022-05-14  6:17 ` Timothy
2022-05-14  6:30 ` Ihor Radchenko
2022-05-14 10:13   ` Max Nikulin

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