Latex Tools

Xiaoyang’s LaTeX Shortcut: v1.0
Google Sheet to LaTeX: Spread-LaTeX

Comment

% Xiaoyang comment
\xyc{...}
% Xiaoyang add
\xya{...}
% Xiaoyang remove
\xyr{...}
% xiaoyang @yixing
\xyc{\atyx}

comment

Mathematic Formula

modified from https://github.com/goodfeli/dlbook_notation

% for scalar (no shortcut)
a, b, ..., z
% for vector
\va, \vb, ..., \vz
% for matrix
\mA, \mB, ..., \mZ
% for set
\sA, \sB, ..., \sZ

# e.g.
\begin{align}
    \vw_{ij}  & = \omega(\delta_{mul}(\vp_i - \vp_j) \odot \gamma(\vq_i, \vk_j) + \delta_{bias}(\vp_i - \vp_j)), \label{eq:pe_multiplier}
\end{align}

math

Table Adjustment

modified from https://tex.stackexchange.com/a/157400/72568 and MAE paper

\newcolumntype{x}[1]{>{\centering\arraybackslash}p{#1}}
\newcolumntype{y}[1]{>{\raggedright\arraybackslash}p{#1}}
\newcolumntype{z}[1]{>{\raggedleft\arraybackslash}p{#1}}
\newcommand{\tablestyle}[2]{\setlength{\tabcolsep}{#1}\renewcommand{\arraystretch}{#2}\centering\footnotesize}

% e.g. table
\begin{table}[t!]
\begin{minipage}{.48\textwidth}
  \tablestyle{2.5pt}{1.05}
  \begin{tabular}{x{35mm}|y{35mm}y{35mm}}
  ...
  \end{tabular}
\end{minipage}
\end{table}

table

Table Generation

Step 1: Install Spread-LaTeX in Google Sheet add-ons (Extensions -> Add-ons -> Get add-ons).

Step 2: Select table region. table

Step 3: Select Spread-LaTeX add-on (Extensions -> Spread-LaTeX -> Convert sheet->LaTeX ). table

Step 4: Copy raw LaTeX code. table

More …

Please try our shortcut command directly in your LaTeX project.