joerglenhard

Minimal Sample for Custom Workflow Style

Sep 27th, 2011
654
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. \documentclass{article}
  2. %
  3. % hier zunächst die benötigten packages
  4. \usepackage{color}
  5. \usepackage{listings}
  6.  
  7. \definecolor{lightgray}{rgb}{.9,.9,.9}
  8. \definecolor{darkgray}{rgb}{.4,.4,.4}
  9. \definecolor{forestGreen}{RGB}{34,139,34}
  10. \definecolor{orangeRed}{RGB}{255,69,0}
  11.  
  12. \lstdefinelanguage{bpel}{
  13. morekeywords={name,linkName,isolated,parallel,partnerLink,operation,portType,inputVariable,createInstance,
  14. variable,element,location,importType,partnerLinkType,myRole,messageType,properties,level,outputVariable,
  15. xmlns,version,encoding}
  16. }
  17. \lstdefinelanguage{xaml}{
  18. morekeywords={TypeArguments,Name,Default,DisplayName,OperationName,ServiceContractName,Key,AddressUri,
  19. CanCreateInstance, LogName, Message, MessageNumber, Expression,CorrelationHandle,Request}
  20. }
  21.  
  22. \lstdefinelanguage{xml}{
  23.     basicstyle=\small,
  24.     sensitive=false,
  25. }
  26.  
  27. \lstdefinestyle{workflowStyle}{
  28. language=XML,
  29. alsolanguage=bpel,
  30. alsolanguage=xaml,
  31. %Formatting
  32. basicstyle=\scriptsize,
  33. sensitive=true,
  34. showstringspaces=false,
  35. numbers=left,
  36. numberstyle=\tiny,
  37. tabsize=4,
  38. numbersep=3pt,
  39. extendedchars=true,
  40. xleftmargin=2em,
  41. lineskip=1pt,
  42. breaklines,
  43. captionpos=t,
  44. %Coloring
  45. backgroundcolor=\color{lightgray},
  46. morekeywords={BooleanExpression},
  47. alsoletter={:,<,>,/,?},
  48. morestring=[b]{"},
  49. morecomment=[s]{<!--}{-->},keywordstyle=\color{forestGreen},
  50. identifierstyle=\color{blue}\ttfamily,
  51. stringstyle=\color{orangeRed}\ttfamily,
  52. commentstyle=\color{forestGreen}\ttfamily
  53. }
  54.  
  55.  
  56. \lstnewenvironment{workflow-code}[2]{
  57. \lstset{caption=#1,label=#2,style=workflowStyle}
  58. }{}
  59.  
  60. \begin{document}
  61.  
  62. \begin{workflow-code}{caption}{label}
  63. <assign name ="LogActivity">
  64.     <trace>
  65.         <log level="info" location="onComplete">
  66.             <from variable="logMessage"/>
  67.         </log>
  68.     </trace>
  69.     <!--copy a meaningful message to variable logMessage-->
  70. </assign>
  71. \end{workflow-code}
  72.  
  73. \end{document}
  74.  
RAW Paste Data