Tag Info

New answers tagged


The algorithm2e package uses \ArgSty to typeset the argument of \If. If you don't want italics, add \SetArgSty{textup} Complete example: \documentclass{article} \usepackage{algorithm2e} \SetArgSty{textup} \begin{document} \begin{algorithm} \If{\textsf{current\_state} satisfies \textsf{goal}} { return \textsf{existing\_plan} } \end{algorithm} ...


You can use \textup instead of \textrm as suggested by egreg. The code now reads like this: \documentclass{article} \usepackage{algorithm2e} \begin{document} \begin{algorithm} \If{\textsf{current\_state} \textup{satisfies} \textsf{goal}} { return \textsf{existing\_plan} } \end{algorithm} \end{document} and the output as required:


If choosing another fonttheme you will see, that beamer makes a difference between textsl and textit. \documentclass{beamer} \usefonttheme{serif} \begin{document} \begin{frame}{} \textsl{Welcome to my world!} \textit{Welcome to my world!} \end{frame} \end{document}


$B^{\mathit{high}}$ or $B^{\mathrm{high}}$ I'd probably use the latter. As you noted it's possible to omit the {} around \mathit{high} but it's not a good practice it would fail with most commands, it just works with \mathit because of the slightly bizarre way that ^ works. the \text... commands will also use script size fonts if amsmath is loaded ...


Apparently Linux Libertine lacks the Cyrillic alphabet in the bold italic font, but it has it in the semibold italic font. So a workaround is to use semibold instead of bold: \documentclass{article} \usepackage{fontspec} \begin{document} \setmainfont[ Path = /usr/local/texlive/2014/texmf-dist/fonts/opentype/public/libertine/, Extension ...

Top 50 recent answers are included