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 6.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  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. %% - enumitem = Provides support change enum type in options. %%
  47. %% %%
  48. %% 4.Defines New Commands %%
  49. %% - \includePdf{filename} = Include a PDF file. %%
  50. %% - \bibfilename{file.bib} = Set bib file. %%
  51. %% - \printbib = Print bibliography. %%
  52. %% - \b{text} = Set text to bold format. %%
  53. %% - \mono{text} = Set text to monospace. %%
  54. %% - \minsep = Set item spacing to minimum. %%
  55. %% %%
  56. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  57. %
  58. \NeedsTeXFormat{LaTeX2e}%
  59. \ProvidesPackage{defaultPreamble}[2019/01/15 v1.0 DefaultPreamble Package from Erik Roemmelt]%
  60. \ProcessOptions\relax%
  61. %%% Packages %%%
  62. % ___Document___
  63. \RequirePackage[a4paper, left=20mm, right=20mm, top=20mm, bottom=30mm, headsep=10mm, footskip=10mm]{geometry} % Set page settings
  64. \RequirePackage[nodisplayskipstretch]{setspace} % Set linespacing and prevent math formula streching
  65. \setstretch{1.0} % Change typeset line spacing by multiplicator 1.5
  66. \RequirePackage{lastpage} % Get last page number with \pageref{LastPage}
  67. \RequirePackage{fancyhdr} % Set header, footer and page layout.
  68. \pagestyle{fancy} % Set the pagestyle to fancyhdr settings
  69. %%% Fancyhdr Settings %%%
  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
  72. \renewcommand{\headrulewidth}{0pt} % Set header ruler hidden
  73. \renewcommand{\footrulewidth}{0pt} % Set footer ruler hidden
  74. \fancypagestyle{plain}{% Redefine plain style
  75. \fancyhf{} % Clear all header and footer fields
  76. \fancyfoot[R]{\ifnum\value{page}<2\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
  77. \renewcommand{\headrulewidth}{0pt} % Set header ruler hidden
  78. \renewcommand{\footrulewidth}{0pt} % Set footer ruler hidden
  79. }%
  80. % ___Font___
  81. \RequirePackage[ngerman]{babel} % Changes hyphenation rules
  82. \RequirePackage[utf8]{inputenc} % Input encoding: Unicode support (Umlaute etc.)
  83. \RequirePackage[T1]{fontenc} % Font encoding: (8bit) Accents support (<,=,>,",...)
  84. \RequirePackage{csquotes} % Allows to use " " in document.
  85. \RequirePackage[scaled]{helvet} % Changes fontfamily to Helvetica (sans serif)
  86. \renewcommand{\familydefault}{\sfdefault} % Changes default font to sans serif
  87. \RequirePackage[dvipsnames]{xcolor} % Provides font coloring
  88. % ___Other___
  89. \RequirePackage[hidelinks]{hyperref} % Add a link to your document
  90. \RequirePackage{graphicx} % Add pictures to your document
  91. \RequirePackage{pdfpages} % Allows to include pdf pages
  92. \RequirePackage{amsmath} % Advanced math typesetting
  93. \RequirePackage{amsfonts} % Advanced font typesetting
  94. \RequirePackage{amssymb} % Advanced symoblic typesetting
  95. \RequirePackage{blindtext} % Blindtext, Lorem Ipsum text
  96. \usepackage[shortlabels]{enumitem} % Allows to change enumerate type easily
  97. % __Bibliography___
  98. \RequirePackage[backend=biber,style=ieee]{biblatex} % Use biblatex package
  99. %%% New Commands %%%
  100. % New command for closer spacing in list
  101. \newcommand{\minsep}{\topsep=0pt\itemsep=0pt\parsep=0pt\partopsep=0pt}%
  102. % Add new command to include a pdf file
  103. \newcommand*{\@includePdf}{%
  104. \PackageWarning{defaultPreamble}{PDF-File does not exist}%
  105. NoN%
  106. }%
  107. \newcommand{\includePdf}[1]{\includepdf[pages=-,fitpaper=true,frame=false,pagecommand=\thispagestyle{plain}]{#1}}% Insert the name of the pdf file
  108. % Add new command to set file name for *.bib file
  109. \newcommand*{\@bibfilename}{%
  110. \PackageWarning{defaultPreamble}{Bib-File-Name undefined}%
  111. NoN%
  112. }%
  113. \newcommand{\bibfilename}[1]{\addbibresource{#1}}% Insert the name of the BibLatex file
  114. % Add new command to print the bibliography
  115. \newcommand{\printbib}{\printbibliography[heading=bibintoc]}% Insert the name of the BibLatex file
  116. % Add new commant to shorten text format command: \textbf
  117. \renewcommand{\b}{\textbf}%
  118. % Add new commant to shorten text format command: \texttt
  119. \newcommand{\mono}{\texttt}%
  120. \endinput % Das ist das Ende von dieser .sty Datei