表格行在列和注释行之间交替

发布于 2024-11-28 10:47:48 字数 624 浏览 1 评论 0原文

我想更改我的业余无线电日志,以便每隔一行都是一个全长注释行,可能在全长行的背景中有浅灰色的“注释”字样。

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

这是到目前为止的代码: http://pastebin.com/BgHGkhq8

编辑 1:澄清一下:现在我用它来简单地打印出需要手工填写的空表格;后来我正在考虑将其集成到我的(非常粗糙,即预阿尔法)基于sqlite的纯文本(即控制台 - 想想nanonote和业余无线电日志记录:)日志“应用程序”(只是一堆脚本,真的)。

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

疯狂的代价 2024-12-05 10:47:48

最后,这就是我根据 tex 专家提出的非常好的答案得出的结果 - 以防万一其他人需要这个;)

\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}

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}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文