Skip to content

Suggestions for improvements of the doc #6

@quark67

Description

@quark67

In the doc, we read:

\begin{overpic}[⟨options⟩]{⟨filename⟩} ⟨picture code⟩ \end{overpic}

The following options are possible:

(...)

But the doc miss that we can also use any (?) option that \includegraphics accept.

The next example uses the options scale (as your example) and the option angle, both from the \includegraphics command from the graphicx package.

\documentclass[11pt]{article}
\usepackage{overpic}
\usepackage{xcolor}
\begin{document}
\begin{overpic}[abs,unit=1mm,scale=0.9,grid,angle=45]{cow-brown.pdf} \put(3,27){\color{blue}\huge\LaTeX}
\end{overpic}
\end{document}
image

Can you add in the doc that the options in \begin{overpic}[⟨options⟩]{⟨filename⟩} ⟨picture code⟩ \end{overpic} can also be options used in the command \includegraphics from the graphicx package?

Note that this exemple use the file cow-brown.pdf from the path /usr/local/texlive/2023/texmf-dist/tex/context/sample/common/cow-brown.pdf without having to add as special configuration so that pdflatex (or other engine) can see the file cow-brown.pdf. Unlike your exemple with golfer.eps (but I don't know if using the file cow-brown.pdf from the doc of the context engine is compatible with both your licence and the context licence).

So the example above runs as is.

You can also use one of the image provided by the package mwe (https://ctan.org/pkg/mwe). You don't have to load any supplemental package to use it (= you don't have to write \usepackage{mwe} in the code).

So there is another example, based on a multipage pdf provided by the mwe package, using the \includegraphics's key page to include the page 8 of the pdf used as source of the overpic environment:

\documentclass[11pt]{article}
\usepackage{overpic}
\usepackage{xcolor}
\begin{document}
\begin{overpic}[abs,unit=1mm,scale=0.3,grid,angle=15,page=8]{example-image-a4-numbered.pdf} \put(45,33){\color{blue}\huge\LaTeX}
\end{overpic}
\end{document}
image

The doc say (about golfer.eps, from ghostscript): "the file must be accesible to TeX". But how to make the file accessible as in your example without giving the full path (which is not the same for Miktek and TeX Live distributions? And not the same for TeX Live 2022 and TeX Live 2023)?

If you would keep your example with golfer.eps, at least please correct the typo in the word accesible ("the file must be accesible to TeX" -> "the file must be accessible to TeX").

I hope this can improve the doc of your useful package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions