mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-24 15:44:59 +08:00
LaTeX reader: better support for \xspace.
Previously we only supported it in inline contexts; now we support it in all contexts, including math. Partially addresses #7299.
This commit is contained in:
@@ -5,5 +5,5 @@
|
||||
^D
|
||||
\newcommand{\myFruit}{Mango\xspace}
|
||||
|
||||
Mango\xspace is the king of fruits.
|
||||
Mango is the king of fruits.
|
||||
```
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
```
|
||||
% pandoc -f latex -t plain
|
||||
$1-{\ensuremath{r}\xspace}$
|
||||
^D
|
||||
1 − r
|
||||
```
|
||||
|
||||
```
|
||||
% pandoc -f latex -t plain
|
||||
\newcommand{\foo}{Foo\xspace}
|
||||
|
||||
$\text{\foo bar}$
|
||||
^D
|
||||
Foo bar
|
||||
```
|
||||
|
||||
```
|
||||
% pandoc -f latex -t plain
|
||||
a\xspace b
|
||||
^D
|
||||
a b
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user