Word inserts pseudo code with Aurora

Recently, the mainstream method to insert pseudo code in the paper is Aurora, but I encountered various problems when installing it myself... This old plug-in is too troublesome.
Normal installation should only support 32-bit Office (who still uses 32-bit these days).

Operating system: Win10
Office version: 2019, 64 bit

Aurora + miktex2 needs to be installed 9, Download address

1 installation

  1. Install MiKTeX 2.9 first
  2. Then install Aurora without miktex
  3. Then run keygen to crack

(many online tutorials say that the time is changed to 2009 or 2005, but there will be problems after the time is changed, so I didn't set it like this.)
They are not installed in the default path, but installed on disk D. facts have proved that it does not affect the use.

2 setting

Set paths, find the corresponding file in your installation path and fill it in.

Then you can write some simple code. such as

3 pseudo code configuration

The pseudo code needs to install additional Packages. The common saying on the Internet is to enter in Packages, but I always report an error

problems running latex

3.1 setting the Rendering method

3.2 [important] installation package!!!
This is the reason why I failed to install the online tutorial at the beginning.
Run miktex console as an administrator Exe, where is your location

D:\Software\MiKTeX_Aurora\MiKTeX\miktex\bin\x64


3.3 add package
There are many examples on the Internet, but there is little difference. Here are some excerpts for standby.
I used the second one. The first package looks more, but the second is enough for common code.
If you use the first one, you will still report problems running latex. It should be that you need to download other libraries. Don't bother yourself first.

\usepackage{amsmath}
\usepackage{amssymb}
% \usepackage{euler}
\providecommand{\abs}[1]{\left\lvert#1\right\rvert}
\providecommand{\norm}[1]{\left\lVert#1\right\rVert}
\usepackage{bbm}
\usepackage{CJK}
\usepackage{listings}
\usepackage{xcolor}
\usepackage{listings}
\usepackage{amsmath,bm,graphicx,multirow,bm,bbm,amssymb,psfrag,algorithm,subfigure,color,mdframed,wasysym,subeqnarray,multicol}

\usepackage{algorithm}
\usepackage{algpseudocode}
\usepackage{amsmath}
\renewcommand{\algorithmicrequire}{\textbf{Input:}}
\renewcommand{\algorithmicensure}{\textbf{Output:}}

\documentclass{article}

\usepackage{multirow}
\usepackage{algorithm}
\usepackage{algpseudocode}
\usepackage{amsmath}
\usepackage{geometry}
\usepackage{algorithmicx}
\usepackage{algpseudocode}

\renewcommand{\algorithmicrequire}{\textbf{Input:}} % Use Input in the format of Algorithm
\renewcommand{\algorithmicensure}{\textbf{Output:}} 

4 write pseudo code

Several examples are provided below
Example 1

\renewcommand{\thealgorithm}{1}
\begin{algorithm}[H]
\caption{algorithm caption} %Name of the algorithm
\hspace*{0.02in} {\bf Input:} %Input to the algorithm, \hspace*{0.02in}Used to control position and use \\ Wrap
input parameters A, B, C\\
\hspace*{0.02in} {\bf Output:} %Result output of algorithm
output result
\begin{algorithmic}[1]
\State some description % \State Write general statements after
\For{condition} % For Statement, requires and EndFor corresponding
  \State ...
  \If{condition} % If Statement, requires and EndIf corresponding
    \State ...
  \Else
    \State ...
  \EndIf
\EndFor
\While{condition} % While Statement, requires and EndWhile corresponding
  \State ...
\EndWhile
\State \Return result
\end{algorithmic}
\end{algorithm}

effect

Example 2

\renewcommand{\thealgorithm}{1}
\begin{algorithm}[H] 
\caption{*******************************************} 
\label{ABCLFRS}
\begin{algorithmic}[1] 
\Require{S,$\lambda$,T,k} 
\Ensure{$\mathbf{w}_{222}$}\\ 
\textbf{initialize}: Set $\mathbf{w}_1 = 0$ 
\For{$t = 1,2,...,T$} 
\State Choose $A_t \subset[m]$
\EndFor
\end{algorithmic} 

\end{algorithm}

effect

Example 3

\begin{algorithm}[H]  
      \caption{algorithm1}  
      \label{your label}  
      \begin{algorithmic}[1]  
        \Require  
          Enter .....;  
        \Ensure  
          Outpur......  
        \State state1......  
        \State state2......  
        \State state3......  
        \While{(a$>$b)}  
      
            \State  state4......  
            \If { c$<$d}  
                \State state5......  
            \Else  
                \State state6......  
            \EndIf  
            \State state7......  
        \EndWhile  
        \For{aaa}  
            \State state8......  
        \EndFor  
      \end{algorithmic}  
    \end{algorithm}

effect

reference resources

The following articles provide help in this installation. Thank the author!
Aurora formula plug-in in office, super easy to use (including download and installation package)
Problems running LaTex in Aurora, solved
Aurora problems running latex
Word2016 paper writing -- installing Aurora, editing Latex formula and writing pseudo code

Thank you for the following articles!
[latex] 2 write pseudo code in word using Aurora and
How to insert pseudo code gracefully in Word
Write pseudo code in word2016
How to solve the operation problem of Aurora in WPS/WORD

Keywords: msword

Added by ajmoore on Sun, 16 Jan 2022 03:53:18 +0200