From: Smallcreek <gotgoogzagain322-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: [MD and LaTeX to PDF] `\newline` is not creating new lines when intermediate format is LaTeX
Date: Sun, 12 Mar 2023 05:59:34 -0700 (PDT) [thread overview]
Message-ID: <7e7a78f6-462f-45b3-948c-6cf8988ab702n@googlegroups.com> (raw)
[-- 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 --]
next reply other threads:[~2023-03-12 12:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-12 12:59 Smallcreek [this message]
[not found] ` <7e7a78f6-462f-45b3-948c-6cf8988ab702n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-03-12 16:27 ` John MacFarlane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7e7a78f6-462f-45b3-948c-6cf8988ab702n@googlegroups.com \
--to=gotgoogzagain322-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).