Last active
May 15, 2019 05:20
-
-
Save doraTeX/a1f7523dd6c8bc21c1a7c51ace9b2bc1 to your computer and use it in GitHub Desktop.
jsarticle + mag + gentombow + pdfbox + pxpgfmark の両立実験
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
% (u)pLaTeX + dvipdfmx | |
\documentclass[8pt,b6paper,dvipdfmx,autodetect-engine,tombo]{jsarticle} | |
\usepackage[pdfbox]{gentombow} | |
\usepackage{tikz} | |
\usepackage{pxpgfmark} | |
\def\test{% | |
\begin{tikzpicture}[remember picture, overlay] | |
\coordinate (NE) at (current page.north east); | |
\coordinate (NW) at (current page.north west); | |
\coordinate (SE) at (current page.south east); | |
\coordinate (SW) at (current page.south west); | |
\coordinate (C) at (current page.center); | |
\draw[blue,line width=8pt] (SW) rectangle (NE); | |
\draw[red,line width=4pt] | |
(NE) circle (1) | |
(NW) circle (1) | |
(SE) circle (1) | |
(SW) circle (1) | |
(C) circle (1); | |
\draw | |
(current page.south) -- (current page.north) | |
(current page.west) -- (current page.east); | |
\end{tikzpicture}} | |
\makeatletter | |
\def\pgf@sys@pdf@mark@pos@pgfpageorigin{% | |
\pgf@x=\dimexpr (\stockwidth-\paperwidth)/2 - 1truein + 1in\relax | |
\pgf@y=\dimexpr \jsc@magscale\stockheight - (\stockheight + \paperheight)/2 + 1truein - 1in\relax | |
\ignorespaces | |
} | |
\makeatother | |
\begin{document} | |
\test | |
\end{document} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@kbhonda さん,
すみません,ここのコメントに今更気づきました。シンプルな式に同値変形していただきありがとうございます。
が,TeX Live 2019 で
\pdfsavepos
の仕様が変わった影響で,従来のコードがうまく動かなくなってしまいました。新仕様に対応する試みを私のレポジトリで現在試行中です。