3

I would like to alter my ham-radio logbook so that every other row is a full-length notes row, possibly having the words "notes" in light grey in the background of the full-length row.

+-------+-------+-------+
|header1|header2|header3|
+-------+-------+-------+
|       |       |       |
+-------+-------+-------+
|     notes             |
+-------+-------+-------+
|       |       |       |
+-------+-------+-------+
|     notes             | 
+-----------------------+
...

Here's the code so far: http://pastebin.com/BgHGkhq8

% !TEX encoding = UTF-8 Unicode
\PassOptionsToPackage{table}{xcolor}
\documentclass[12pt,a4paper,oneside,landscape]{article}
\usepackage[utf8]{inputenc}
\usepackage{ngerman}
\usepackage{todonotes}
%\usepackage[cm]{fullpage}
\usepackage{array}
\usepackage[a4paper, left=0.6cm, right=0.5cm,top=3.7cm, bottom=0.5cm]{geometry}

\usepackage[T1]{fontenc}
\newcommand{\changefont}[3]{
\fontfamily{#1} \fontseries{#2} \fontshape{#3} \selectfont}

\usepackage{graphicx,type1cm,eso-pic,color}
\makeatletter
\AddToShipoutPictureBG{
    \setlength{\@tempdimb}{.5\paperwidth}
    \setlength{\@tempdimc}{0.85\paperheight}
    \setlength{\unitlength}{1pt}
    \put(\strip@pt\@tempdimb,\strip@pt\@tempdimc){
    \makebox(0,0){\rotatebox{0}{\textcolor[gray]{.4}
    {\fontsize{2cm}{2cm}\selectfont{Amateurfunk-Log DC1TS}}}}}
}

\AddToShipoutPicture*{
    \setlength{\@tempdimb}{0.02\paperwidth}
    \setlength{\@tempdimc}{0.12\paperheight}
    \setlength{\unitlength}{1pt}
    \put(\strip@pt\@tempdimb,\strip@pt\@tempdimc){
    \makebox(0,0){\rotatebox{270}{\textcolor[gray]{0.65}
    {\fontsize{1cm}{1cm}\selectfont{Seite 025}}}}}
}

\begin{document}
\changefont{cmss}{m}{n}
\rowcolors{3}{gray!5}{white}
\begin{tabular}{
| >{\centering\arraybackslash}m{2cm} %Datum
| >{\centering\arraybackslash}m{1.3cm}  %Zeit Start
| >{\centering\arraybackslash}m{1.3cm}  %Zeit Ende
| >{\centering\arraybackslash}m{2cm}  %Frequenz
| >{\centering\arraybackslash}m{1.5cm}  %Mode
| >{\centering\arraybackslash}m{3cm}  %Rufzeichen
| >{\centering\arraybackslash}m{3cm}  %Name
| >{\centering\arraybackslash}m{3cm}  %QTH
| >{\centering\arraybackslash}m{1.3cm} %Power
| >{\centering\arraybackslash}m{0.9cm} %Report gegeben
| >{\centering\arraybackslash}m{0.9cm} %Report erhalten
| >{\centering\arraybackslash}m{0.8cm} %QSL gesendet
| >{\centering\arraybackslash}m{0.8cm} %QSL erhalten
|} 
\hline 
Datum & 
\multicolumn{2}{c|}{Zeit UTC} & 
Frequenz & 
Mode & 
Rufzeichen & 
Name & 
QTH & 
Power & 
\multicolumn{2}{c|}{Report} & 
\multicolumn{2}{c|}{QSL}  \\ [1ex]

& Start & Ende & (MHz) &  &  & & & (W) & geg. & empf. & ges. & erh. \\ [1ex]
\hline
 & : & : & & & & & & & & & & \\ [4ex]
\hline 
 & : & : & & & & & & & & & & \\ [4ex]
\hline 
 & : & : & & & & & & & & & & \\ [4ex]
\hline 
 & : & : & & & & & & & & & & \\ [4ex]
\hline 
 & : & : & & & & & & & & & & \\ [4ex]
\hline 
 & : & : & & & & & & & & & & \\ [4ex]
\hline 
 & : & : & & & & & & & & & & \\ [4ex]
\hline 
 & : & : & & & & & & & & & & \\ [4ex]
\hline 
& : & : & & & & & & & & & & \\ [4ex]
\hline 
& : & : & & & & & & & & & & \\ [4ex]
\hline 
& : & : & & & & & & & & & & \\ [4ex]
\hline 
& : & : & & & & & & & & & & \\ [4ex]
\hline 
\end{tabular}
\pagebreak



\end{document}
\endinput

Edit 1: For clarification: For now I use this to simply print out empty forms to be filled out by hand; later on I am thinking about integrating this into my (very rough, ie. pre alpha) sqlite based, text-only (ie. console - think nanonote and ham radio logging :) logbook "application" (just a bunch of scripts, really).

3

please provide minimal examples and post them here as code environment!

\documentclass[12pt,a4paper,oneside,landscape]{article}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[ngerman]{babel}
\usepackage{ragged2e}
\usepackage{array}
\usepackage[table]{xcolor}
\usepackage[a4paper, left=0.6cm, right=0.5cm,top=3.7cm, bottom=0.5cm]{geometry}
\usepackage{graphicx,type1cm,eso-pic}
\makeatletter
    \AddToShipoutPictureBG{
            \setlength{\@tempdimb}{.5\paperwidth}
            \setlength{\@tempdimc}{0.85\paperheight}
            \setlength{\unitlength}{1pt}
            \put(\strip@pt\@tempdimb,\strip@pt\@tempdimc){
            \makebox(0,0){\rotatebox{0}{\textcolor[gray]{.4}
            {\fontsize{2cm}{2cm}\selectfont{Amateurfunk-Log DC1TS}}}}}
    }

    \AddToShipoutPicture*{
            \setlength{\@tempdimb}{0.02\paperwidth}
            \setlength{\@tempdimc}{0.12\paperheight}
            \setlength{\unitlength}{1pt}
            \put(\strip@pt\@tempdimb,\strip@pt\@tempdimc){
            \makebox(0,0){\rotatebox{270}{\textcolor[gray]{0.65}
            {\fontsize{1cm}{1cm}\selectfont{Seite 025}}}}}
    }

\newcolumntype{M}[1]{>{\Centering}m{#1}}
\newcolumntype{C}{>{\rule[-3ex]{0pt}{8ex}}c}

\begin{document}
\sffamily
    \rowcolors{3}{gray!5}{white}
    \begin{tabular}{
    | M{2cm} %Datum
    | M{1.3cm}  %Zeit Start
    | M{1.3cm}  %Zeit Ende
    | M{2cm}  %Frequenz
    | M{1.5cm}  %Mode
    | M{3cm}  %Rufzeichen
    | M{3cm}  %Name
    | M{3cm}  %QTH
    | M{1.3cm} %Power
    | M{0.9cm} %Report gegeben
    | M{0.9cm} %Report erhalten
    | M{0.8cm} %QSL gesendet
    | M{0.8cm} %QSL erhalten
    |}
    \hline
    Datum & \multicolumn{2}{c|}{Zeit UTC} &
    Frequenz & Mode & Rufzeichen & Name & QTH & Power &
    \multicolumn{2}{c|}{Report} & \multicolumn{2}{c|}{QSL}  \\ [1ex]

    & Start & Ende & (MHz) &  &  & & & (W) & geg. & empf. & ges. & erh. \\ [1ex]
    \hline
    & : & : & & & & & & & & & & \\ [4ex]        \hline
    & : & : & & & & & & & & & & \\ [4ex]        \hline

\multicolumn{13}{|C|}{\textcolor{black!15}{\Huge\bfseries Notes}}\\\hline

        & : & : & & & & & & & & & & \\ [4ex]    \hline
    & : & : & & & & & & & & & & \\ [4ex]        \hline
    & : & : & & & & & & & & & & \\ [4ex]        \hline\hline
    \end{tabular}

\end{document}

output of code

  • Will do this directly, ie. inline, in the future. Is there a way to define something like a block of code to get around having to indent all lines manually (ie. <code> ... </code>)? – Christian Aug 7 '11 at 13:53
  • 1
    @cts: When added blocks of code you don't have to indent it manually. Select the block of code and click the {} button at the top of the on-screen editor. That will add 4 spaces to each of the selected lines. – Werner Aug 7 '11 at 15:44
1

Thanks to everyone's answers, in the end I got it to work like this:

\documentclass[12pt,a4paper,oneside,landscape]{article}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[ngerman]{babel}
\usepackage{ragged2e}
\usepackage{array}
\usepackage[table]{xcolor}
\usepackage[a4paper, left=0.6cm, right=0.5cm,top=3.7cm, bottom=0.5cm]{geometry}
\usepackage{graphicx,type1cm,eso-pic}
\makeatletter
    \AddToShipoutPictureBG{
            \setlength{\@tempdimb}{.5\paperwidth}
            \setlength{\@tempdimc}{0.85\paperheight}
            \setlength{\unitlength}{1pt}
            \put(\strip@pt\@tempdimb,\strip@pt\@tempdimc){
            \makebox(0,0){\rotatebox{0}{\textcolor[gray]{.4}
            {\fontsize{2cm}{2cm}\selectfont{Amateurfunk-Log DC1TS}}}}}
    }

    \AddToShipoutPicture*{
            \setlength{\@tempdimb}{0.02\paperwidth}
            \setlength{\@tempdimc}{0.12\paperheight}
            \setlength{\unitlength}{1pt}
            \put(\strip@pt\@tempdimb,\strip@pt\@tempdimc){
            \makebox(0,0){\rotatebox{270}{\textcolor[gray]{0.65}
            {\fontsize{1cm}{1cm}\selectfont{Seite 025}}}}}
    }

\newcolumntype{M}[1]{>{\Centering}m{#1}}
\newcolumntype{C}{>{\rule[-3ex]{0pt}{8ex}}c}

\begin{document}
\sffamily
    \rowcolors{3}{gray!5}{white}
    \begin{tabular}{
    | M{2cm} %Datum
    | M{1.3cm}  %Zeit Start
    | M{1.3cm}  %Zeit Ende
    | M{2cm}  %Frequenz
    | M{1.5cm}  %Mode
    | M{3cm}  %Rufzeichen
    | M{3cm}  %Name
    | M{3cm}  %QTH
    | M{1.3cm} %Power
    | M{0.9cm} %Report gegeben
    | M{0.9cm} %Report erhalten
    | M{0.8cm} %QSL gesendet
    | M{0.8cm} %QSL erhalten
    |}
    \hline
    Datum & \multicolumn{2}{c|}{Zeit UTC} &
    Frequenz & Mode & Rufzeichen & Name & QTH & Power &
    \multicolumn{2}{c|}{Report} & \multicolumn{2}{c|}{QSL}  \\ [1ex]

    & Start & Ende & (MHz) &  &  & & & (W) & geg. & empf. & ges. & erh. \\ [1ex]
    \hline
    \hline
    & : & : & & & & & & & & & & \\ [4ex]        \hline
    \multicolumn{13}{|C|}{\textcolor{black!10}{\Huge\bfseries Notizen}}\\\hline
    \hline
    & : & : & & & & & & & & & & \\ [4ex]        \hline
    \multicolumn{13}{|C|}{\textcolor{black!10}{\Huge\bfseries Notizen}}\\\hline
    \hline
    & : & : & & & & & & & & & & \\ [4ex]    \hline
    \multicolumn{13}{|C|}{\textcolor{black!10}{\Huge\bfseries Notizen}}\\\hline
    \hline
    & : & : & & & & & & & & & & \\ [4ex]        \hline
    \multicolumn{13}{|C|}{\textcolor{black!10}{\Huge\bfseries Notizen}}\\\hline
    \hline
    & : & : & & & & & & & & & & \\ [4ex]        \hline
    \multicolumn{13}{|C|}{\textcolor{black!10}{\Huge\bfseries Notizen}}\\\hline
    \end{tabular}

\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.