Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LaTeX #92

Closed
ChrisRackauckas opened this issue Apr 7, 2017 · 12 comments
Closed

LaTeX #92

ChrisRackauckas opened this issue Apr 7, 2017 · 12 comments

Comments

@ChrisRackauckas
Copy link
Member

Can you input LaTeX into Weave? Is it in the docs?

@mpastell
Copy link
Collaborator

mpastell commented Apr 7, 2017

You can and sort of.
See: http://weavejl.mpastell.com/stable/usage/#supported-formats, http://weavejl.mpastell.com/stable/usage/#noweb-format and outdated sample https://github.com/mpastell/Weave.jl/blob/master/examples/julia_latex.texw that needs to be fixed...

Also language-weave recognizes .texw files in Atom and does correct syntax highlighting and you can run code from the chunks.

@joshualeond
Copy link

Is there a way to have chunks of LaTeX within a .jmd file similar to R Markdown's $\hat y$ syntax? I didn't see this an any examples. Thanks.

@mpastell
Copy link
Collaborator

Yes. You can use LaTeX math with the same syntax as rmarkdown. The default markdown flavor is Julia markdown.

@krcools
Copy link

krcools commented Jun 13, 2017

Is there a way to have things verbatim included in the resulting tex file? (cf raw cells in Jupyter notebooks) This would enable the definition of macros...

@joshualeond
Copy link

I was able to use LaTeX similar to rmarkdown with the $ syntax as you mentioned. The only difference I saw was that the double $$ syntax wasn't supported for multiline equations. Is that correct? Also, It would be really cool to have a weave button in Juno similar to the knit button in RStudio. Not to take away from the great work you've done here, I just think it would be a nice feature in the future. Thanks again.

@mpastell
Copy link
Collaborator

mpastell commented Jan 3, 2018

For reference:
The markdown flavor used in html and pdf output (md2html and md2pdf formats) is Julia Markdown: https://docs.julialang.org/en/stable/manual/documentation/#Markdown-syntax-1.

rmarkdown uses Pandoc so if you need features from Pandoc markdown you can use pandoc, pandoc2html or pandoc2pdf formats.

@mpastell
Copy link
Collaborator

mpastell commented Jan 3, 2018

If you want a Weave button in Juno it's probably better to open issue in Juno repository. Or if you can add it to https://github.com/mpastell/language-weave I'd be happy to include it.

@dlfivefifty
Copy link
Contributor

FYI I found out to add LaTeX macros I need to use double-tic:

``
\def\foo{x^2}
``

@dlfivefifty
Copy link
Contributor

Actually, LaTeX support seems quite brittle: in my file if I have a single surface plot, it works, but if I add a second surface plot, none of the LaTeX renders.

Is there a way to debug what's causing the problem?

@kapple19
Copy link

kapple19 commented Jul 9, 2019

FYI I found out to add LaTeX macros I need to use double-tic

This doesn't seem to work for me. The defined macro needs to be in the same equation block as location it's used, then it works. That almost defeats the purpose of defining a macro.

I hope we can define document macros soon. Otherwise I'm just going to stick to .tex files.

@dlfivefifty
Copy link
Contributor

There seems to be inconsistency between HTML and PDF. For PDF I managed to get it working using a template, though you need to avoid double brackets {{ by adding a space in between.

@jessebett
Copy link

jessebett commented Jan 17, 2020

Anyone know how to get LaTeX block (i.e. not inline) equation environments $$eqn$$ to work inside of markdown enumerate?

No matter what I do, if I use the block equation environment the text below no longer follows the enumerate.

i.e.

1. enumerated
2. enumerated

$$
math
$$

not part of enumerated

I have tried indenting the math, but weave throws an error.

Is there any way to make it so the environment would behave as though I had block equation environment inside a latex enumerate?


Solution:

You can indent the environment only if it is all on one line.

1. item
2. item
    continued

    $$math$$

    part of enumerated

Still not sure how this is meant to work for something more complicated like a multiline equation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants