daily pastebin goal
26%
SHARE
TWEET

Untitled

a guest Nov 18th, 2017 48 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. \documentclass[a4paper,12pt]{article}
  2. \usepackage[LY1]{fontenc}
  3. \usepackage[utf8x]{inputenc}
  4. \usepackage{polski}
  5. \usepackage[lf]{berenis}
  6.  
  7. \usepackage{listings}
  8. \usepackage{xcolor}
  9. \DeclareTextCompositeCommand{\k}{LY1}{a}
  10.   {\oalign{a\crcr\noalign{\kern-.27ex}\hidewidth\char7}}
  11. \begin{document}
  12.  
  13. \lstset{
  14.     frame=tb, % draw a frame at the top and bottom of the code block
  15.     tabsize=4, % tab space width
  16.     showstringspaces=false, % don't mark spaces in strings
  17.     numbers=left, % display line numbers on the left
  18.     commentstyle=\color{green}, % comment color
  19.     keywordstyle=\color{blue}, % keyword color
  20.     stringstyle=\color{red}, % string color  
  21.     inputencoding=utf8x,
  22.     extendedchars=\true,
  23.     literate={ą}{{\k{a}}}1
  24.              {Ą}{{\k{A}}}1
  25.              {ę}{{\k{e}}}1
  26.              {Ę}{{\k{E}}}1
  27.              {ó}{{\'o}}1
  28.              {Ó}{{\'O}}1
  29.              {ś}{{\'s}}1
  30.              {Ś}{{\'S}}1
  31.              {ł}{{\l{}}}1
  32.              {Ł}{{\L{}}}1
  33.              {ż}{{\.z}}1
  34.              {Ż}{{\.Z}}1
  35.              {ź}{{\'z}}1
  36.              {Ź}{{\'Z}}1
  37.              {ć}{{\'c}}1
  38.              {Ć}{{\'C}}1
  39.              {ń}{{\'n}}1
  40.              {Ń}{{\'N}}1
  41. }
  42.  
  43. \begin{lstlisting}[language=C++,frame=single]
  44. while(again == 1)
  45.      //again er defineret som 1, loekken koeres igen.
  46.     //początki bywają trudne
  47.     cout << "Velkommen til BMI beregneren!" << endl;
  48.     cout << "\nEr du en mand eller kvinde?
  49.     Tast 1 for mand, tast 2 for kvinde" << endl;
  50.     cin >> sex;
  51.     cout << "Indtast din hojde i cm." << endl;
  52.     cin >> height;
  53.     cout << "Indtast din vaegt i KG." << endl;
  54.     cin >> weight;
  55. \end{lstlisting}
  56.  
  57. \end{document}
RAW Paste Data
Top