GeneralProblems when using 'steinmetz' with 'cancel' Package

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
User avatar
Jether
Posts: 5
Joined: Sun Jun 26, 2011 1:10 am

Problems when using 'steinmetz' with 'cancel' Package

Post by Jether »

I've been using the cancel package for a while, and I like it very much. This weekend I found the steinmetz package that interests me as much as the former, but when I use then at the same time, the lines and the arrows of the \cancel and \cancelto macros became misplaced.

The steinmetz package needs the pict2e package, and it's seems to me that this package when loaded redefines the references of the picture environment.

Does anyone came across this problem, and does it have any solution?

Exemple file (try first with steinmetz package commented and then uncommented):

Code: Select all

\documentclass[10pt,a4paper,fleqn,brazil]{article}

\usepackage[left=3cm,right=2cm,top=2.5cm,bottom=2cm]{geometry}
\usepackage{setspace}

\usepackage{babel} % Suporte para Portugues do Brasil
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}

\usepackage{amsmath,amssymb,amsthm,amsfonts}

%\usepackage{steinmetz}
\usepackage{cancel}

\begin{document}

\verb#$a + \cancel{b} = \cancel{b} + c$# \hspace{2cm} $a + \cancel{b} = \cancel{b} + c$

\verb#$a + \cancelto{0}{b} = c + d$# \hspace{2cm} $a + \cancelto{0}{b} = c + d$

\end{document}

Jether

Recommended reading 2024:

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

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

User avatar
Stefan Kottwitz
Site Admin
Posts: 10323
Joined: Mon Mar 10, 2008 9:44 pm

Problems when using 'steinmetz' with 'cancel' Package

Post by Stefan Kottwitz »

Hi Jether,

welcome to the board!

To solve the conflict between pict2e and the cancel package, insert before loading the steinmetz package:

Code: Select all

\PassOptionsToPackage{original}{pict2e}
Stefan
LaTeX.org admin
User avatar
Jether
Posts: 5
Joined: Sun Jun 26, 2011 1:10 am

Problems when using 'steinmetz' with 'cancel' Package

Post by Jether »

Hi, Stefan,

Thanks for your answer, using the line \PassOptionsToPackage{original}{pict2e} solved the alinment problem, but the \phase macro defined in steinmetz package doesn't work properly, see below the corretc behavior (before using \PassOptionsToPackage{original}) and the result after.
steinmetz.png
steinmetz.png (2.55 KiB) Viewed 2120 times
Jether
Post Reply