dan-reznik / Elliptical-Billiards-Triangular-Orbits

Invariants of N-Periodics in Elliptic Billiards
https://dan-reznik.github.io/Elliptical-Billiards-Triangular-Orbits/
3 stars 1 forks source link

rmd html tex tips #2

Open yonicd opened 4 years ago

yonicd commented 4 years ago

sorry.. i was snooping in the main doc... i saw in this file you were using raw tex. I think {texPreview} can make your life easier with rmds that aren't pdf.

It's main job is to make tex table work much easier, where you can iterate the table while you work, just like you would a ggplot in the viewer. it supports kable/kableExtra/xtable and other classes like texreg and equatiomatic.

specific to your usecase it has it's own chunk engine where you can preview tex snippets with the play button of the chunk. The same chunk will let you treat tex just like any other chunk when you knit the document.

here is an example.

---
title: "Untitled"
output: html_document
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(texPreview)
$$
\begin{array}{cclcc}
\text{index} & \text{kimb} & \text{name} & \text{similarity} & \text{proven by} \\
\hline
 1 & X_{1}^* & \text{Incenter} & \text{J}^t & \text{OR,RG} \\
 2 & X_{2}^* & \text{Centroid} & \text{B} & \text{ST+RS} \\
 3 & X_{3}^* & \text{Circumcenter} & \text{C}^t & \text{RG,CF} \\
 4 & X_{4}^* & \text{Orthocenter} & \text{B}^t & \text{RG}   \\
 5 & X_{5}^* & \text{9-Point Center} & & \text{RG} \\
 6 & X_{7}^* & \text{Gergonne Point} & \text{B} & \text{MH} \\
 7 & X_{8}^* & \text{Nagel Point} & & \text{RG} \\
 8 & X_{10}^* & \text{Spieker Center} & \text{B}^t & \text{MH} \\
 9 & X_{11}^* & \text{Feuerbach Point} & \text{C}^* & \text{RG} \\
 10 & X_{12}^* & \text{$\{X_{1},X_{5}\}$-Harmonic Conjugate of $X_{11}$} & & \text{RG} \\
 11 & X_{20} & \text{de Longschamps Point} & & \\
 12 & X_{21} & \text{Schiffler Point} & & \\
 13 & X_{35} & \text{$\{X_{1},X_{3}\}$-Harmonic Conjugate of $X_{36}$} & & \\
 14 & X_{36} & \text{Inverse-in-Circumcircle of Incenter} & & \\
 15 & X_{40}^* & \text{Bevan Point} & \text{B}^t & \text{MH} \\
 16 & X_{46} & \text{$X_{4}$-Ceva Conjugate of $X_{1}$} & & \\
 17 & X_{55} & \text{Insimilicenter(Circumcircle,Incircle)} & \\
 18 & X_{56} & \text{Exsimilicenter(Circumcircle,Incircle)} & &  \\
 19 & X_{57}^* & \text{Isogonal Conjugate of $X_{9}$} & & \text{MH} \\
 20 & X_{63}^* & \text{Isogonal Conjugate of $X_{19}$} & & \text{MH} \\
 21 & X_{65} & \text{Orthocenter of the Intouch Triangle} & & \\
 22 & X_{72} & \text{Isogonal Conjugate of $X_{28}$} & & \\
 23 & X_{78} & \text{Isogonal Conjugate of $X_{34}$} & & \\
 24 & X_{79} & \text{Isogonal Conjugate of $X_{35}$} & & \\
 25 & X_{80} & \text{Reflection of Incenter in Feuerbach Point} & & \\
 26 & X_{84} & \text{Isogonal Conjugate of $X_{40}$} & & \\
 27 & X_{88}^* & \text{Isogonal Conjugate of $X_{44}$} &  \text{B}^* & \\
 28 & X_{90} & \text{$X_{3}$-Cross Conjugate of $X_{1}$} & \\
 29 & X_{100}^* & \text{Anticomplement of Feuerbach Point} & \text{B}^* & \text{RG} \\
\end{array}
 $$

