Kleinanzeigen mit tcolor box

Kleinanzeigen mit tcolor box

Ich versuche, mithilfe von tcolor box eine Kleinanzeigenzeitung in LaTex zu erstellen. Ich bin neu darin, also haben Sie bitte Geduld mit mir. Hier ist ein Screenshot von dem, was ich zu emulieren versuche.

Beispiel einer Kleinanzeige, die ich nachahmen möchte

Folgendes konnte ich bisher erstellen:

tcolor box versucht Kleinanzeigen zu generieren

Ich muss in der Lage sein, zwischen jeder Anzeige eine einzelne Zeile mit minimalem Abstand und einem unsichtbaren Rand auf beiden Seiten zu haben. Bitte schlagen Sie vor, wie ich den Code ändern kann oder ob es besseren Code gibt, den ich verwenden sollte. Danke.

Hier ist mein LaTeX .tex-Code:

\documentclass[11pt]{article}
\usepackage[many]{tcolorbox}
\usepackage{lipsum}
\usepackage{graphicx}
\graphicspath{ {../images/} } 



\begin{document}
\section{Example}
An early version of an example document that eventually will render classified ads using \LaTeX , tcolorbox and multirow. Possibly ltablex too.
The page below is an example image of the look we are aiming for. The third page is going to attempt to render using LaTeX and specific extensions.

\includegraphics{exampleclassified.ps}

\section{First try example}

\begin{tcbraster}[raster equal height=rows,raster every box/.style={colframe=black!50!black,colback=white}]\begin{tcolorbox}[blankest]\begin{tcbraster}[raster columns=1]\begin{tcolorbox}[natural height,
        space to upper,
        skin=bicolor,
        colbacklower=black!95,
        collower=white,
        title={X-should be blank and the same dimensions as the orginal },
        halign=center,
        valign=center,
        nobeforeafter,
        halign lower=flush right,
        bottom=0mm,
        height=3cm
    ]


        \$ CASH \$ For Broken Autos.
        Paying \$50 to \$500. I Tow!
        Call Doug Anytime 7-Days,
        (269)501-5763.\end{tcolorbox}
        \begin{tcolorbox}
        \$ \$ \$ WE BUY USED \& Unwanted Autos.
        Any condition, Top \$ \$ \$
        paid. Will pick up Free.
        Airway Auto Parts
        (269)962-9521

        \end{tcolorbox}

        \begin{tcolorbox}

        \$500! POLICE IMPOUNDS!
        Hondas/Chevys/Jeeps!
        Cars from \$500! For listings:
        800-619-3790 ext.2938
        \end{tcolorbox}

        \end{tcbraster}\end{tcolorbox}\end{tcbraster}



\end{document}

Antwort1

Da der ursprüngliche Vorschlag mit gemacht wurde tcolorbox, gibt es hier zwei mögliche Lösungen mit tcolorbox. Wie OP bereits vorgeschlagen hat, basieren diese Lösungen auf tcbraster. Die erste verwendet einen einspaltigen Tcbraster in einer mehrspaltigen Umgebung und die zweite verwendet einen dreispaltigen Tcbraster.

Innere Boxen werden stilistisch definiert classifiedund sind blankBoxen mit zusätzlichen oberen und unteren Rändern und einer unteren Grenzlinie.

Das ist alles!

\documentclass[11pt]{article}
\usepackage[many]{tcolorbox}
\usepackage{multicol}

\tcbset{classified/.style={enhanced, blanker, borderline south={2pt}{0pt}{black}, top=1mm, bottom=1mm}}
\begin{document}

