Graphics, Figures & TablesBroken paper sheet

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
danielvelizv
Posts: 45
Joined: Wed May 25, 2016 7:04 am

Broken paper sheet

Post by danielvelizv »

Hello people, I would like to receive a help with a costume design I made, I'm trying to make a broken paper sheet but I want to add some effects like text written above the lines like a real written notebook (see the attached picture) and it could be wrikled if possible, I'm using tcolorbox, I have done my best but I would like to receive some advices about my requests. Here's the code I wrote, regards!

Code: Select all

\documentclass[10pt,letterpaper]{scrbook}
\usepackage[utf8]{inputenc}
\usepackage[spanish]{babel}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{lipsum}
\usepackage[pages=some, placement=bottom]{background}
\usepackage{graphicx}
\usepackage[most]{tcolorbox}
\usepackage{colortbl}
\usetikzlibrary{decorations.pathmorphing}
\usepackage[shadow]{todonotes}
\usepackage{pagecolor}
\pagestyle{empty}
\usepackage[left=3cm,right=2.5cm,top=2.5cm,bottom=2.5cm, marginparwidth=2.85cm, marginparsep=0pt]{geometry}
\definecolor{azul}{rgb}{0.0, 0.18, 0.65}
\definecolor{blanco}{rgb}{0.97, 0.97, 1}
\definecolor{gris}{rgb}{0.47, 0.53, 0.6}
\newtcolorbox{paginarota}{width=13.5cm, enhanced jigsaw, breakable, % permite romper página
    frame hidden, % oculta borde por defecto
    overlay={%
        \draw [
            fill=blanco,        % rellena con color el papel
            draw=gris!50!black, % color de borde
            decorate, % decoración
            decoration={random steps,segment length=2pt,amplitude=1pt},
            drop shadow=black, % sombra
        ]
        % línea superior
        (frame.north west)--(frame.north east)--
        % línea derecha
        (frame.north east)--(frame.south east)--
        % línea del fondo
        (frame.south east)--(frame.south west)--
        % línea izquierda
        (frame.south west)--(frame.north west);
    },
    % salto de párrafo obviando el tcolorbox
    parbox=false,}
\begin{document}
\begin{center}
\begin{paginarota}
\lipsum[1-2]
\end{paginarota}
\end{center}
\end{document}
Attachments
notebook-page-lines.jpg
notebook-page-lines.jpg (36.81 KiB) Viewed 2235 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

Broken paper sheet

Post by Stefan Kottwitz »

Hello Daniel,

I got an error with this code - did you already fix it?

! Missing \endcsname inserted.
<to be read again>
\protect
l.44 \lipsum[1-2]


Stefan
LaTeX.org admin
danielvelizv
Posts: 45
Joined: Wed May 25, 2016 7:04 am

Broken paper sheet

Post by danielvelizv »

Hello Stefan, I surprised a little bit when I read your response but I researched about this error in some forums, and first, I ran this code in TeXmaker on windows and I had no problem, no errors. And then, I found this problem is caused due to a conflict with babel package and some languages, so I think the solution is changing the [spanish] to another one like english. I can't try this solution because the code works normally in my PC but I want the solution of the requests I posted before. Regards! :)
Post Reply