1

I was adapting the ideas found in How to use Latex to print a document to look like a lined notebook?

to a beamer presentation, but I can't able it.

Can someone help me?

Welljc
  • 21
  • 1
    Welcome to TeX.SX! Could you please show us what you've tried so far as minimal, but compilable example? – TeXnician Jun 06 '18 at 14:33
  • \setbeamertemplate{background}{ \begin{tikzpicture}[scale=1,yshift=10cm,transform shape] \foreach \fila in {1,...,20} { \draw [line width=1pt,color=notepadrule] (current page.west|-1cm,-\fila*12pt) -- ++(\paperwidth,0); } \draw[overlay,red!70!black,line width=1pt] ([xshift=1pt]current page text area.west|-current page.north) --
    ([xshift=1pt]current page text area.west|-current page.south); \end{tikzpicture} }

    but, the lined notebook is inverted.

    – Welljc Jun 06 '18 at 16:44

2 Answers2

4

Squared paper instead of lined:

\documentclass{beamer}

\usepackage{lipsum}

\setbeamertemplate{background}[grid][step=13.6]

\begin{document}

\begin{frame}
    \vspace{-0.2cm}
    \lipsum[2]
\end{frame} 

\end{document}

enter image description here

2

Based on samcarters answer, I wrote a new background template lines. It has the same options as the grid template.

\documentclass{beamer}

\usepackage{lipsum}

\makeatletter
\usepackage{pgffor}
\newdimen\beamer@bglines@y
\defbeamertemplate{background}{lines}[1][]
{%
  \setkeys{beamer@backgroundgrid}{step=0.5cm,color=fg!10!bg}%
  \setkeys{beamer@backgroundgrid}{#1}%
  \begin{pgfpicture}{0cm}{0cm}{\the\paperwidth}{\the\paperheight}
    \beamer@bggc
    \pgfmathsetmacro{\beamer@bglines@num}{int(\the\paperheight/\beamer@bggw)}
    \foreach \y in {0,...,\beamer@bglines@num}{
        \pgfmathsetlength{\beamer@bglines@y}{\y*\beamer@bggw}
        \pgfpathmoveto{\pgfpoint{0pt}{\the\beamer@bglines@y}}
        \pgfpathlineto{\pgfpoint{\the\paperwidth}{\the\beamer@bglines@y}}
    }
    \pgfusepath{stroke}
  \end{pgfpicture}%
}
\makeatother

\setbeamertemplate{background}[lines][step=13.6]

\begin{document}

\begin{frame}
    \vspace{-0.2cm}
    \lipsum[2]
\end{frame} 

\end{document}

enter image description here

Mike
  • 8,664