\begin{multicols}{3}
\begin{tcbitemize}[raster columns=1, raster row skip = 0pt, classified]
\tcbitem \$ CASH \$ For Broken Autos. Paying \$50 to \$500. I Tow! Call Doug Anytime 7-Days, (269)501-5763.
\tcbitem \$ \$ \$ WE BUY USED \& Unwanted Autos. Any condition, Top \$ \$ \$ paid. Will pick up Free. Airway Auto Parts (269)962-9521
\tcbitem \$500! POLICE IMPOUNDS! Hondas/Chevys/Jeeps! Cars from \$500! For listings: 800-619-3790 ext.2938
\tcbitem \$ CASH \$ For Broken Autos. Paying \$50 to \$500. I Tow! Call Doug Anytime 7-Days, (269)501-5763.
\tcbitem \$ \$ \$ WE BUY USED \& Unwanted Autos. Any condition, Top \$ \$ \$ paid. Will pick up Free. Airway Auto Parts (269)962-9521
\tcbitem \$500! POLICE IMPOUNDS! Hondas/Chevys/Jeeps! Cars from \$500! For listings: 800-619-3790 ext.2938
\tcbitem \$ CASH \$ For Broken Autos. Paying \$50 to \$500. I Tow! Call Doug Anytime 7-Days, (269)501-5763.
\tcbitem \$ \$ \$ WE BUY USED \& Unwanted Autos. Any condition, Top \$ \$ \$ paid. Will pick up Free. Airway Auto Parts (269)962-9521
\tcbitem \$500! POLICE IMPOUNDS! Hondas/Chevys/Jeeps! Cars from \$500! For listings: 800-619-3790 ext.2938
\tcbitem \$ CASH \$ For Broken Autos. Paying \$50 to \$500. I Tow! Call Doug Anytime 7-Days, (269)501-5763.
\tcbitem \$ \$ \$ WE BUY USED \& Unwanted Autos. Any condition, Top \$ \$ \$ paid. Will pick up Free. Airway Auto Parts (269)962-9521
\tcbitem \$500! POLICE IMPOUNDS! Hondas/Chevys/Jeeps! Cars from \$500! For listings: 800-619-3790 ext.2938
\tcbitem \$ CASH \$ For Broken Autos. Paying \$50 to \$500. I Tow! Call Doug Anytime 7-Days, (269)501-5763.
\tcbitem \$ \$ \$ WE BUY USED \& Unwanted Autos. Any condition, Top \$ \$ \$ paid. Will pick up Free. Airway Auto Parts (269)962-9521
\tcbitem \$500! POLICE IMPOUNDS! Hondas/Chevys/Jeeps! Cars from \$500! For listings: 800-619-3790 ext.2938
\tcbitem \$ CASH \$ For Broken Autos. Paying \$50 to \$500. I Tow! Call Doug Anytime 7-Days, (269)501-5763.
\tcbitem \$ \$ \$ WE BUY USED \& Unwanted Autos. Any condition, Top \$ \$ \$ paid. Will pick up Free. Airway Auto Parts (269)962-9521
\end{tcbitemize}
\end{multicols}

\begin{tcbitemize}[raster columns=3, raster row skip = 0pt, raster equal height=rows, classified]
\tcbitem \$ CASH \$ For Broken Autos. Paying \$50 to \$500. I Tow! Call Doug Anytime 7-Days, (269)501-5763.
\tcbitem \$ \$ \$ WE BUY USED \& Unwanted Autos. Any condition, Top \$ \$ \$ paid. Will pick up Free. Airway Auto Parts (269)962-9521
\tcbitem \$500! POLICE IMPOUNDS! Hondas/Chevys/Jeeps! Cars from \$500! For listings: 800-619-3790 ext.2938
\tcbitem \$ CASH \$ For Broken Autos. Paying \$50 to \$500. I Tow! Call Doug Anytime 7-Days, (269)501-5763.
\tcbitem \$ \$ \$ WE BUY USED \& Unwanted Autos. Any condition, Top \$ \$ \$ paid. Will pick up Free. Airway Auto Parts (269)962-9521
\tcbitem \$500! POLICE IMPOUNDS! Hondas/Chevys/Jeeps! Cars from \$500! For listings: 800-619-3790 ext.2938
\tcbitem \$ CASH \$ For Broken Autos. Paying \$50 to \$500. I Tow! Call Doug Anytime 7-Days, (269)501-5763.
\tcbitem \$ \$ \$ WE BUY USED \& Unwanted Autos. Any condition, Top \$ \$ \$ paid. Will pick up Free. Airway Auto Parts (269)962-9521
\tcbitem \$500! POLICE IMPOUNDS! Hondas/Chevys/Jeeps! Cars from \$500! For listings: 800-619-3790 ext.2938
\tcbitem \$ CASH \$ For Broken Autos. Paying \$50 to \$500. I Tow! Call Doug Anytime 7-Days, (269)501-5763.
\tcbitem \$ \$ \$ WE BUY USED \& Unwanted Autos. Any condition, Top \$ \$ \$ paid. Will pick up Free. Airway Auto Parts (269)962-9521
\tcbitem \$500! POLICE IMPOUNDS! Hondas/Chevys/Jeeps! Cars from \$500! For listings: 800-619-3790 ext.2938
\tcbitem \$ CASH \$ For Broken Autos. Paying \$50 to \$500. I Tow! Call Doug Anytime 7-Days, (269)501-5763.
\tcbitem \$ \$ \$ WE BUY USED \& Unwanted Autos. Any condition, Top \$ \$ \$ paid. Will pick up Free. Airway Auto Parts (269)962-9521
\tcbitem \$500! POLICE IMPOUNDS! Hondas/Chevys/Jeeps! Cars from \$500! For listings: 800-619-3790 ext.2938
\tcbitem \$ CASH \$ For Broken Autos. Paying \$50 to \$500. I Tow! Call Doug Anytime 7-Days, (269)501-5763.
\tcbitem \$ \$ \$ WE BUY USED \& Unwanted Autos. Any condition, Top \$ \$ \$ paid. Will pick up Free. Airway Auto Parts (269)962-9521
\end{tcbitemize}
\end{document}

