Compare commits
No commits in common. "393ed36dafbd47405daeb953323bf4449784af45" and "dfb1438b52810865297b307c9b74e20afc8136b4" have entirely different histories.
393ed36daf
...
dfb1438b52
11
README.md
11
README.md
|
@ -11,9 +11,8 @@ enumerated with the number as watermark.
|
|||
|
||||
See [sample pdf](../../../raw/branch/main/sample/logsheet.DL1XXXX.pdf)
|
||||
|
||||
Your callsign can be a watermark across the background. Font size is calculated
|
||||
automatically. If the sheet is for trainee logging, there will be "Location+OP"
|
||||
in the heading.
|
||||
Your callsign can be a watermark across the background. If the sheet is for
|
||||
trainee logging, there will be "Location+OP" in the heading.
|
||||
|
||||
## Setup
|
||||
|
||||
|
@ -29,14 +28,12 @@ Of course you can use your own method of using LaTeX.
|
|||
* Config callsign via filename:
|
||||
* logsheet.DL1XXXX.tex will use callsign DL1XXXX
|
||||
* logsheet.DN1XXXX.trainee.tex will use callsign DN1XXXX and set Location+OP
|
||||
in heading (for trainee callsign)
|
||||
in heading (for trainee callsign)
|
||||
* logsheet.DL1XXXX.tex will use callsign DL1XXXX/t and set Location+OP in
|
||||
heading (for new (2024) german trainee callsign)
|
||||
* Configuration in the first section of logsheet.tex possible:
|
||||
* paper format
|
||||
* number of blocks on each page
|
||||
* number of pages
|
||||
* page layout
|
||||
* number of logging blocks on each page
|
||||
|
||||
## Build
|
||||
With the build system: **make pdf**
|
||||
|
|
106
logsheet.tex
106
logsheet.tex
|
@ -3,9 +3,6 @@
|
|||
% can do whatever you want with this stuff. If we meet some day, and you think
|
||||
% this stuff is worth it, you can buy me a beer in return.
|
||||
|
||||
% needed because pgf also loads xcolor with different options
|
||||
\PassOptionsToPackage{svgnames}{xcolor}
|
||||
|
||||
\documentclass[12pt]{article}
|
||||
|
||||
%
|
||||
|
@ -16,26 +13,17 @@
|
|||
\newlength{\rowheight}
|
||||
% configure height of lines
|
||||
\setlength{\rowheight}{9mm}
|
||||
% configure number of table blocks on each page
|
||||
% configure number of tables on each page
|
||||
\def\numtables{2}
|
||||
% margins of paper defined above
|
||||
\usepackage[\paper, hmargin=0.7cm, vmargin=0.9cm]{geometry}
|
||||
% layout of pages (with pgfmorepages)
|
||||
% valid settings e. g. 2 on 1, 4 on 1, 6 on 1, 8 on 1, 16 on 1
|
||||
\usepackage{pgfmorepages}
|
||||
\pgfpagesuselayout{2 on 1}[\paper, landscape]
|
||||
|
||||
% how many pages (duplex printing with \pgflayout 2 on 1 can fit 4 pages
|
||||
% but maybe more numerated pages are needed
|
||||
% you may run out of memory for latex, maybe try lualatex
|
||||
\def\numpages{4}
|
||||
% define callsign here or with filename
|
||||
% e. g. \def\callsign{AB1CD}
|
||||
% if you define it here, callsign will not be taken from filename
|
||||
\def\callsign{}
|
||||
% is this for trainee logging?
|
||||
% set \trainee to trainee for trainee callsign
|
||||
% or to stroketrainee to get \callsign/T
|
||||
% or to traineestroke to get \callsign/T
|
||||
% if you define it here, trainee will not be taken from filename
|
||||
\def\trainee{}
|
||||
|
||||
|
@ -68,41 +56,20 @@
|
|||
\StrCut{\jobname}{.}\strA\strB
|
||||
\StrLen{\callsign}[\lenTemp]
|
||||
\IfEq{\lenTemp}{0}{
|
||||
\StrCut{\strB}{.}\callsign\strC
|
||||
\StrCut{\strB}{.}\callsign\strC
|
||||
}{
|
||||
\StrCut{\strB}{.}\strTemp\strC
|
||||
\StrCut{\strB}{.}\strTemp\strC
|
||||
}
|
||||
|
||||
|
||||
\newif\ifistrainee
|
||||
% default is false
|
||||
\istraineefalse
|
||||
|
||||
% add /t to callsign if filename is logsheet.CALLSIGN.stroketrainee.tex
|
||||
% set istrainee to true if applicable
|
||||
% strange things with detokenize needed with latex
|
||||
\StrLen{\trainee}[\lenTemp]
|
||||
\IfEq{\lenTemp}{0}{
|
||||
\StrCut{\strC}{.}\trainee\strD
|
||||
\IfStrEq{\trainee}{\detokenize{trainee}}{
|
||||
\istraineetrue
|
||||
}{
|
||||
\IfStrEq{\trainee}{\detokenize{stroketrainee}}{
|
||||
\istraineetrue
|
||||
\edef\callsign{\callsign/T}
|
||||
}{}
|
||||
}
|
||||
}{
|
||||
\IfStrEq{\trainee}{trainee}{
|
||||
\istraineetrue
|
||||
}{
|
||||
\IfStrEq{\trainee}{stroketrainee}{
|
||||
\istraineetrue
|
||||
\edef\callsign{\callsign/T}
|
||||
}{}
|
||||
}
|
||||
}
|
||||
\StrCut{\strC}{.}\trainee\strD
|
||||
}{}
|
||||
|
||||
%add /t to callsign if filename is logbool.CALLSIGN.traineestroke.tex
|
||||
\IfStrEq{\trainee}{\detokenize{traineestroke}}{
|
||||
\def\trainee{trainee}
|
||||
\edef\callsign{\callsign/T}
|
||||
}
|
||||
|
||||
% default scale if there is no callsign (\wmfontscale\paperwidth)
|
||||
\FPset\wmfontscale{0.25}
|
||||
|
@ -123,7 +90,7 @@
|
|||
|
||||
% pagenumber as watermark
|
||||
\FPeval\wmfontscalepagenumber{0.75*wmfontscale}
|
||||
\usepackage{xcolor}
|
||||
\usepackage[svgnames]{xcolor}
|
||||
\usepackage{eso-pic}
|
||||
\usepackage{tikz}
|
||||
\usetikzlibrary{calc}
|
||||
|
@ -146,6 +113,10 @@
|
|||
}
|
||||
}
|
||||
|
||||
% Duplicate page: e. g. two a5 on one a4
|
||||
\usepackage{pgfmorepages}
|
||||
\pgfpagesuselayout{2 on 1}[\paper,landscape]
|
||||
|
||||
\pagestyle{empty}
|
||||
\setlength\parindent{0pt}
|
||||
|
||||
|
@ -158,11 +129,11 @@
|
|||
\FPeval\tablelinesPlusFour{round(tablelines + 4, 0)}
|
||||
|
||||
% add +OP on trainee sheet
|
||||
\ifistrainee
|
||||
\IfStrEq{\trainee}{\detokenize{trainee}}{
|
||||
\def\locationOp{Location+OP}
|
||||
\else
|
||||
}{
|
||||
\def\locationOp{Location}
|
||||
\fi
|
||||
}
|
||||
|
||||
% add content of table, create #2 times #1/#2 rows, #1/#2 including two header rows
|
||||
\prgNewFunction \makerows{mm} {
|
||||
|
@ -195,26 +166,29 @@
|
|||
\ttfamily
|
||||
\SetTblrInner{rowsep=0pt,rulesep=0pt}
|
||||
% two sides (front/back)
|
||||
\foreach \i in {1,...,\numpages}
|
||||
\foreach \i in {1,2}
|
||||
{
|
||||
\message{page \i}
|
||||
% watermark on every page
|
||||
\wmpagenumber
|
||||
\begin{center}
|
||||
% two pages (left/right)
|
||||
\foreach \j in {1,2}
|
||||
{
|
||||
% watermark on every side
|
||||
\wmpagenumber
|
||||
\begin{center}
|
||||
% fix centering
|
||||
\addtolength{\leftskip} {-2cm}
|
||||
\addtolength{\rightskip}{-2cm}
|
||||
\addtolength{\leftskip} {-2cm}
|
||||
\addtolength{\rightskip}{-2cm}
|
||||
|
||||
\begin{tblr}[evaluate=\makerows]{
|
||||
rows={\rowheight},
|
||||
width=\textwidth,
|
||||
vline{1-Y}={},
|
||||
hline{2-Z}={},
|
||||
colspec={YYYYZ Q[colsep=0pt]}
|
||||
}
|
||||
\makerows{\tablelines}{\numtables}
|
||||
\end{tblr}
|
||||
\end{center}
|
||||
\newpage
|
||||
\begin{tblr}[evaluate=\makerows]{
|
||||
rows={\rowheight},
|
||||
width=\textwidth,
|
||||
vline{1-Y}={},
|
||||
hline{2-Z}={},
|
||||
colspec={YYYYZ Q[colsep=0pt]}
|
||||
}
|
||||
\makerows{\tablelines}{\numtables}
|
||||
\end{tblr}
|
||||
\end{center}
|
||||
\newpage
|
||||
}
|
||||
}
|
||||
\end{document}
|
||||
|
|
Loading…
Reference in a new issue