Hello, I'm trying use pretty printing Java inline. To get my keywords in a slanted typeface, I've found out that I need a space before and after the statement I'm typesetting. I'm trying to automate the space in a macro \Java[], but am having no success. I believe I'm typesetting a space before and after my statement, but the space isn't acceptable to the \type macro: ----- \definetype [typeJV] [option=JV,palet=graypretty,style=\ttx,icommand=\sl] \def\Java[#1]{\typeJV{ #1 }} \setupcolors[state=start] \starttext This statement should have inserted spaces, in order to trigger the slanted behaviour in the `import' keyword: \blank[medium] The ``\Java[import java.io.File;]'' statement \blank[big] This is the type of typesetting I would like to automate: \blank[medium] The ``\hskip-0.5em\typeJV{ import java.io.File; }\nospace{}'' statement. \stoptext -----
participants (1)
-
Guy Worthington