Coder Social home page Coder Social logo

Comments (3)

io12 avatar io12 commented on June 5, 2024

I think you can get something similar to what you want by customizing org-fragtog-preview-delay. That only changes the images to text when point is on the image for org-fragtog-preview-delay seconds.

from org-fragtog.

FelixBrendel avatar FelixBrendel commented on June 5, 2024

Thank you for the suggestion! I guess that would work in some situations, only when scrolling through the document and then stopping to read, if the cursor is on a fragment it could change the page layout suddenly.

Another option would be to turn off org-fragtog-mode and manually toggle the fragment under point (for example by setting a keyboard shortcut). In that case, do you think I could still somehow leverage the re-toggling to the image preview when the cursor leaves the fragment?

from org-fragtog.

FelixBrendel avatar FelixBrendel commented on June 5, 2024

After thinking about it more, it was actually tivial to implement (maybe this is what you meant actually), by setting the timeout to a very high number and binding a key to toggle the fragment. org-fragtog-mode will still retoggle to the preview when the cursor leves the fragment.

This is the config that makes it work, for those who are looking at this later

(use-package org-fragtog
  :custom (org-fragtog-preview-delay 99999999999999999)
  :bind   (:map org-mode-map ("<f2>" . org-toggle-latex-fragment))
  :hook   (org-mode . org-fragtog-mode))

Unless you want to add something, I would go ahead and close this issue, as I found a way to solve my need. Thank you for your help!

from org-fragtog.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.