![image](https://user-images.githubusercontent.com/1755487/75593832-9910f700-5a54-11ea-9e46-89ba9323fb50.png)
$$
\begin{array}{cll}
 1 & X_{2}^* & \text{Centroid} \\
 2 & X_{4}^* & \text{Orthocenter} \\
 3 & X_{7}^* & \text{Gergonne Point} \\
 4 & X_{10}^* & \text{Spieker Center} \\
 5 & X_{40}^* & \text{Bevan Point} \\
 6 & X_{57}^* & \text{Isogonal Conjugate of $X_{9}$} \\
 7 & X_{63}^* & \text{Isogonal Conjugate of $X_{19}$} \\
 8 & X_{88} & \text{Isogonal Conjugate of $X_{44}$} \\
 9 & X_{100}^* & \text{Anticomplement of Feuerbach Point} \\
\end{array}
$$


![image](https://user-images.githubusercontent.com/1755487/75593839-9f06d800-5a54-11ea-80d8-232436b91c39.png)

obviously this isnt contained to only raw scripts, it can be used for tikz too

https://metrumresearchgroup.github.io/texPreview/articles/tikz.html
dan-reznik commented 4 years ago

very glad you went there!

I am confused though. I have been using raw tex which does however get rendered into html (no need for pdf), I believe via MathJax. (I think bookdown does that). You even get a preview on RStudio.

What is the advantage of texpreview over the run-of-the-mill approach?

Dan

On Fri, Feb 28, 2020 at 8:08 PM yonicd notifications@github.com wrote:

sorry.. i was snooping in the main doc... i saw in this file you were using raw tex. I think {texPreview} https://metrumresearchgroup.github.io/texPreview can make your life easier with rmds that aren't pdf.

It's main job is to make tex table work much easier, where you can iterate the table while you work, just like you would a ggplot in the viewer. it supports kable/kableExtra/xtable and other classes like texreg and equatiomatic.

specific to your usecase it has it's own chunk engine https://metrumresearchgroup.github.io/texPreview/articles/engine.html where you can preview tex snippets with the play button of the chunk. The same chunk will let you treat tex just like any other chunk when you knit the document.

here is an example.


title: "Untitled" output: html_document

knitr::opts_chunk$set(echo = TRUE)
library(texPreview)
$$
\begin{array}{cclcc}
\text{index} & \text{kimb} & \text{name} & \text{similarity} & \text{proven by} \\
\hline
 1 & X_{1}^* & \text{Incenter} & \text{J}^t & \text{OR,RG} \\
 2 & X_{2}^* & \text{Centroid} & \text{B} & \text{ST+RS} \\
 3 & X_{3}^* & \text{Circumcenter} & \text{C}^t & \text{RG,CF} \\
 4 & X_{4}^* & \text{Orthocenter} & \text{B}^t & \text{RG}   \\
 5 & X_{5}^* & \text{9-Point Center} & & \text{RG} \\
 6 & X_{7}^* & \text{Gergonne Point} & \text{B} & \text{MH} \\
 7 & X_{8}^* & \text{Nagel Point} & & \text{RG} \\
 8 & X_{10}^* & \text{Spieker Center} & \text{B}^t & \text{MH} \\
 9 & X_{11}^* & \text{Feuerbach Point} & \text{C}^* & \text{RG} \\
 10 & X_{12}^* & \text{$\{X_{1},X_{5}\}$-Harmonic Conjugate of $X_{11}$} & & \text{RG} \\
 11 & X_{20} & \text{de Longschamps Point} & & \\
 12 & X_{21} & \text{Schiffler Point} & & \\
 13 & X_{35} & \text{$\{X_{1},X_{3}\}$-Harmonic Conjugate of $X_{36}$} & & \\
 14 & X_{36} & \text{Inverse-in-Circumcircle of Incenter} & & \\
 15 & X_{40}^* & \text{Bevan Point} & \text{B}^t & \text{MH} \\
 16 & X_{46} & \text{$X_{4}$-Ceva Conjugate of $X_{1}$} & & \\
 17 & X_{55} & \text{Insimilicenter(Circumcircle,Incircle)} & \\
 18 & X_{56} & \text{Exsimilicenter(Circumcircle,Incircle)} & &  \\
 19 & X_{57}^* & \text{Isogonal Conjugate of $X_{9}$} & & \text{MH} \\
 20 & X_{63}^* & \text{Isogonal Conjugate of $X_{19}$} & & \text{MH} \\
 21 & X_{65} & \text{Orthocenter of the Intouch Triangle} & & \\
 22 & X_{72} & \text{Isogonal Conjugate of $X_{28}$} & & \\
 23 & X_{78} & \text{Isogonal Conjugate of $X_{34}$} & & \\
 24 & X_{79} & \text{Isogonal Conjugate of $X_{35}$} & & \\
 25 & X_{80} & \text{Reflection of Incenter in Feuerbach Point} & & \\
 26 & X_{84} & \text{Isogonal Conjugate of $X_{40}$} & & \\
 27 & X_{88}^* & \text{Isogonal Conjugate of $X_{44}$} &  \text{B}^* & \\
 28 & X_{90} & \text{$X_{3}$-Cross Conjugate of $X_{1}$} & \\
 29 & X_{100}^* & \text{Anticomplement of Feuerbach Point} & \text{B}^* & \text{RG} \\
\end{array}
 $$

[image: image] https://user-images.githubusercontent.com/1755487/75593832-9910f700-5a54-11ea-9e46-89ba9323fb50.png

$$
\begin{array}{cll}
 1 & X_{2}^* & \text{Centroid} \\
 2 & X_{4}^* & \text{Orthocenter} \\
 3 & X_{7}^* & \text{Gergonne Point} \\
 4 & X_{10}^* & \text{Spieker Center} \\
 5 & X_{40}^* & \text{Bevan Point} \\
 6 & X_{57}^* & \text{Isogonal Conjugate of $X_{9}$} \\
 7 & X_{63}^* & \text{Isogonal Conjugate of $X_{19}$} \\
 8 & X_{88} & \text{Isogonal Conjugate of $X_{44}$} \\
 9 & X_{100}^* & \text{Anticomplement of Feuerbach Point} \\
\end{array}
$$

[image: image] https://user-images.githubusercontent.com/1755487/75593839-9f06d800-5a54-11ea-80d8-232436b91c39.png

obviously this isnt contained to only raw scripts, it can be used for tikz too

https://metrumresearchgroup.github.io/texPreview/articles/tikz.html

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/dan-reznik/Elliptical-Billiards-Triangular-Orbits/issues/2?email_source=notifications&email_token=AD32VFR3L6RGQX7KLV5FAUDRFGKQPA5CNFSM4K6BTKUKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IRIEKXA, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD32VFUBKTO6DEQL6EZMPETRFGKQPANCNFSM4K6BTKUA .

yonicd commented 4 years ago

i my daily case for report writing I need a bit more flexibility than mathjax with tables and such. in addition we usually port kable/kableExtra outputs to individual tex files in deliverable directory and the main body tex file an input call is the function side effect.

eg

This makes our report writing more modular and easier to QC.

I guess if you are going fully raw tex then you are good with mathjax engine :)