anammari / pandoc

Automatically exported from code.google.com/p/pandoc
GNU General Public License v2.0
0 stars 0 forks source link

displaymath environment using $$ #128

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Using the following notation:

$$
math
$$

to insert displaymath environments in latex is desirable. This is better
when more than one line of math is required, since we would otherwise need
a hanging initial $$math.

Using \begin{displaymath}\end{displaymath} is possible, but not as convenient. 

The symbols $$ are very unlikely to mean "dollar dollar" when alone at the
beginning of a line.

Original issue reported on code.google.com by nicolas...@gmail.com on 17 Feb 2009 at 5:01

GoogleCodeExporter commented 8 years ago
An alternative might be to use a single $, but line delimited to mean 
displaymath,
since the usual use of $ pairs is for inline math. Maybe we should consider if:

$
math
$

is unambiguous, since arguably, this could only mean display math, and could be
replaced with:

$math$ 

if inline math is desired. This is quite nice, since anything between $ pairs is
rendered as math one way or another.

Original comment by nicolas...@gmail.com on 17 Feb 2009 at 5:05

GoogleCodeExporter commented 8 years ago
Your original suggestion—having Pandoc recognize math between $$s—is 
better, since
it's consistent with what LaTeX does. There was consensus (I think) to make 
Pandoc
recognize them, see: 
http://groups.google.com/group/pandoc-discuss/msg/81d711015d3ddd0c
but it seems to have not been implemented yet. 

Original comment by shreevat...@gmail.com on 21 Feb 2009 at 11:35

GoogleCodeExporter commented 8 years ago
Actually, it is already implemented in the SVN repository -- isn't it?
What version were you (nicholas.wu) testing with?

% pandoc -w latex
$$
\pi^2
$$
^D
\[
\pi^2
\]

Original comment by fiddloso...@gmail.com on 26 Feb 2009 at 6:48

GoogleCodeExporter commented 8 years ago
I'm using the latest stable (1.1) version. I haven't looked at the svn version.

The output of that command in 1.1 is:

pandoc -w latex
$$
\pi^2
$$
\$\$ \pi\^{}2 \$\$

it looks like the $$ are turning into \$\$, rather than
\begin{displaymath} \end{displaymath}.
If I do the following:

pandoc -w latex
$$\pi^2$$
\[\pi^2\]

then the displaymath is generated properly (using \[ \] notation), but
obviously, there is no carriage return after the first $$, so this is
a different example.

Original comment by nicolas...@gmail.com on 26 Feb 2009 at 10:07

GoogleCodeExporter commented 8 years ago
OK, then, this problem is already fixed in SVN, so I'm closing this bug.
I plan to release 1.2 pretty soon.

Original comment by fiddloso...@gmail.com on 26 Feb 2009 at 2:57