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

cannot see output #4

Closed
floswald opened this issue Aug 23, 2018 · 11 comments
Closed

cannot see output #4

floswald opened this issue Aug 23, 2018 · 11 comments

Comments

@floswald
Copy link

hi there,

thanks for making this available. i was trying to follow the example steps

julia> using Remark

julia> sd = Remark.slideshow(joinpath(Pkg.dir("Remark"),"examples","example.md"),".")
Documenter: setting up build directory.
Documenter: expanding markdown templates.
Documenter: building cross-references.
Documenter: running document checks.
 > checking for missing docstrings.
 > running doctests.
 > checking footnote links.
Documenter: populating indices.
Documenter: rendering document.
Documenter: copying assets to build directory.
"/Users/florian.oswald/testp"

julia> Remark.open(sd)

but got a blank browser window:

<!DOCTYPE html>
<html>
  <head>
    <title>Title</title>
    <meta charset="utf-8">
    <style>
      /* Lora used for body */
      @font-face{
        font-family: 'Lora';
        src: url('fonts/Lora/Lora-Regular.ttf');
      }
      @font-face{
        font-family: 'Lora';
        src: url('fonts/Lora/Lora-Bold.ttf');
        font-weight: bold;
      }
      @font-face{
        font-family: 'Lora';
        src: url('fonts/Lora/Lora-Italic.ttf');
        font-style: italic;
      }
      @font-face{
        font-family: 'Lora';
        src: url('fonts/Lora/Lora-BoldItalic.ttf');
        font-weight: bold;
        font-style: italic;
      }

      /* Yanone Kaffeesatz used for h1, h2, h3 */
      @font-face{
        font-family: 'Yanone Kaffeesatz';
        src: url('fonts/Yanone_Kaffeesatz/YanoneKaffeesatz-Regular.ttf');
      }
      @font-face{
        font-family: 'Yanone_Kaffeesatz';
        src: url('fonts/Yanone_Kaffeesatz/YanoneKaffeesatz-Bold.ttf');
        font-weight: bold;
      }

      /* Ubuntu Mono used for code, do we need Italic for code ? */
      @font-face{
        font-family: 'Ubuntu Mono';
        src: url('fonts/Ubuntu_Mono/UbuntuMono-Regular.ttf');
      }
      @font-face{
        font-family: 'Ubuntu Mono';
        src: url('fonts/Ubuntu_Mono/UbuntuMono-Bold.ttf');
        font-weight: bold;
      }
      @font-face{
        font-family: 'Ubuntu Mono';
        src: url('fonts/Ubuntu_Mono/UbuntuMono-Italic.ttf');
        font-style: italic;
      }
      @font-face{
        font-family: 'Ubuntu Mono';
        src: url('fonts/Ubuntu_Mono/UbuntuMono-BoldItalic.ttf');
        font-weight: bold;
        font-style: italic;
      }

      body { font-family: 'Droid Serif'; }
      h1, h2, h3 {
        font-family: 'Yanone Kaffeesatz';
        font-weight: normal;
      }
      .remark-code, .remark-inline-code { font-family: 'Ubuntu Mono'; }
    </style>
    <link rel="stylesheet" type="text/css" href="styles.css">  
  </head>
  <body>

    <script src="remark.min.js" type="text/javascript"></script>
    <script src="katex.min.js"></script>
    <script src="auto-render.min.js"></script>
    <link rel="stylesheet" href="katex.min.css">
    <script type="text/javascript">
        var options = {};
        var renderMath = function() {
        // renderMathInElement(document.body);
        // or if you want to use $...$ for math,
        renderMathInElement(document.body, {delimiters: [ // mind the order of delimiters(!?)
            {left: "$$", right: "$$", display: true},
            {left: "$", right: "$", display: false},
            {left: "\\[", right: "\\]", display: true},
            {left: "\\(", right: "\\)", display: false},
        ]});
        }

        var slideshow = remark.create({
          sourceUrl: 'index.md'
        }, renderMath);

        </script>
  </body>
</html>

any ideas? thanks

@floswald
Copy link
Author

here is index.md in the same dir:


# Example presentation


Some Julia code


```julia
1+2
```


--


A fragment


---




# Some equations


Here is a fraction: $\frac{1}{2}$


---




# A plot


```julia
using Plots; pyplot()
Plots.plot(rand(10))
savefig("statplot.png");
```

@piever
Copy link
Owner

piever commented Aug 23, 2018

Mhm, the html file looks correct. I suspect it could be a browser issue. Did the command open Safari? What happens if you manually open it with another browser (like Firefox or Google Chrome)?

@piever
Copy link
Owner

piever commented Aug 23, 2018

If you open the browser console, do you see any errors?

Another thing to check: in the build folder do you have all the relevant javascript libraries?

@floswald
Copy link
Author

didn't try firefox, but that works! neither safari or chrome did work.
this is great news - but why is it not working in the other 2 browsers? is there a certain requirement that those browsers don't fulfil (chrome is at latest version). thanks!

@floswald
Copy link
Author

another way to ask this question: did you give your presentation on your own laptop with firefox installed, or how did you know that would work on computer on site?

@piever
Copy link
Owner

piever commented Aug 23, 2018

Safari tends to be a tricky case. I gave the talk of firefox, will try to see if I can fix it on Chrome as soon as I have some spare time (browser compatibility really is the most painful part of web development...).

@piever
Copy link
Owner

piever commented Aug 23, 2018

On a separate note, open issues liberally here: I haven't specified this in the README but this package really didn't get a lot of testing so it's good for me to know whether it also works on someone else computer reliably.

@floswald
Copy link
Author

floswald commented Aug 23, 2018

why can i see this https://piever.github.io/juliacon2018/build/ correclty in safari though?

(very nice work by the way!!)

@piever
Copy link
Owner

piever commented Aug 25, 2018

I've figured it out, chrome doesn't support keeping the markdown in a separate file, I need to put it inside the html. Really not sure why that is but the fix is simple enough...

@piever
Copy link
Owner

piever commented Aug 25, 2018

Ok, should be fixed on master: could you pull and try again?

@floswald
Copy link
Author

works on both safari and chrome now! good job!thanks!

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

2 participants