Created
March 22, 2016 02:39
-
-
Save doraTeX/91fd44952dbaa72de148 to your computer and use it in GitHub Desktop.
TikZ の current page と jsclasses との相性問題の解決
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\NeedsTeXFormat{pLaTeX2e} | |
\ProvidesPackage{fixpageforjs}[2016/3/22, v0.01] | |
\RequirePackage{pgf} | |
\ifpapersize %% for [papersize] option of jsclasses | |
\def\pgf@sys@pdf@mark@pos@pgfpageorigin{% | |
\pgf@x=\dimexpr 1in \iftombow\else - 1truein\fi\relax | |
\pgf@y=\dimexpr \paperheight*\the\mag/1000 - \paperheight + \iftombow 1in \else 1truein - 1in\fi\relax | |
\ignorespaces | |
} | |
\else %% for geometry.sty | |
\def\pgf@sys@pdf@mark@pos@pgfpageorigin{% | |
\pgf@x=\dimexpr 1in - 1truein\relax | |
\pgf@y=\dimexpr \paperheight - \paperheight/\the\mag*1000 - 1in + 1truein\relax | |
\ignorespaces | |
} | |
\expandafter\def\csname pgf@sh@np@current page\endcsname{% | |
\def\southwest{\pgfpointorigin}% | |
\def\northeast{\pgfpoint{\pgfsys@thepagewidth/\the\mag*1000}{\pgfsys@thepageheight/\the\mag*1000}}% | |
} | |
\fi | |
\endinput |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment