SHARE
TWEET

Untitled

a guest Jun 27th, 2019 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. documentclass[12pt,oneside,a4paper,openright]{report}
  2. usepackage[utf8]{inputenc}
  3. usepackage[T1]{fontenc}
  4. usepackage[sc]{mathpazo}                      
  5. usepackage[utf8]{inputenc}
  6. usepackage[danish, english]{babel}
  7. usepackage{xcolor}
  8. usepackage{graphicx}
  9.  
  10. % Colors for Code
  11. definecolor{grayC}{RGB}{250,250,250}
  12. definecolor{Dgray}{RGB}{200,200,200}
  13. definecolor{bluekeywords}{rgb}{0,0,1}
  14. definecolor{greencomments}{rgb}{0,0.5,0}
  15. definecolor{redstrings}{rgb}{0.64,0.08,0.08}
  16. definecolor{xmlcomments}{rgb}{0.5,0.5,0.5}
  17. definecolor{types}{rgb}{0.17,0.57,0.68}
  18.  
  19. usepackage{listings}
  20.  
  21. lstset{
  22.   literate= {Ø}{{O}}1 {Æ}{{AE}}1 {Å}{{AA}}1
  23. }
  24.  
  25. lstdefinelanguage{BABs} {
  26.     alsoletter={O,AE,AA},
  27.     morekeywords={
  28.         HVIS,
  29.         GØR,
  30.         FÆRDIG,
  31.         ER,
  32.         IKKE,
  33.         OG,
  34.         ELLER,
  35.         GENTAG,
  36.         OPDATER,
  37.         TABEL,
  38.         RÆKKE,
  39.         VIS,
  40.         INDLÆS,
  41.         SANDHEDSVÆRDI,
  42.         TEKST,
  43.         DECIMALTAL,
  44.         HELTAL,
  45.         SAND,
  46.         FALSK
  47.   },
  48.   sensitive = false, % No case sensitivity of keywords
  49.   morecomment = [s]{#}{#},   % Comment with start and end
  50.   morestring = [b]" % Strings are enclosed with "
  51. }
  52.  
  53. % Some additional settings for BABs
  54. lstset{language=BABs,
  55.   backgroundcolor=color{grayC},
  56.   basicstyle=ttfamilysmall,      
  57.   breakatwhitespace=false,          
  58.   breaklines=true,                                  
  59.   commentstyle=color{greencomments},  
  60.   deletekeywords={...},            
  61.   escapeinside={(*@}{@*)},          
  62.   extendedchars=true,              
  63.   frame=single,                    
  64.   keepspaces=true,                  
  65.   keywordstyle=color{bluekeywords},  
  66.   numbers=left,                    
  67.   numbersep=5pt,                    
  68.   numberstyle=tinycolor{black},  
  69.   rulecolor=color{Dgray},          
  70.   showspaces=false,                
  71.   showstringspaces=false,          
  72.   showtabs=false,                  
  73.   stepnumber=1,                    
  74.   stringstyle=color{redstrings},  
  75.   tabsize=2                        
  76. }
  77.  
  78. begin{document}
  79.  
  80. This is a test to show that lstinline[language=BABs]|GØR{<Stmts>}| and lstinline[language=BABs]{FÆRDIG} are not properly highlighted, however lstinline[language=BABs]{HVIS(<BoolExpr>)} is.
  81.  
  82. end{document}
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top