arturadib / strapdown

Instant and elegant Markdown documents in the browser
http://strapdownjs.com
MIT License
2.48k stars 410 forks source link

inline math #73

Open TianBo-Timothy opened 7 years ago

TianBo-Timothy commented 7 years ago

This is follow-up of issue #71

I notice that I cannot use math symbol within the text. For example:

Given a set of observations (x_1, x_2, ..., x_k), where each observation is a d-dimensional real vector, k-means clustering aims to partition the n observations into k (≤ n) sets S = {S_1, S_2, ..., S_n} so as to minimize the within-cluster sum of squares (WCSS) (sum of distance functions of each point in the cluster to the K center).

Here the math part cannot be interpreted correspondingly. I tried to replace x_1 with x1 and then I noticed HTML tags cannot be used.

obedm503 commented 7 years ago

for this, are you using strapdown or bootmark?

if it is bootmark, it is more appropriate to open an issue there or even better in katex-latex

kskarthik commented 7 years ago

This project is still active? I like to use it on my website. Any alt project similar to this?

obedm503 commented 7 years ago

Note: I'm not part of the strapdown project

You can checkout bootmark. It was directly inspired by strapdown. I ended up writing it because the idea of strapdown was great but it hasn't been updated in a while (at least 2 years), and is extremely limiting in the way it does things. Also, bootmark is a lot more extensible through showdown extensions. bootmark uses showdownjs as its parser instead of marked (the parser used by strapdown).

kskarthik commented 7 years ago

Thanks! I will take a look :)

kskarthik commented 7 years ago

But your project looks a bit complex to implement than this

obedm503 commented 7 years ago

i'll say that it can get complex depending on the level of customization you want

this is the bare minimum

<!DOCTYPE html>
<html>
  <head>
    <title>any title</title>
  </head>
  <body>
    <bootmark>
# any title

any markdown  
    </bootmark>
    <script src="https://obedm503.github.io/bootmark/dist/bootmark.bundle.min.js"></script>
  </body>
</html>

of course if you want to fetch external files, change bootstrap theme, code prettify theme, and custumize everything (which you can absolutely do, even the markdown parsing configurations), config has to be set.

If you have any api suggestions I'm open to ideas. I want to make bootmark as easy to use as possible. But like I said at the beginning of the thread, that is better discussed in the boomark repo.

kskarthik commented 7 years ago

Thanks! This is fine for me :smile: Enough to write down some notes