Bildbeschreibung hier eingeben

Antwort2

Ich bin mir nicht sicher, wie Ihre gesamte Seite aussehen soll, aber Sie könnten eine Miniseite mit einer Linie zwischen Ihren Anzeigen in Betracht ziehen. So etwas in der Art. Ich habe in den anderen Miniseiten nur zufälligen Text hinzugefügt, aber Sie könnten zwischen jeder Seite weitere Zeilen einfügen. Auch hier bin ich mir nicht sicher, ob das das ist, wonach Sie suchen, aber es könnte ein Ausgangspunkt für weitere Recherchen sein:

\documentclass[11pt]{article}
\usepackage[many]{tcolorbox}
\usepackage{lipsum}
\usepackage{graphicx}
\graphicspath{ {../images/} } 


\begin{document}
\begin{minipage}[t]{0.3\textwidth}
 \$ CASH \$ For Broken Autos.
        Paying \$50 to \$500. I Tow!
        Call Doug Anytime 7-Days,
        (269)501-5763. 
        \noindent\rule{3.8cm}{0.8pt}

         \$ CASH \$ For Broken Autos.
        Paying \$50 to \$500. I Tow!
        Call Doug Anytime 7-Days,
        (269)501-5763. 
        \noindent\rule{3.8cm}{0.8pt}

         \$ CASH \$ For Broken Autos.
        Paying \$50 to \$500. I Tow!
        Call Doug Anytime 7-Days,
        (269)501-5763. 
        \noindent\rule{3.8cm}{0.8pt}

This is a test.  This is a test.  This is a test.  This is a test.  This is a test.  This is a test  This is a test.  This is a test.  This is a test  This is a test.  This is a test.  This is a test  This is a test.  This is a test.  This is a test
\end{minipage}
\hspace{0.5cm}
%%%%%
%%%%%
%%%%%
%%%%%
%%%%%
\begin{minipage}[t]{0.3\textwidth}
This is a test.  This is a test.  This is a test.  This is a test.  This is a test.  This is a test  This is a test.  This is a test.  This is a test  This is a test.  This is a test.  This is a test  This is a test.  This is a test.  This is a test
\end{minipage}
\hspace{0.5cm}
%%%%%
%%%%%
%%%%%
%%%%%
%%%%%
\begin{minipage}[t]{0.3\textwidth}
This is a test.  This is a test.  This is a test.  This is a test.  This is a test.  This is a test  This is a test.  This is a test.  This is a test  This is a test.  This is a test.  This is a test  This is a test.  This is a test.  This is a test
\end{minipage}

\end{document}

Beispiel

verwandte Informationen