Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

defaultPreamble.sty 5.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2. %% %%
  3. %% defaultPreamble.sty %%
  4. %% %%
  5. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  6. %% %%
  7. %% Setup a preamble for document class: article %%
  8. %% 1.Pagesettings: %%
  9. %% - DIN A4 Paper %%
  10. %% - Margin: Top = 20mm %%
  11. %% Right = 20mm %%
  12. %% Bottom = 30mm %%
  13. %% Left = 30mm %%
  14. %% - Header Separation = 10mm %%
  15. %% - Footer Separation = 10mm %%
  16. %% - Paragraph Spacing = 1.5 * line height %%
  17. %% %%
  18. %% 2.Redefine Pagelayout %%
  19. %% - Remove printed page numbers on page 1+2. %%
  20. %% - Page 1+2 counts for the table of content. %%
  21. %% - Print the page numbering like "Seite" a "von" lastpage %%
  22. %% to the right bottom corner. %%
  23. %% %%
  24. %% 3.Load Packages %%
  25. %% - geometry = Set page settings. %%
  26. %% - setspace = Set linespacing, prevent math formula %%
  27. %% streching. %%
  28. %% - lastpage = Get last page number. %%
  29. %% - fancyhr = Set header, footer and page layout. %%
  30. %% - babel = Set hyphenation rules to [ngerman]. %%
  31. %% - inputenc = Set input encoding to UTF-8 (Umlaute etc.). %%
  32. %% - fontenc = Set font encoding to 8bit (support <,=,>,"). %%
  33. %% - csquotes = Provide support to use " " in tex-document. %%
  34. %% - helvet = Set fontfamily to Helvetica (sans serif). %%
  35. %% - xcolor = Provides support of font colors. %%
  36. %% - hyperref = Provides support of links (pdf anchor), URL. %%
  37. %% - graphicx = Provides support to add images. %%
  38. %% - pdfpages = Provides support to include pdf pages. %%
  39. %% - amsmath = Provides advanced math typesetting support. %%
  40. %% - amsfonts = Provides advanced font typesetting support. %%
  41. %% - amssymb = Provides advanced symbol typesetting support. %%
  42. %% - blindtext = Provides support to use Lorem Ipsum text. %%
  43. %% - biblatex = Set biblatex for citation and bibliography %%
  44. %% with biber as backend and the %%
  45. %% bibliography style 'ieee'. %%
  46. %% %%
  47. %% 4.Defines New Commands %%
  48. %% - \bibfilename{file.bib} = Set bib file. %%
  49. %% - \printbib = Print bibliography. %%
  50. %% %%
  51. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  52. %
  53. \NeedsTeXFormat{LaTeX2e}%
  54. \ProvidesPackage{defaultPreamble}[2019/01/15 v1.0 DefaultPreamble Package from Erik Roemmelt]%
  55. \ProcessOptions\relax%
  56. %%% Packages %%%
  57. % ___Document___
  58. \RequirePackage[a4paper, left=30mm, right=20mm, top=20mm, bottom=30mm, headsep=10mm, footskip=10mm]{geometry} % Set page settings
  59. \RequirePackage[nodisplayskipstretch]{setspace} % Set linespacing and prevent math formula streching
  60. \setstretch{1.5} % Change typeset line spacing by multiplicator 1.5
  61. \RequirePackage{lastpage} % Get last page number with \pageref{LastPage}
  62. \RequirePackage{fancyhdr} % Set header, footer and page layout.
  63. \pagestyle{fancy} % Set the pagestyle to fancyhdr settings
  64. %%% Fancyhdr Settings %%%
  65. \fancyhf{} % Clear all header and footer fields
  66. \fancyfoot[R]{\ifnum\value{page}<3\relax\else{Seite \thepage \hspace{1pt} von \pageref{LastPage}}\fi} % Set page numbering "n / last" in the right field of footer
  67. \renewcommand{\headrulewidth}{0pt} % Set header ruler hidden
  68. \renewcommand{\footrulewidth}{0pt} % Set footer ruler hidden
  69. \fancypagestyle{plain}{% Redefine plain style
  70. \fancyhf{} % Clear all header and footer fields
  71. \fancyfoot[R]{\ifnum\value{page}<3\relax\else{Seite \thepage \hspace{1pt} von \pageref{LastPage}}\fi} % Set page numbering "n / last" in the right field of footer, skip page numbering on page 1+2
  72. \renewcommand{\headrulewidth}{0pt} % Set header ruler hidden
  73. \renewcommand{\footrulewidth}{0pt} % Set footer ruler hidden
  74. }%
  75. % ___Font___
  76. \RequirePackage[ngerman]{babel} % Changes hyphenation rules
  77. \RequirePackage[utf8]{inputenc} % Input encoding: Unicode support (Umlaute etc.)
  78. \RequirePackage[T1]{fontenc} % Font encoding: (8bit) Accents support (<,=,>,",...)
  79. \RequirePackage{csquotes} % Allows to use " " in document.
  80. \RequirePackage[scaled]{helvet} % Changes fontfamily to Helvetica (sans serif)
  81. \renewcommand{\familydefault}{\sfdefault} % Changes default font to sans serif
  82. \RequirePackage[dvipsnames]{xcolor} % Provides font coloring
  83. % ___Other___
  84. \RequirePackage[hidelinks]{hyperref} % Add a link to your document
  85. \RequirePackage{graphicx} % Add pictures to your document
  86. \RequirePackage{pdfpages} % Allows to include pdf pages
  87. \RequirePackage{amsmath} % Advanced math typesetting
  88. \RequirePackage{amsfonts} % Advanced font typesetting
  89. \RequirePackage{amssymb} % Advanced symoblic typesetting
  90. \RequirePackage{blindtext} % Blindtext, Lorem Ipsum text
  91. % __Bibliography___
  92. \RequirePackage[backend=biber,style=ieee]{biblatex} % Use biblatex package
  93. %%% New Commands %%%
  94. % Add new command to set file name for *.bib file
  95. \newcommand*{\@bibfilename}{%
  96. \PackageWarning{defaultPreamble}{Bib-File-Name undefined}%
  97. NoN%
  98. }%
  99. \newcommand{\bibfilename}[1]{\addbibresource{#1}}% Insert the name of the BibLatex file
  100. % Add new command to print the bibliography
  101. \newcommand{\printbib}{\printbibliography[heading=bibintoc]}% Insert the name of the BibLatex file
  102. \endinput % Das ist das Ende von dieser .sty Datei