Word中插入三线格算法公式,放大不变形
生活随笔
收集整理的這篇文章主要介紹了
Word中插入三线格算法公式,放大不变形
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
1.在tex文件中編寫相關(guān)代碼
這里要取消顯示頁碼,不然會產(chǎn)生額外的邊框,影響整體美觀。
\documentclass[UTF8]{ctexart} \usepackage{graphicx} %調(diào)用graphicx宏包 \usepackage{algorithm} \usepackage{algpseudocode} \usepackage{amsmath} \usepackage{setspace} % 設(shè)置行距用到\thispagestyle{empty} % 當(dāng)前頁不顯示頁碼 \usepackage{ulem} \newcommand{\li}{\uline{\hspace{0.5em}}} \newcommand{\spe}{\ \ \ \ } \newcommand{\nspe}{\\ \ \ \ \ } \renewcommand{\algorithmicrequire}{\textbf{Input:}} % Use Input in the format of Algorithm \renewcommand{\algorithmicensure}{\textbf{Output:}} % Use Output in the format of Algorithm \begin{document} \begin{minipage}{9cm}\begin{algorithm}[H] \caption{MixMatch算法變體} \label{ABCLFRS} \begin{algorithmic}[1] \Require{$x, y, u$} \Ensure{$loss$}\\ \textbf{initialize}: Set $\mathbf{w}_1 = 0$ \For{$(x_,y_)\ in\ (x,y)$}\nspe$p_b={\rm one\_hot}(y_b)$\nspe$u_=next(u)$\nspe$\overline{q}_=p_{model}(y|{u}_;\theta)$\nspe$q_={\rm Sharpen}(\overline{q}_,T)$\nspe$inputs={\rm Concat}(x_b,u_b)$\nspe$m\_inputs = {\rm MixUp}(inputs,{\rm Shuffle}(inputs))$\nspe$targets={\rm Concat}(p_b,q_b)$\nspe$m\_targets = {\rm MixUp}(targets,{\rm Shuffle}(targets))$\nspe$logits\_x = p_{model}(y|m\_inputs[0])$\nspe$logits\_u = p_{model}(y|m\_inputs[1])$\nspe$loss_1={\rm semi\_loss}(logits\_x,m\_targets[0])$\nspe$loss_2={\rm semi\_loss}(logits\_u,m\_targets[1])$\nspe$loss=loss\_1+loss\_2$ \EndFor \end{algorithmic} \end{algorithm}\end{minipage}\end{document}2. 進(jìn)行編譯。編譯之后會生成pdf文件,如下圖所示。
?3. 將pdf轉(zhuǎn)為svg格式的圖片。
svg是可縮放的矢量圖形格式。
在ubuntu中可以安裝pdf2svg命令,然后使用該命令將pdf轉(zhuǎn)為svg的格式。
?命令執(zhí)行如下:
acat@acat-xx:resume$ pdf2svg test.pdf output.svg這樣就生成了svg文件。
4. 安裝Inkscape軟件,并打開文件:output.svg。如下圖:
?然后鼠標(biāo)點擊中間的算法區(qū)域,就會選中算法區(qū)域,如下圖:
?
?此時點擊菜單欄中的"編輯"->"Resize page to Selection",此時剛剛的頁面邊框就會消失,如下圖:
?4. 保存為emf文件
以此點擊"文件"->"另存為"->保存格式設(shè)為emf格式
?
?
點擊確定即可保存成功。?
5. 將保存完成的emf文件復(fù)制粘貼到word中,可以進(jìn)行顯示。由于是矢量圖,放大依然會很清晰。
?
總結(jié)
以上是生活随笔為你收集整理的Word中插入三线格算法公式,放大不变形的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 【论文导读】Selecting Data
- 下一篇: 各种注册序列号 用户名