Skip to content

Instantly share code, notes, and snippets.

@zr-tex8r
Forked from anonymous/pxtatescale.sty
Last active January 21, 2017 12:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save zr-tex8r/5237259 to your computer and use it in GitHub Desktop.
Save zr-tex8r/5237259 to your computer and use it in GitHub Desktop.
例のscaleboxなアレ
% pxtatescale.sty
\NeedsTeXFormat{pLaTeX2e}
\ProvidesPackage{pxtatescale}[2013/03/25 v0.2]
\def\pxqtg@pkgname{pxtatescale}
\@ifpackageloaded{graphics}{}{%else
\PackageError\pxqtg@pkgname{Package 'graphics' not loaded}\@ehc}
\begingroup
\def\pxqtg@try@patch#1#2#3{%
\def\pxqtg@temp{#2}\ifx#1\pxqtg@temp
\gdef#1{#3}%
\PackageInfo\pxqtg@pkgname{Patch applied to \string#1}%
\else
\PackageWarningNoLine\pxqtg@pkgname{Patch cannot be applied to \string#1}%
\fi}
\pxqtg@try@patch\Gscale@start
{\special{pdf:btrans xscale \Gscale@x\space yscale \Gscale@y}}%
{\special{pdf:btrans
\iftdir xscale \Gscale@y\space yscale \Gscale@x
\else xscale \Gscale@x\space yscale \Gscale@y
\fi}}
\endgroup
\documentclass[a5paper,10pt]{jsbook}
\usepackage{plext} % 縦書き拡張
\usepackage[dvipdfmx]{graphicx}
\usepackage{pxtatescale}
\begin{document}
scalebox のテスト。
\noindent\null
□\scalebox{1}[-1]{あ}□1,-1
\\
□\scalebox{-1}[1]{あ}□-1,1
\vspace{1cm}
\begin{minipage}<t>{4.5cm}
\noindent\null
□\scalebox{1}[-1]{あ}□1,-1
\\
□\scalebox{-1}[1]{あ}□-1,1
\end{minipage}
\end{document}
\documentclass[a5paper,papersize]{jsarticle}
\usepackage{plext} % 縦書き拡張
\usepackage[dvipdfmx]{graphicx}
\usepackage{pxtatescale}
\begin{document}
\begin{center}\begin{minipage}<t>{10cm}
\fbox{\scalebox{2}[1]{scale}}
\par
\fbox{\reflectbox{reflect}}
\par
\fbox{\resizebox{1in}{2\height}{resize}}
\par\medskip
% 回転は元々正常らしい
\fbox{\rotatebox[origin=c]{30}{rotate}}
\end{minipage}\end{center}
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment