\newcommand を使って指定する。入力の数は自由に指定できる。
例
\newcommand{\variable}[2]{Hello #1. Good #2.}
\variable{Taro}{morning}
結果

雑記
投稿日:
\newcommand を使って指定する。入力の数は自由に指定できる。
\newcommand{\variable}[2]{Hello #1. Good #2.}
\variable{Taro}{morning}

執筆者:seyanen
関連記事
python3 で、文字列の最後が特定の文字で終わるか判定する方法
endswith を使う。 例 str1 = “こんにちは” result1 = str1.endswith(“は”) result2 = str1.endswith(“わ”) print(resul …
plt.xlabel と plt.ylabel を使う。 例 import numpy as np import matplotlib.pyplot as plt x = np.linspace(0, …
文章中でインテグラル(積分記号)を大きくするには、\displaystyle と書けばよい。 例 usual $\int \frac{ax+b}{cx+d} dx$display style $\di …
2023/01/18
matplotlib のグラフ作成と gnuplot との対応 比較
2022/10/14
pythonで配列(リスト)の、ある要素がわかっているときにその次の要素を取得する方法。