* [MD and LaTeX to PDF] `\newline` is not creating new lines when intermediate format is LaTeX
@ 2023-03-12 12:59 Smallcreek
[not found] ` <7e7a78f6-462f-45b3-948c-6cf8988ab702n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Smallcreek @ 2023-03-12 12:59 UTC (permalink / raw)
To: pandoc-discuss
[-- Attachment #1.1: Type: text/plain, Size: 1889 bytes --]
Dear pandoc-discuss,
In my document, I have math that spans multiple lines. In my Markdown
file's display LaTeX, I use `\newline` to separate my math across multiple
lines. The problem is that the output will differ depending on my
`--pdf-engine.` If I use Weasyprint with `--webtex` for example, `\newline`
renders a line break properly. If I use LuaLaTeX (which is the engine I
need), XeLaTeX, or PDFLaTeX, `\newline` has no effect. Here's a list of
commands and markup I've tried alongside their output:
$ pandoc --pdf-engine=lualatex -V geometry:margin=1in -V fontsize=12pt
source.md -o out.pdf
```
V_{1} = R_{\text{V}, 1} I \newline\newline
I = \frac{V_{1}}{R_{\text{V}, 1}} \newline\newline
= \frac{9.0}{300} \newline\newline
= 0.03 \text A
```
Output:
[image: attachment_1.png]
$ pandoc --pdf-engine=weasyprint --webtex source.md -o out.pdf # same latex
Output:
[image: attachment_2.png]
I looked it up, and one result[1] says I have to use `\begin{align*} ...
\end{align*}`. I also tried {aligned}, {align}, {multiline} and {split} ---
but the result is the same using each of these (except for multiline and
align*, which produce errors. Multiline is undefined and align* is a nested
environment, apparently). I really hope I didn't miss anything while
looking this problem up. Am I even supposed to use \newline in the first
place?
[1]: https://stackoverflow.com/questions/63350182/pandoc-not-generating-new-lines-in-markdown-with-latex#63354732
--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/7e7a78f6-462f-45b3-948c-6cf8988ab702n%40googlegroups.com.
[-- Attachment #1.2: Type: text/html, Size: 2558 bytes --]
[-- Attachment #2: attachment_1.png --]
[-- Type: image/png, Size: 4407 bytes --]
[-- Attachment #3: attachment_2.png --]
[-- Type: image/png, Size: 13816 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-03-12 16:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-12 12:59 [MD and LaTeX to PDF] `\newline` is not creating new lines when intermediate format is LaTeX Smallcreek
[not found] ` <7e7a78f6-462f-45b3-948c-6cf8988ab702n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-03-12 16:27 ` John MacFarlane
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 NNTP newsgroup(s).