Skip to content

fix line breaks in \pdfpcnote under LuaLaTeX#18

Merged
fnevgeny merged 1 commit intopdfpc:masterfrom
vilaureu:missing-line-breaks
Jul 22, 2025
Merged

fix line breaks in \pdfpcnote under LuaLaTeX#18
fnevgeny merged 1 commit intopdfpc:masterfrom
vilaureu:missing-line-breaks

Conversation

@vilaureu
Copy link
Copy Markdown
Contributor

The \pdfpcnote command does not escape all line breaks under LuaLaTeX.
This leads to inserted white space when using \pdfpcnote.

I guess this behavior is not desired.
This PR adds the missing escaping %s.

The \pdfpcnote command did not escape all line breaks under LuaLaTeX.
This led to inserted white space when using \pdfpcnote.
@fnevgeny
Copy link
Copy Markdown
Member

I neither use LuaLaTeX nor am a TeX expert. Can you comment on PR #7, which is supposed to solve the same problem but is evidently more complex than yours?

@vilaureu
Copy link
Copy Markdown
Contributor Author

vilaureu commented Jul 9, 2025

Sorry for the late response.

This PR does not solve the same problem as #7 . #7 fixes the parsing and passing through of the \\ line break command in TeX. This should result in the \\ command creating new lines in the Markdown pdfpc notes.

This PR here fixes unescaped new line characters (new lines in the source code of the pdfpc LaTeX package). This fixes issues where the unescaped new line characters introduce white space into the generated presentation PDFs. This is especially noticeable when using \pdfpcnote<> as this can result in slightly jumping text on slide transitions.

As you can see in the code around the two lines that I fixed, all these lines also end in a % to avoid new line characters leaking to the generated PDF presentation. I think, the % characters where just missed in the two lines that I touched in this PR.
I do not solve the support of \\ as #7 does. I have not tested if #7 accidentally fixes the bug I address in this PR. But, I think this PR can still be merged and #7 can be discussed fully independently.

@fnevgeny
Copy link
Copy Markdown
Member

Thanks for the explanation. It just sounds strange that LuaLaTeX behaves differently from LaTeX in this respect.

@vilaureu
Copy link
Copy Markdown
Contributor Author

For this PR there is no technical difference between LuaLaTeX and LaTeX. It is just the the missing % characters are only missing in the code for LuaLaTeX. You can see the \ifLuaTeX command just before the lines I changed.

@fnevgeny
Copy link
Copy Markdown
Member

Ah, thanks, I wasn't focused.

@fnevgeny fnevgeny merged commit 01eda80 into pdfpc:master Jul 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants