Доска объявлений с tcolor box

Доска объявлений с tcolor box

Я пытаюсь сделать классифицированную рекламную статью в LaTex с использованием tcolor box. Я новичок в этом деле, поэтому, пожалуйста, будьте терпеливы со мной. Вот скриншот того, что я пытаюсь эмулировать.

Пример объявления, которое я пытаюсь воспроизвести

Вот что мне удалось создать на данный момент:

попытка tcolor box сгенерировать классифицированные объявления

Мне нужно иметь возможность иметь одну строку между каждым объявлением с минимальным интервалом и невидимой границей с обеих сторон. Пожалуйста, предложите, как мне изменить код или есть ли лучший код, который я должен использовать. Спасибо.

Вот мой код LaTeX .tex:

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

решение1

Так как первоначальное предложение было сделано с tcolorbox, здесь у вас есть два возможных решения с tcolorbox. Как уже предложил OP, эти решения основаны на tcbraster. Первое использует одноколоночный tcbraster внутри многоколоночной среды, а второе использует трехколоночный tcbraster.

Внутренние блоки определяются classifiedстилем и представляют собой blankблоки с добавленными верхними и нижними полями, а также нижней границей.

Вот и все!

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

введите описание изображения здесь

решение2

Я не уверен, как вы хотите, чтобы выглядела вся ваша страница, но вы можете рассмотреть возможность использования мини-страницы с линией, разделяющей ваши объявления. Что-то вроде этого. Я добавил только случайный текст на других мини-страницах, но вы можете продолжать добавлять больше строк между каждой из них. Опять же, я не уверен, что это то, что вы ищете, но это может быть местом, где можно начать и провести больше исследований:

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

Пример

Связанный контент