Skip to content

Parser gets confused when a new section begins on a new page #174

@MTecknology

Description

@MTecknology

I am using latex with a custom style to build PDFs -> https://www.overleaf.com/latex/templates/mtecks-resume/fzgztpkgngjc

This was working reasonably well, until an edge case. Whenever a new section starts on a new page, that section gets merged with the content that ended on the previous page.

I've been trying to figure this out for months and even offered a bounty, and thought the root problem was something related to how TeX handles blocks of text, as opposed to streams. The more I look, the more it seems like the problem is the parser losing some sort of context on a page reset.

Hopefully this screenshot makes the issue obvious.
Image

This happens no matter how the previous page ended. It could be a single word, or paragraph, fully left-aligned, and the problem always happens. I can trick this into working by placing a white period '.' on the line above a new section and then hide it using vspace{-1em} and the parser will then do the correct thing, only when that '.' is the first thing on the new page. Any other time, it gets merged with the heading.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions