JunoLab / Weave.jl

Scientific reports/literate programming for Julia
http://weavejl.mpastell.com
MIT License
821 stars 94 forks source link

Latex equations with $$ have extra newline when turned into tex #476

Open dlfivefifty opened 9 months ago

dlfivefifty commented 9 months ago

description

When calling weave with md2tex every time I write an equation with $$ it creates an extra newline, which shows up in latexed output.

versions

using InteractiveUtils; versioninfo():


Julia Version 1.9.3
Commit bed2cd540a (2023-08-24 14:43 UTC)
Build Info:
Note: This is an unofficial build, please report bugs to the project
responsible for this build and not to the Julia project unless you can
reproduce the issue using official builds available at https://julialang.org/downloads

Platform Info: OS: macOS (arm64-apple-darwin23.1.0) CPU: 8 × Apple M2 WORD_SIZE: 64 LIBM: libopenlibm LLVM: libLLVM-14.0.6 (ORCJIT, apple-m1) Threads: 1 on 4 virtual cores Environment: JULIA_EDITOR = code JULIA_NUM_THREADS =


> `using Pkg; Pkg.status()`:
<!-- please paste the the output of `using Pkg; Pkg.status()` in the backticks below -->
```julia
  [7073ff75] IJulia v1.24.2
  [98b081ad] Literate v2.15.0
  [91a5bcdd] Plots v1.39.0
  [44d3d7a6] Weave v0.10.12

minimum reproducible steps

newptcai commented 3 months ago

Don't latex treat consecutive empty lines as a single one?

dlfivefifty commented 3 months ago

It treats \n differently to \n\n. If you have any more then yes \n\n…\n\n is treated the same as \n\n.

The issue is that Weave is creating \n\n when it should be creating \n