开发者

Table rows alternating between column and notes-row

开发者 https://www.devze.com 2023-03-26 05:39 出处:网络
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.

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

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).


In the end, this is what I made out of the very nice answers the tex gurus came up with - just in case anyone else ever needs 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}
0

精彩评论

暂无评论...
验证码 换一张
取 消