<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Posts on 周尚节 Shangjie Zhou</title>
    <link>https://Zhou-Shangjie.me/posts/</link>
    <description>Recent content in Posts on 周尚节 Shangjie Zhou</description>
    <image>
      <title>周尚节 Shangjie Zhou</title>
      <url>https://Zhou-Shangjie.me/%3Clink%20or%20path%20of%20image%20for%20opengraph,%20twitter-cards%3E</url>
      <link>https://Zhou-Shangjie.me/%3Clink%20or%20path%20of%20image%20for%20opengraph,%20twitter-cards%3E</link>
    </image>
    <generator>Hugo -- gohugo.io</generator>
    <lastBuildDate>Sat, 17 Jun 2023 15:42:54 +0800</lastBuildDate><atom:link href="https://Zhou-Shangjie.me/posts/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>关于本站</title>
      <link>https://Zhou-Shangjie.me/posts/about-this-site/</link>
      <pubDate>Sat, 17 Jun 2023 15:42:54 +0800</pubDate>
      
      <guid>https://Zhou-Shangjie.me/posts/about-this-site/</guid>
      <description>本站使用Hugo搭建，模板用的是Hugo PaperMod，源代码用Github管理，页面托管在Cloudflare Pages上。之所以没有用Github Pages托管是因为百度的爬虫被Github封禁掉了。此外，我禁止Google爬取除了posts之外的内容，防止Google搜索我名字的时候此网站的结果和我的学术主页结果相冲突。
首页上的memos是一个在Github上的开源项目，类似于一个私有的Twitter，如果你也想在我的memos上发言，可以联系我。
这个网站并不主要是学术内容，如果你想要了解我的研究可以前往我的学术主页。
For those of you who are looking for something about my research and resources in physics, please check out my academic website. The website you are looking at is mostly about my life outside academia.</description>
    </item>
    
    <item>
      <title>TikZ导出PNG格式图片</title>
      <link>https://Zhou-Shangjie.me/posts/latex-png/</link>
      <pubDate>Sun, 27 Feb 2022 20:38:05 +0800</pubDate>
      
      <guid>https://Zhou-Shangjie.me/posts/latex-png/</guid>
      <description>利用LaTeX的TikZ宏包可以绘制图形，但是默认导出的为pdf格式。有时我们需要PNG等图片格式以便于插入在网页上，于是需要将pdf格式转换为图片格式。
安装ImageMagick 首先，我们去ImageMagick官网下载合适版本的ImageMagick。下载完成后安装即可。安装完成后将安装目录添加到系统Path路径中(系统搜索环境变量)。
允许-shell-escape 不同编辑器允许-shell-escape的方式不同，可以在这个StackExchange问题下查找：How can I enable shell-escape?。
此处以VScode中的LaTeX Workshop插件为例。 打开VScode，确保已经安装LaTex Workshop。按下Ctrl+Shift+P，输入Preferences: Open Settings (JSON)。进入settings.json中添加如下代码
&amp;#34;latex-workshop.latex.tools&amp;#34;: [ { &amp;#34;name&amp;#34;: &amp;#34;latexmk&amp;#34;, &amp;#34;command&amp;#34;: &amp;#34;latexmk&amp;#34;, &amp;#34;args&amp;#34;: [ &amp;#34;-shell-escape&amp;#34;, &amp;#34;-synctex=1&amp;#34;, &amp;#34;-interaction=nonstopmode&amp;#34;, &amp;#34;-file-line-error&amp;#34;, &amp;#34;-pdf&amp;#34;, &amp;#34;-outdir=%OUTDIR%&amp;#34;, &amp;#34;%DOC%&amp;#34; ], &amp;#34;env&amp;#34;: {} } ] 如果以前输入过，只需在&amp;quot;args&amp;quot;栏目中添加&amp;quot;-shell-escape&amp;quot;一项。这样就允许了-shell-excape。
LaTeX代码设置 为了导出PNG格式，我们选用standalone文档类，调用其中的convert选项来完成格式转换。下面给出一个例子：
\documentclass[convert={convertexe={magick}}]{standalone} \usepackage{tikz-cd} \usepackage{amsmath,amssymb} \usepackage{mathtools} \pagecolor{white} \begin{document} \begin{tikzcd}[row sep=huge] &amp;amp;D^{2}\arrow[dl,shift right]\arrow[dr,shift left,&amp;#34;+S^{1}&amp;#34;]{+S^{1}}&amp;amp;\\ \mathbb{R}^{2}\arrow[ur,shift right]\arrow[rr,&amp;#34;+\{\infty\}&amp;#34;] &amp;amp; &amp;amp;S^{2}\arrow[ul,shift left,&amp;#34;-\{p\}&amp;#34;] \end{tikzcd} $\xRightarrow{\text{generlization}} S^{n}=\mathbb{R}^{n}\bigcup \{\infty\}$ \end{document} 注意以下几点：
代码第一行的文档选项convert={convertexe={magick}}里面的magick为下载的ImageMagick中.exe文件的文件名（以后版本文件名也可能有变化，要注意改变）。网上其他相关的资料可能文档选项只有convert，因为ImageMagick早期版本可能文件名与现在不同。 转换后得到的PNG图片可能背景是透明的,\pagecolor{white}可以让背景变为白色。 默认得到的为300dpi的PNG格式图片。可以更改选项调整得到需要的图片，具体见：standalone官方文档。 该代码生成的图片为： </description>
    </item>
    
  </channel>
</rss>
