# "Scroll to first edit" doesn't work with Mathjax enabled

#### devin.mccabe

28 Dec, 2013 04:25 AM

In a document with a lot of Mathjax-rendered LaTeX, the LaTeX code will usually take up less vertical space than the rendered mathematical symbols. I attached two screenshots showing what happens immediately after a save.

1.png shows the red indicator on the last line of the document I'm editing. By the time the LaTeX renders (a second or more for large documents), the line being edited is no longer on the screen without scrolling (2.png).

Is there any way to delay the "Scroll to first edit" until after the document has fully rendered?

1. Support Staff Posted by Brett on 28 Dec, 2013 05:29 AM

Yep, I just set it up with a callback to run after typesetting. It will
be in the next update.

-Brett

2. Posted by shg on 28 Sep, 2019 02:04 AM

The similar thing happens here with Syntax Highlighting on. It seems that "scroll to first edit" happens before processing Syntax Highlighting and eventually the final display becomes out of position.

Marked 2 Version 2.5.34 (976).

## Reply to this discussion

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

### »

• 1.png 925 KB
• 2.png 836 KB

#### Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

# Keyboard shortcuts

### Generic

? Show this help Blurs the current field

### Comment Form

r Focus the comment reply box Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

## Recent Discussions

 26 Feb, 2021 11:18 AM *manual* refresh needed when using mathjax from script 24 Feb, 2021 06:25 AM pdflatex not found 23 Feb, 2021 06:39 PM streaming preview beachballs when URL is supplied 21 Feb, 2021 05:24 PM LanguageTool support 21 Feb, 2021 01:11 PM Obsidian and link support

## Recent Articles

 Intra-document links in exported PDFs Using Ulysses with Marked Fenced code blocks inside indented code blocks Using JavaScript in Marked Custom CSS: Writing custom CSS for Marked