Git Product home page Git Product logo

hu-berlin-bundle's People

Contributors

baem2 avatar lukascbossert avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

ccebinger

hu-berlin-bundle's Issues

multi-locale (at least english)

It is necessary to have all strings defined as multiple locale or at least that everyone can define them in the needed language.

There is one approach:

\def\Version{2020/10/30 v1.0.8}
\NeedsTeXFormat{LaTeX2e}[2005/12/01]
\ProvidesClass{hu-berlin-letter}
  [\Version\ Humboldt-Universit"at zu Berlin - letter documentclass]
\ClassInfo{hu-berlin}{* * * hu-berlin * * *\MessageBreak
    Part of the hu-berlin Bundle }
\LoadClass[%
  fontsize=10pt,
  version=last,
  % visualize
]{scrlttr2}
\RequirePackage{hu-berlin-base}
\RequirePackage{scrlayer-scrpage}
\clearpairofpagestyles
\DeclareNewLayer[
 foreground,
 voffset=\useplength{firstheadvpos},
 hoffset=\useplength{firstheadhpos},
 width=\useplength{firstheadwidth},
 mode=picture,
 contents=\putUL{\raisebox{-\height}{\usekomavar{firsthead}}}
]{likefirstpage.head}
\AddLayersToPageStyle{scrheadings}{likefirstpage.head}
\DeclareNewLayer[
 foreground,
 align=r,
 voffset=\useplength{locvpos},
 hoffset=\paperwidth-\useplength{lochpos},
 width=\useplength{locwidth},
 height=\useplength{locheight},
 contents=\usekomavar{nextlocation},
 %pretocontents=\layercontentsmeasure% to show the position of the layer
]{likefirstpage.loc}
\AddLayersToPageStyle{scrheadings}{likefirstpage.head,likefirstpage.loc}
\newkomavar{nextlocation}
\setkomavar{nextlocation}{%
  \raggedright
  \fontsize{7}{8.5}\selectfont
  \pagemark
}
\RequirePackage{geometry}
\geometry{%
  a4paper
 ,left           =25mm
 ,bottom         =16mm
 ,foot           =4mm
 ,top            =77mm
 ,headheight     =15pt
 ,textwidth      =117mm
 ,marginparsep   =0mm
 ,marginparwidth =0mm
}
\renewcommand*{\raggedsignature}{\raggedright}
\raggedright
\def\stopletter{}
\let\enclold\encl
\renewcommand\encl[1]{\vskip0ptplus1filll\enclold{#1}}
\newkomavar{faculty}
\newkomafont{faculty}{\bfseries\fontsize{8.5}{10}\selectfont}
\newkomavar{institute}
\newkomafont{institute}{\fontsize{8.5}{10}\selectfont}
\newkomavar{institute.additional}
\newkomafont{institute.head}{\bfseries}
\newkomavar{institute.head}%
\newkomavar{institute.head.mail}%
\newkomavar{local}
\setkomavar*{local}{Sitz:}
\newkomavar{connections}
\setkomavar*{connections}{Verkehrsverbindungen:}
\newkomavar{officehours}
\setkomavar*{officehours}{Sprechzeiten:}
\newkomavar{accessibility}
\setkomavar*{accessibility}{{\large\reflectbox{\Wheelchair}} Eingang:}
\newkomavar{bank}
\setkomavar*{bank}{Bankverbindung:}
\setkomavar{bank}{Deutsche Bank PGK AG}
\newkomavar{IBAN}
\setkomavar{IBAN}{\mbox{IBAN DE95 1007 0848 0512 6206 01}}
\newkomavar{BIC}
\setkomavar{BIC}{BIC DEUTDEDB110}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Sprachabhängige Bezeichner deklarieren
\AtBeginDocument{%
%   DEUTSCH
\iflanguage{ngerman}{%
\providecaptionname{ngerman}{\bank}{Bankverbindung:}%
\providecaptionname{ngerman}{\connections}{öff. Verkehr}%
}{}
%   ENGLISCH
\iflanguage{english}{%
\providecaptionname{english}{\bank}{Account}%
\providecaptionname{english}{\connections}{Access}%
}{}
}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\setkomavar{location}{%
  \raggedright
  \fontsize{7}{8.5}\selectfont
\begin{minipage}[t][64mm]{\useplength{locwidth}}
\Ifkomavarempty{faculty}
  {\hspace*{1em}}
  {\usekomafont{faculty}%
   \usekomavar{faculty}\\[1\baselineskip]}
\Ifkomavarempty{institute}
  {}
  {\usekomafont{institute}\usekomavar{institute}\\[1\baselineskip]}
\Ifkomavarempty{institute.additional}
  {}
  {\usekomavar{institute.additional}\\[1\baselineskip]}
\Ifkomavarempty{institute.head}
 {}
 {{\usekomafont{institute.head}%
  \usekomavar{institute.head}}\\%
 \usekomavar*{institute.head}}
 \end{minipage}
  \textbf{\usekomavar*{date}}\\
  \usekomavar{date}\par
\Ifkomavarempty{fromname}
 {}
 {\textbf{\usekomavar*{fromname}}\\
  \usekomavar{fromname}\par}
\Ifkomavarempty{myref}
 {}
 {\textbf{\usekomavar*{myref}}\\
  \usekomavar{myref}\par}
\Ifkomavarempty{yourref}
 {}
 {\textbf{\usekomavar*{yourref}}\\
  \usekomavar{yourref}\par}
\Ifkomavarempty{yourmail}
 {}
 {\textbf{\usekomavar*{yourmail}}\\
  \usekomavar{yourmail}\par}
\Ifkomavarempty{customer}
 {}
 {\textbf{\usekomavar*{customer}}\\
  \usekomavar{customer}\par}
\Ifkomavarempty{invoice}
 {}
 {\textbf{\usekomavar*{invoice}}\\
  \usekomavar{invoice}\par}
  \textbf{\usekomavar*{fromaddress}}\\
  \usekomavar{fromaddress}
  \Ifkomavarempty{fromphone}
    {\par}
    {\\\usekomavar*{fromphone}\usekomavar{fromphone}
     \Ifkomavarempty{fromfax}
    {\par}
    {\\}}
  \Ifkomavarempty{fromfax}
    {}
    {\usekomavar*{fromfax}\usekomavar{fromfax}\par}
\Ifkomavarempty{institute.head.mail}
  {}
  {\usekomavar{institute.head.mail}
  \Ifkomavarempty{fromemail}
  {\Ifkomavarempty{fromurl}
   {\par}
   {\\}}
  {\\}}
\Ifkomavarempty{fromemail}
  {}
  {\usekomavar{fromemail}
  \Ifkomavarempty{fromurl}
  {\par}
  {\\}}
\Ifkomavarempty{fromurl}
  {}
  {\usekomavar{fromurl}\par}
\Ifkomavarempty{local}
  {}
  {\textbf{\usekomavar*{local}}\\
  \usekomavar{local}\par}
\vfill
\Ifkomavarempty{connections}
  {}
  {\textbf{\usekomavar*{connections}}\\
  \usekomavar{connections}\par}
\Ifkomavarempty{officehours}
  {}
  {\textbf{\usekomavar*{officehours}}\\
  \usekomavar{officehours}\par}
\Ifkomavarempty{accessibility}
  {}
  {\textbf{\usekomavar*{accessibility}}\\
  \usekomavar{accessibility}\par}
\Ifkomavarempty{bank}
  {}
  {\textbf{\usekomavar*{bank}}\\
  \usekomavar{bank}\\
  \usekomavar{IBAN}\\
  \usekomavar{BIC}
  }
}
\KOMAoptions{%
   numericaldate =true
  ,refline       =nodate
  ,backaddress   =plain
  ,parskip       =half-
}
\removereffields
\setplength{refvpos}{110mm}
\setplength{refaftervskip}{0pt}
\setplength{toaddrhpos}{25mm}
\setplength{firstheadhpos}{\useplength{toaddrhpos}}
\setplength{lochpos}{15mm}
\setplength{locvpos}{\useplength{toaddrvpos}}
\addtoplength{locvpos}{.75\baselineskip}
\setplength{locwidth}{45mm}
\setplength{locheight}{232mm}
\setkomavar{firsthead}{%
\IfFileExists{hu-berlin-logo.pdf}
  {\includegraphics[width=145mm]{hu-berlin-logo.pdf}}
  {{\vspace*{2em}\hfil\scshape [humboldt-universität zu berlin]}}%
}
\setkomavar{backaddressseparator}{~\textbar~}
\setkomavar{fromphone}{0000}
\setkomavar*{fromphone}{Telefon +49 [30] 2093–}
\setkomavar{fromfax}{0000}
\setkomavar*{fromfax}{Telefax +49 [30] 2093–}
\setkomavar*{fromaddress}{Postanschrift:}
\setkomavar{fromaddress}{%
  Humboldt-Universität zu Berlin\\
  Unter den Linden 6\\
  D-10099 Berlin}
\setkomavar{backaddress}{%
  Humboldt-Universität zu Berlin\\
  UdL 6\\
  D-10099 Berlin}
\setkomavar*{date}{Datum:}
\setkomavar*{fromname}{Bearbeiter:}
\setkomavar*{myref}{Geschäftszeichen:}
\setkomavar*{enclseparator}{Anlage}
\setkomavar*{ccseparator}{Kopie an}
%%
%% Copyright (C) 2019-2020
%%
%% End of file `hu-berlin-letter.cls'.

option to have logo and narrow text width only on first page

It would be great to have an option to have the full page width on page 2 and the following pages. If such an option already exists and I did not find it, it would be good to more prominently explain it in the documentation. :-)

At least the LibreOffice template I am/was using contains the HU logo only on the first page and on the following pages the text occupies the whole width. I think this is a better option – both from a design perspective and from an ecological perspective.

Processing .md file through pandoc = Latex Error

Hi Lukas,

very helpful Bundle. Had been using for several letters. Since the upgrade to Texlive 2020 the bundle is broken for me. Do you know if I am able to fix it on my side?

This is the .md file to be processed:

---
documentclass: hu-berlin-letter
sender: hu-berlin-letter-example
subject: Short description
addressee:
- Alexander von Humboldt
- Unter den Linden 6
- 10099 Berlin
---
Thank you very much for your letter.

This is the Terminal command:

pandoc beispiel.md -o beispiel.pdf --pdf-engine=lualatex --template hu-berlin-letter-template.latex

This is the result:

Error producing PDF.
! LaTeX Error: There's no line here to end.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.57 \opening{\usekomavar{opening}}

Processing it through Rmarkdown I get a more detailed error-Log (see below). Especially this seems to be troubling: ! Missing $ inserted

Do you have any idea where I could proceed investigating? Very basic understanding of those things here.

Thanks for the great tool.

Best
Henning

...
...
Foldmarks: yes
Head of first page
<hu-berlin-logo.pdf, id=1, 661.47125pt x 132.495pt>
File: hu-berlin-logo.pdf Graphic file (type pdf)
<use hu-berlin-logo.pdf>
Package luatex.def Info: hu-berlin-logo.pdf  used on input line 58.
(luatex.def)             Requested size: 412.56496pt x 82.63731pt.
File: hu-berlin-logo.pdf Graphic file (type pdf)
<use hu-berlin-logo.pdf>
Package luatex.def Info: hu-berlin-logo.pdf  used on input line 58.
(luatex.def)             Requested size: 412.56496pt x 82.63731pt.
Foot of first page
Address: No
Location field: yes
LaTeX Font Info:    Trying to load font information for U+mvs on input line 58.
(/usr/local/texlive/2020basic/texmf-dist/tex/latex/marvosym/umvs.fd)
Title: no
Subject: no
! Missing $ inserted.
<inserted text> 
$
l.58 \opening{\usekomavar{opening}}
                                 ```

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.