Skip to content

Commit df27f69

Browse files
authored
Merge pull request #143 from Jij-Inc/konn/custom_latex-in-decvar-bound
Fix in decision var bound printing
2 parents e2fd735 + a5afb45 commit df27f69

4 files changed

Lines changed: 129 additions & 1 deletion

File tree

docs/en/releases/unreleased.ipynb

Lines changed: 47 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/ja/releases/unreleased.ipynb

Lines changed: 46 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

markdowns/en/releases/unreleased.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,24 @@ problem.generate_random_dataset(seed=17)
166166

167167
Starting with this release, data is generated successfully in cases like the example above.
168168

169+
#### Fixed a bug where `latex` specifications were ignored in LaTeX output for decision variable bounds
170+
171+
We fixed a bug where the values of the `latex=` keyword argument for other variables were ignored when outputting decision variable bounds in $\LaTeX$.
172+
173+
```{code-cell} ipython3
174+
import jijmodeling as jm
175+
176+
problem = jm.Problem("LaTeX bugfix example")
177+
L = problem.Float("L", latex=r"\ell")
178+
U = problem.Float("U", latex=r"\mathcal{U}")
179+
x = problem.ContinuousVar("x", lower_bound=L, upper_bound=U)
180+
problem += x
181+
182+
problem
183+
```
184+
185+
In previous releases, the `latex` specifications were ignored in the code above, and the bounds were displayed as $L \leq x \leq U$.
186+
Starting with this release, the settings are preserved as shown above, and the bounds are displayed as $\ell \leq x \leq \mathcal{U}$.
169187

170188
## Other Changes
171189

markdowns/ja/releases/unreleased.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,24 @@ problem.generate_random_dataset(seed=17)
163163

164164
今回のリリースから、上記のように問題なくデータが生成されるようになりました。
165165

166+
#### 決定変数の上下界のLaTeX出力で `latex` 指定が無視されていた問題の修正
167+
168+
決定変数の上下界を $\LaTeX$ 出力する際に、他の変数の `latex=` キーワード引数の値が無視されていた問題を修正しました。
169+
170+
```{code-cell} ipython3
171+
import jijmodeling as jm
172+
173+
problem = jm.Problem("LaTeX bugfix example")
174+
L = problem.Float("L", latex=r"\ell")
175+
U = problem.Float("U", latex=r"\mathcal{U}")
176+
x = problem.ContinuousVar("x", lower_bound=L, upper_bound=U)
177+
problem += x
178+
179+
problem
180+
```
181+
182+
これまでのリリースでは、上記のコードでは `latex` 指定が無視され、$L \leq x \leq U$ のように表示されていましたが、上記のように設定が保たれるようになり、$\ell \leq x \leq \mathcal{U}$ と表示されるようになりました。
183+
166184
## その他の変更
167185

168186
- バージョン条件を緩和し、Python 3.11 以降の任意の Python 3 でのインストールを許容しました。

0 commit comments

Comments
 (0)