PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, September 15, 2022

[FIXED] How can I print the presentation made in Beamer without white bars?

 September 15, 2022     beamer, latex, printing     No comments   

Issue

How can I print on Epson L4160, or any other printer the presentation made in Latex connected with Beamer, having scale of frame 16:9? My trouble is strange, because I don't want to have a white bars... But, what I have discovered, on the preview in Adobe Reader, in full screen preview it looks very good...

Snapshot of printing:

Snapshot of printing

Snapshot of fullscreen presentation:

Snapshot of fullscreen presentation

And code: (due to many lines, I can paste it on other page if it is necessary)

\documentclass[polish,aspectratio=169]{beamer}

\usepackage[utf8]{inputenc}
\usepackage{polski}
\usepackage{ragged2e} %justify
\usepackage[inline]{enumitem}
\usepackage{multicol}
\usepackage{gensymb} %degree
\usepackage{colortbl} %color of row
\usepackage{cancel} %fraction cancel line
\usepackage{graphicx}
\usepackage{tikz}
\usepackage{url} %bibliography
\usepackage{amsmath}
\usepackage{subcaption}
\usepackage{scalerel}

\DeclareMathOperator*{\Bigcdot}{\scalerel*{\cdot}{\bigodot}}

\usetikzlibrary{positioning, calc}

\usetheme{Warsaw}

\definecolor{myAmber}{rgb}{1.0, 0.49, 0.0} %#FF7E00
\usecolortheme[named=myAmber]{structure}

\setlength{\parindent}{0pt}

\title{Wprowadzenie do matematyki}
\subtitle{2. Koniunkcja i alternatywa w zdaniach.}
\author{Konstanty Dmochowski}
%\date{}

\expandafter\def\expandafter\insertshorttitle\expandafter{%
    \insertshorttitle\hfill \hspace*{3.85cm}%
    \insertframenumber\,/\,\inserttotalframenumber}

\makeatletter
\long\def\beamer@@ssection*#1{\beamer@section[]{}}
\makeatother %remove section both from header and outline in beamer 

\newcommand{\lcancel}[2]{\cancel{#1}_{#2}}
\newcommand{\ucancel}[2]{\cancel{#1}^{#2}}

\newcommand*{\rechterWinkel}[3]{% #1 = point, #2 = start angle, #3 = radius
    \draw[shift={(#2:#3)}] (#1) arc[start angle=#2, delta angle=90, radius = #3];
    \fill[shift={(#2+45:#3/2)}] (#1) circle[radius=2.5\pgflinewidth];
}

%\special{pdf:encrypt ownerpw (prezentacjaPL2020) userpw (prezentacja2020) length 128 perm 2052}

\AtBeginSection[]
{
    \begin{frame}
        \frametitle{Plan pracy}
        \tableofcontents[currentsection]
    \end{frame}
}

\begin{document}
\begin{frame}
    \titlepage
\end{frame}

\begin{frame}
    \frametitle{Plan pracy}
    \tableofcontents
\end{frame}

\section{Wprowadzenie}
\begin{frame}{O czym będziemy mówili?}
    \begin{figure}[h!]
        \begin{center}
            \includegraphics[scale=0.2]{idea-3383766_1280.jpg}
        \end{center}
        \caption{Jak sądzicie?}
    \end{figure}
\end{frame}

\begin{frame}{Przypomnienie}
    \justify
    Do tej pory mówiliśmy wyłącznie o \textbf{zdaniach logicznych} i ich \textbf{zaprzeczeniach}.
    \\[0.25cm]
    \pause
    \textbf{Przykład:} \textit{Kwadrat ma nieskończenie wiele osi symetrii.}
    \pause
    \\[0.25cm] Są to tak zwane zdania proste - wyrażają one bowiem jedną myśl, składają się z jednego orzeczenia.
    \pause \\[0.25cm] \textcolor{myAmber}{Pytanie:} Co się dzieje, gdy zdanie jest bardziej rozbudowane, skomplikowane? W jaki sposób wówczas z nim poradzić?
\end{frame}
\subsection{Zdania złożone}
\begin{frame}{Zdania złożone}
    \justifying
    Okazuje się, że zdania tej postaci:
    \\[0.25cm] \pause \textit{Wojtek poszedł do kina lub zjawił się na stadionie.}
    \\[0.25cm] \pause \textit{Eliza narysowała dom i wymieniła cieńkopis.}
    \pause \\[0.25cm] prowadzą nas do nowego pojęcia: \textbf{zdania złożonego}. Powiedzmy coś o nich.
\end{frame}

Solution

To get more or less the same aspect ration than a A4 paper, you could modify the page geometry like this:

\documentclass[polish,aspectratio=169]{beamer}

\usepackage[utf8]{inputenc}
\usepackage{polski}
\usepackage{ragged2e} %justify
%\usepackage[inline]{enumitem}
%\usepackage{multicol}
\usepackage{gensymb} %degree
%\usepackage{colortbl} %color of row
\usepackage{cancel} %fraction cancel line
%\usepackage{graphicx}
\usepackage{tikz}
%\usepackage{url} %bibliography
%\usepackage{amsmath}
\usepackage{subcaption}
\usepackage{scalerel}

\usetheme{Warsaw}
\definecolor{myAmber}{rgb}{1.0, 0.49, 0.0} %#FF7E00
\usecolortheme[named=myAmber]{structure}

\title{Wprowadzenie do matematyki}
\subtitle{2. Koniunkcja i alternatywa w zdaniach.}
\author{Konstanty Dmochowski}

\makeatletter
\setlength\beamer@paperwidth{16.00cm} \setlength\beamer@paperheight{11.31cm} 
\geometry{%
  papersize={\beamer@paperwidth,\beamer@paperheight}, 
  hmargin=2cm,% 
  vmargin=0cm,%
  head=1cm,% might be changed later 
  headsep=0pt,%
  foot=1cm% might be changed later 
} 
\makeatother

\begin{document}
\begin{frame}
    \titlepage
\end{frame}

\end{document}

Some other comments about your code:

  • don't use enumitem with beamer

  • beamer has its own column mechanism, multicol is not necessary

  • if you need something from the colortbl package, use the xcolor={table} documentclass option instead of loading the package

  • you don't need graphicx

  • you also don't need url - beamer loads hyperref

  • no need for amsmath either, beamer already loads this

  • using floating specifier such as [h!] in a documentclass without floating mechanism makes no sense

  • don't use \begin{center}...\end{center} within your figures. This adds additional vertical space and is also unnecessary because figures are centred by default

  • don't abuse \\ for line breaks. Leave an empty line instead

  • instead of manually numbering things like Definicja 1., use an appropriate environment like definition, these can be made to number things automatically

  • Just give the filename of images without file type. Latex will automatically choose the best suited type in case you have the image in different formats

  • have a look at the booktabs package. Data prison style tables are really ugly

  • it should be \justifying and not \justify (the later kinda works by accidents, but causes many strange problems because it actually is an environment and not a macro)



Answered By - samcarter_is_at_topanswers.xyz
Answer Checked By - Marilyn (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing