历经坎坷的第一篇博客之旅


昨晚在师兄的帮助下终于完成了这个个人博客的搭建, 真的不胜感激, 如果让我一个人干, 也不知道要搭到什么时候QAQ 搭建的过程碰到了一些奇怪的问题, 折腾最久的还是图片上传出现HTTP错误的问题, 百度了许久, 又是修改文件上传大小限制, 又是从error.log里面去找线索…… 但都没什么卵用…… 庆幸的是, 最后又莫名其妙地好了, 真是丈二摸不着头脑. 哎, 因为以后的文章中会用到Latex代码和makedown格式文本的编辑, 所以先把相关代码放上来, 做个记录叭=。=

使用Latex前需要添加的代码:

<script type="text/javascript" async
  src="https://www.caiqinyi.cn/wp-content/MathJax/MathJax.js?config=TeX-AMS_CHTML">
</script>
<script type="text/x-mathjax-config">
    MathJax.Hub.Config({
        tex2jax: {inlineMath: [['$','$']]},
        TeX: {equationNumbers: {autoNumber: ["AMS"], useLabelIds: true}},
        "HTML-CSS": {linebreaks: {automatic: true}},
        SVG: {linebreaks: {automatic: true}}
    });
</script>

使用makedown格式需要用到的代码范例:

<p>When a \ne 0, there are two solutions to $(ax^2 + bx + c = 0)$ and they are
$$
x = {-b \pm \sqrt{b^2-4ac} \over 2a}\tag{1}
$$</p>

效果为:

When $a \ne 0$, there are two solutions to $(ax^2 + bx + c = 0)$ and they are $$ x = {-b \pm \sqrt{b^2-4ac} \over 2a}\tag{1} $$

不让文章在目录处一口气全部展示出来需要添加的代码(讲真, 我还不知道这句代码是用到了哪个插件……):

<!--more-->

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注