Git Product home page Git Product logo

eso-pic's Introduction

eso-pic

LaTeX package to add picture commands (or back­grounds) to every page.

The pack­age adds one or more user commands to LaTeX’s shipout routine, which may be used to place the out­put at fixed positions. The grid option may be used to find the correct places.

See: https://github.com/rolfn/eso-pic

Rolf Niepraschk

eso-pic's People

Contributors

rolfn avatar kianmeng avatar

Stargazers

Jaehyeon Park (MCPE_PC) avatar tcosnr avatar Bickmick avatar Jezreel Maldonado avatar

Watchers

James Cloos avatar  avatar Johannes Böttcher avatar  avatar  avatar

Forkers

kianmeng

eso-pic's Issues

Problem in eso-pic example on LaTeX2e 2020-10-01

In a personal email Hironobu Yamashita wrote:

Hi Rolf,

The example file ``eso-ex1.tex'' of eso-pic package
does NOT work fine with latex-dev (LaTeX2e 2020-10-01).
See attached.

Ulrike kindly told me the reason:
https://chat.stackexchange.com/transcript/message/55660212#55660212

> \@tempdimc doesn't have the value the code expect as the
> length is now used internally too and so changes.
> The example shouldn't use such temp lengths, if it can't
> be sure that other code interferes.

Actually, `\@tempdimc` is newly used in the definition of
\put etc., since LaTeX2e 2020-10-01.

I think you can replace \@tempdimc e.g. by \my@tempdimc:

\newdimen\my@tempdima
\newdimen\my@tempdimb
\newdimen\my@tempdimc

and use them in the calculation in ``eso-ex1.tex''

Best regards,
Hironobu Yamashita

Incompatibility with {eepic}

I get an error when running the following example which seems to show an incompatibility between {eepic} and {showframe}:

\documentclass{report}

\usepackage{eepic}
\usepackage{showframe}

\begin{document}
This is a test.
\end{document}

\TextUpperLeft faulty in memoir

If one use in a oneside memoir document the asymetric margins, eso-pic calculates a faulty position for the left side of the text on even pages:

\documentclass[oneside]{memoir} %oneside!
\setlrmarginsandblock{0.5in}{2in}{*}
\checkandfixthelayout
\usepackage{showframe,lipsum,color} %showframe uses eso-pic
\AddToShipoutPictureFG{\AtTextUpperLeft{\textcolor{red}{XXXX}}}
\begin{document}

\lipsum[1-10] 

\newpage 
Suggested fix:
\makeatletter
\renewcommand\AtTextUpperLeft[1]{%
    \begingroup
      \if@twoside  %<-- added
      \ifodd\c@page
        \ESO@tempdima=\spinemargin
      \else
        \ESO@tempdima=\paperwidth
        \advance\ESO@tempdima-\textwidth
        \advance\ESO@tempdima-\spinemargin
      \fi                              
      \else                    %<---
       \ESO@tempdima=\spinemargin %<----
      \fi %<----
      \ESO@tempdimb=-\uppermargin
      \AtPageUpperLeft{%
        \put(\ESO@tempdima,\ESO@tempdimb){#1}%
      }%
    \endgroup
  }

\lipsum[1-10] 

\end{document}

image

Bug in the horizontal lines of the grid displayed by eso-pic

Here is a code:

\documentclass[12pt,a4paper]{article}

\usepackage{xcolor}
\usepackage[grid, gridunit=mm, gridcolor=orange, subgridcolor=blue!20,gridBG]{eso-pic}
\gridSetup{1mm}{1}{1}{10}{1}

\begin{document}

test 

\end{document}

Whatever I put in \gridSetup, the horizontal lines are always separated by 2 cm, and don't have sub-lines.

image

In vertical, instead of 10, 20, 30, we must read 20, 40, 60. And several horizontal lines are missing:

image

Change horizontal and vertical numbers boxes fill colour

Currently, the numbers background is not changable.
See \makebox(0,0)[c]{\ESO@colorbox{white}{\the\@tempcntb}} below.

eso-pic/eso-pic.dtx

Lines 658 to 685 in e083ee6

% --- horizontal numbers ---
% \changes{v1.1a}{2002/11/09}{Font setting added.}
% \begin{macrocode}
\fontsize{10}{12}\normalfont%
\ESO@div{\paperwidth}{\ESO@gridDelta}%
\multiput(0,\ESO@gridDeltaY)(\ESO@gridDelta,0){\@tempcnta}{%
\@tempcntb=\@tempcnta\advance\@tempcntb-\@multicnt
\ifnum\@tempcntb>1\relax
\multiply\@tempcntb by \ESO@gridDelta\relax
\ESO@tempdima=\@tempcntb sp\ESO@tempdima=\ESO@labelfactor\ESO@tempdima
\@tempcntb=\ESO@tempdima%
\makebox(0,0)[c]{\ESO@colorbox{white}{\the\@tempcntb}}%
\fi}%
% \end{macrocode}
% --- vertical numbers ---
% \begin{macrocode}
\ifx\ESO@gridunitname\@empty\def\@tempa{0}\else\def\@tempa{1}\fi
\ESO@div{\paperheight}{\ESO@gridDelta}%
\multiput(\ESO@gridDelta,0)(0,\ESO@gridDeltaY){\@tempcnta}{%
\@tempcntb=\@tempcnta\advance\@tempcntb-\@multicnt%
\ifnum\@tempcntb>\@tempa\relax
\multiply\@tempcntb by \ESO@gridDelta\relax%
\ESO@tempdima=\@tempcntb sp\ESO@tempdima=\ESO@labelfactor\ESO@tempdima
\@tempcntb=\ESO@tempdima
\makebox(0,0)[c]{\ESO@colorbox{white}{\the\@tempcntb}}%
\fi
}%
% \end{macrocode}

This would be particularly helpful for users of beamer dark themes.

image

Build Error From eso-pic.sty

Hello, Just wanted to let you know that I recently reinstalled MiKTeX and all of the packages, and recompiled a known-good LaTeX document. I got an error in eso-pic.sty, line 188, "undefined control sequence. There was also an error for "Missing \begin{document}.

I replaced eso-pic.sty with the one from my old PC, was dated 1999/12/01. The errors went away and I was able to build successfully.

Thanks,
Patrick Frye

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.