Comments (10)
I'm guessing that this would be possible, but I don't know anything about it, so I'll have to look into it. I have very little knowledge of LaTeX as well... :)
from org-rifle.
To toggle LaTeX fragments preview in Org-mode buffer, there is an option (setq org-startup-with-latex-preview t)
or function org-toggle-latex-fragment
to toggle latex fragments preview.
from org-rifle.
I tried (add-hook 'helm-org-rifle-after-init-hook #'org-toggle-latex-fragment)
But it report error:
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
looking-at(nil)
org-element-context()
org-toggle-latex-fragment()
run-hooks(h-after-init-hook157)
helm-log-run-hook(h-after-init-hook157)
I remember that this seems because org-toggle-latex-fragment
does not support in non-file buffer.
from org-rifle.
Adding it to that hook won't work, because when that hook is run, the Helm buffer is empty.
However, I just pushed the branch https://github.com/alphapapa/helm-org-rifle/tree/latex-preview which calls org-preview-latex-fragment
in the fontifying function. I doubt that it will work, but please give it a try and let me know. :)
from org-rifle.
It does not work after tested.
from org-rifle.
Thanks. I can't promise anything, but if you have time, could you send me a small sample Org file with some LaTeX fragments that you would want to show up?
from org-rifle.
#+STARTUP: latexpreview
* LaTeX symbol -- \[ \LaTeX \]
#+BEGIN_SRC latex
\LaTeX
#+END_SRC
* Mathematics
** Complex Formulas Examples -- \[ \begin{equation} .. \end{equation} \]
\begin{equation}
\operatorname{dist}_c = \frac{2}{N(N+1)} \sum_{i \leqslant N} \sum_{j \geqslant i} \operatorname{dist}(i,j)
\end{equation}
\begin{equation}
C(i) = \frac{3(K-2)}{4(K-1)} \approx \frac34
\end{equation}
\begin{eqnarray*}
\hat{f}(x) & \propto & \sum_{\nu} \frac{|F(\nu)H(\nu)|^2}{|N(\nu)|^2}
\frac{G(\nu)}{H(\nu)} e^{\frac{2 \pi i \nu x}{N}}\\
& \propto & \sum_{\nu} \frac{|F(\nu)|^2}{|N(\nu)|^2} H(\nu) H^*(\nu)
\frac{G(\nu)}{H(\nu)} e^{\frac{2 \pi i \nu x}{N}}\\
& \propto & \sum_{\nu} H^*(\nu) G(\nu) e^{\frac{2 \pi i \nu x}{N}}
\end{eqnarray*}
** Symbols
- [[file+sys:Data/docs/The%20Comprehensive%20LaTeX%20Symbol%20List.pdf][The Comprehensive LaTeX Symbol List (PDF)]]
*** Operators
- \[ \pm \]
- \[ \mp \]
- \[ \times \]
- \[ \div \]
- \[ \cdot \]
- \[ \ast \]
- \[ \star \]
- \[ \dagger \]
- \[ \ddagger \]
- \[ \land \]
- \[ \wedge \]
- \[ \vee \]
- \[ \amalg \]
- \[ \cap \]
- \[ \cup \]
- \[ \uplus \]
- \[ \sqcap \]
- \[ \sqcup \]
- \[ \oplus \]
- \[ \ominus \]
- \[ \otimes \]
- \[ \circ \]
- \[ \bullet \]
- \[ \diamond \]
- \[ \lhd \]
- \[ \rhd \]
- \[ \unlhd \]
- \[ \unrhd \]
- \[ \oslash \]
- \[ \odot \]
- \[ \bigcirc \]
- \[ \triangleleft \]
- \[ \triangleright \]
- \[ \Diamond \]
- \[ \bigtriangleup \]
- \[ \bigtriangledown \]
- \[ \Box \]
- \[ \setminus \]
- \[ \wr \]
- \[ x^{\circ} \]
from org-rifle.
@alphapapa Have you tried my org file example?
from org-rifle.
Hi, sorry for the wait. I just did some experimenting, but I don't think it is feasible to do this.
Generating a preview for a fragment is slow, requiring writing multiple files to disk (at least 3, IIUC: one for the temporary org buffer, one for the generated DVI file, and another for the converted PNG file). This would be very slow for showing a number of fragments.
It might be possible to show already-generated fragment previews, but I'd have to 1) learn how Emacs handles displaying images in buffers, 2) figure out how to find images in buffers, 3) find out how to associate them with fragments that are in search results, and then 4) try to display them in a Helm buffer as a candidate. And I'm not sure if 4 is even possible.
If it is possible, it would be many hours of work for a feature that I don't think many people would use (and I wouldn't have any use for it, myself).
I'm sorry to disappoint you. I'd like to add it and make it more useful for you, but it's not feasible for me to do so. I'll leave the feature request open in case someone else wants to try someday. :)
P.S. If you have a few minutes, I'd appreciate help testing #11. :)
from org-rifle.
I see, thanks for your diving in. I might try this someday.
from org-rifle.
Related Issues (20)
- Changing value of helm-org-rifle-fontify-headings to nil causes helm-org-rifle-org-directory to stop working HOT 3
- org-narrow-to-subtree: prevents showing other parts of file, still shows from other files
- command-line client HOT 1
- Search gives up on small strings HOT 6
- Prioritising heading matches HOT 2
- Wrong number of arguments error with helm-org-rifle--refile HOT 1
- Req: Indication of status (progress, no results, which files have been searched?) HOT 1
- Req: Results in current file displayed first HOT 1
- helm-collect-matches error HOT 1
- Is there a way to do a exact match? HOT 1
- Disabling helm-org-rifle-fontify-headings breaks helm-org-rifle-agenda-files HOT 6
- helm-org-rifle-directories: how to add many directories? HOT 1
- Limit candidates to those with certain properties HOT 1
- Fix warning "Helm source <file>: after-init-hook Should be defined as a symbol HOT 1
- Docstring length warnings HOT 1
- Returned search results not always respecting sort order HOT 1
- Warning (emacs): ... after-init-hook Should be defined as a symbol HOT 5
- Opting out of v1.5.0 TODO keyword special handling HOT 4
- Not possible to move as always between the helm-org-rifle-agenda-files results HOT 1
- Hidden parent headings when using helm-org-rifle-current-buffer on collapsed hierarchies HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from org-rifle.