[問題] algorithm2e下字體不使用斜體

作者: pabeni (蝸牛)   2015-10-12 13:35:55
我使用的package是algorithm2e,
但在使用"\While"、"\If"、"\For"等函式下,
condition的部份都會被限制為是"數學模式",
請問 有辦法可以在condition的地方不使用數學模式嗎?
以下為例子:
1. \begin{algorithm}
2. \If{current is a goal}{
3. \Return success;
4. }
5. \end{algorithm}
我期望能夠看到第2行的"is a goal" 是正體字,
這樣才能區分出"current"為變數,"is a goal"為敘述。
請問是否可以達成這個目標呢?
又或者 各位鄉民大大有什麼樣的建議?
謝謝!
作者: AndyLee76 (AndyLee)   2015-10-12 16:32:00
包進\mbox{}試試
作者: pabeni (蝸牛)   2015-10-13 11:31:00
我有試過包進\mbox喔,可是還是不行。

Links booklink

Contact Us: admin [ a t ] ucptt.com