summaryrefslogtreecommitdiff
path: root/_extensions/js/stylish-issue/_extension.yaml
blob: 4b02876c451363acae619f939fe1202d76606bd3 (plain)
  1. name: Stylish-issue
  2. author: Jonas Smedegaard
  3. version: 0.0.1
  4. contributes:
  5. formats:
  6. pdf:
  7. # links-as-notes: true
  8. colorlinks: false
  9. pdf-engine: lualatex
  10. documentclass: scrartcl
  11. csquotes: true
  12. papersize: a4
  13. # extract-media: img
  14. template-partials:
  15. - before-title.tex
  16. include-in-header:
  17. # support multiple tagged columns (class option twocolumn is not tagged)
  18. - text: |
  19. \usepackage[a4paper, margin=0.5in, bottom=1in]{geometry} % Set all margins to zero
  20. \usepackage{multicol}
  21. \setlength{\columnsep}{20pt} % Adjust space between columns
  22. \setlength{\columnwidth}{0.45\textwidth} % Set column width (optional)
  23. # avoid widow headline or definition description
  24. - text: |
  25. \usepackage{needspace}
  26. \let\oldsection\section
  27. \renewcommand{\section}[1]{%
  28. \needspace{6\baselineskip}
  29. \oldsection{#1}%
  30. }
  31. \let\olddesc\description
  32. \renewcommand{\description}[1][]{%
  33. \olddesc[#1]%
  34. \needspace{2\baselineskip}
  35. }
  36. # avoid widow or orphan lines
  37. - text: |
  38. \usepackage[defaultlines=3,all]{nowidow}
  39. # reduce vertical space after headlines
  40. - text: |
  41. \RedeclareSectionCommands[
  42. runin=false,
  43. beforeskip=.5\baselineskip,
  44. afterskip=-1ex]{section,subsection}
  45. # add newline between definition list description and items
  46. - text: |
  47. \usepackage{enumitem}
  48. \setlist[description]{style=nextline}
  49. # set page footer to danish page count "side X af Y"
  50. - text: |
  51. \usepackage{lastpage}
  52. \usepackage{scrlayer-scrpage}
  53. \cfoot{side \thepage\ af \pageref{LastPage}}
  54. # suppress figure label
  55. - text: |
  56. \usepackage[labelformat=empty]{caption}
  57. include-before-body:
  58. - text: |
  59. # enable multiple tagged columns
  60. - text: |
  61. \begin{multicols}{2}
  62. \raggedcolumns
  63. include-after-body:
  64. # conclude multiple tagged columns
  65. - text: |
  66. \end{multicols}