PDF ã«ããã 5 ã¤ã®âãã³ãã«Boxâ
ãã¦ãPDF ç»åã«é¢ãã¦ã¯ã¡ãã£ã¨è©±ãè¤éã«ãªã£ã¦ãããPDF èªä½ããPostScript ã«åã£ã¦ä»£ãããã®ãã¨ãã¦éçºããããã®ã§ããããããç¡éã«ç¶ã座æ¨å¹³é¢ããããããã«å½ä»¤åãéãã¦æç»ãè¡ããã¨ãã£ãåºæ¬çãªä»çµã¯ PDF 㨠EPS ã§å
±éã§ãããããããPDF ã¨ãããã¡ã¤ã«å½¢å¼ããåä½ã®ç»åããç»é¢ã«è¡¨ç¤ºãããï¼è¤æ°ãã¼ã¸ã®ï¼ææ¸ããåç´ã«ç¨ç´ãµã¤ãºã®ã¿æå®ãããå°å·ç¨ææ¸ãã製æ¬ãè¡ãå°å·æãåãæ±ãæ¸ç±ãã¼ã¿ãã¨ãã£ãå¹
åºãç¨éãæ³å®ãã¦ããé¢ä¿ã§ãEPS ã®ãã¦ã³ãã£ã³ã°ããã¯ã¹ï¼bboxï¼ã«ç¸å½ããããã¯ã¹ï¼ã©ãã âãã³ãã«Boxâ ã¨ããå½¢ã®ååããã¤ï¼ãè¤æ°åå¨ããã®ã§ããã((ã¨ããã§ããããã® PDF è¦æ ¼ã§å®ããããããã¯ã¹ã¨ã¯å¥ã«ããPDF ãã¡ã¤ã«ã« EPS ãã¡ã¤ã«ã¨åæ§ã« â%%BoundingBox:
â ã®å½¢å¼ï¼DSCï¼ã®ã³ã¡ã³ããå
¥ãããã¨ããè¦å®ï¼ï¼ï¼ãç¨ãããããã¨ãããã¨ãã話ãè¦ããã¨ãããããããã PDF ãã¡ã¤ã«ãå®éã«è¦ããã¨ã¯ç¡ãã®ã§ãããã))
- MediaBoxï¼ ç¨ç´ï¼çã®åªä½ï¼ã«å®éã«å°å·ãããé åãä¸è¬ã®äººãè¡ãï¼éå°éçãªï¼å°å·è¡ç¨ã§ã¯ãã®ããã¯ã¹ã®ã¿ãæå®ï¼ããã³ä½¿ç¨ï¼ããããã¨ãå¤ãããã®å ´åã¯ãç¨ç´ãµã¤ãºãã表ãã(La)TeX ã«ããã¦æå®ããããç¨ç´ãµã¤ãºã((pdfTeX ã®
\pdfpagewidth
/height
ãDVIã¦ã§ã¢ã®ãªãã·ã§ã³è¨å®ã papersize special å½ä»¤çã«ããæå®ãããã))㯠MediaBox ã®ãµã¤ãºã«ä¸è´ããã - CropBoxï¼ æãä¸è¬çãªæå³ã§ã®ãããã®ãã¼ã¸ã®ï¼å¤å½¢ãè¾¼ããï¼å 容ãã表ãé åãPDF ãã¡ã¤ã«ã Adobe Reader çã®ãã¥ã¼ã¢ã§éããå ´åãCropBox ã®ä¸èº«ã®ã¿ã表示ãããããã§ããã
- BleedBoxï¼ å°éçãªå°å·å·¥ç¨ã«ãããããæã¡è½ã¨ããµã¤ãºãã«ç¸å½ããé åã
- TrimBoxï¼ å°éçãªå°å·å·¥ç¨ã«ãããããä»ä¸ãããµã¤ãºãã«ç¸å½ããé åã
- ArtBoxï¼ PDF ææ¸ãç»åã¨ãã¦ç¨ããå ´åã®ãããã®ç»åã®ï¼å¤å½¢ãè¾¼ããï¼å 容ãã表ãé åããã ããã® PDF ææ¸ã®ç¨éãç»åãããªãã®ãªãã°ãMediaBox ã®ã¿ãæå®ããã°ååã§ãå®éã«ã¯ ArtBox ã¯ãã¾ãç¨ãããã¦ããªãããã§ããã
ããã¦ãè«ççã«ã¯ãPDF ææ¸ã®åãã¼ã¸ãåè¿°ã® 5 種é¡ã®ããã¯ã¹ã®å¤ãå¿ ãæã£ã¦ããããã ããããã®å¤ãæ示ãããå ´åã¨æé»çã«æ±ºã¾ãå ´åãããã*1PDF è¦æ ¼ã«ããã¨ä»¥ä¸ã®ãããªè¦åã«ãªã£ã¦ããã
- MediaBox ã®å¤ã¯å¿ ãæ示ãããã*2
- CropBox ã®å¤ãæ示ããã¦ããªãå ´åã¯ãMediaBox ã¨åãã¨è§£éãããã
- BleedBoxãTrimBoxãArtBox ã®å¤ãæ示ããã¦ããªãå ´åã¯ãCropBox ã¨åãã¨è§£éãããã
ä¸ã¤ä¾ãæãã¦ããã¨ãä¾ãã°ãæ示ããã¦ããããã¯ã¹æå®ã
MediaBox = [0 0 50 50], CropBox = [0 0 40 40], ArtBox = [10 10 30 30]
ã® 3 ã¤ã§ãã£ãã¨ããã¨ãæ®ãã® 2 ã¤ã¯æ¬¡ã®ããã«æ±ºã¾ãã
BleedBox = TrimBox (= CropBox) = [0 0 40 40]
ãããCropBox ã®æå®ãç¡ãã£ãã¨ããã¨ããã®å ´åã¯ãCropBoxãBleedBoxãTrimBox ã®å ¨ã¦ã MediaBox ã«ä¸è´ãããã¨ã«ãªãã
PDF ã«ãããâbboxâ
ãã¦ãPDF å½¢å¼ã®ç»åãã¡ã¤ã«ã«ã¯ 5 ã¤ã® âãã³ãã«Boxâ ãåå¨ãããã¨ãå¤ã£ãããããã§ã¯ãgraphicx ããã±ã¼ã¸ã® \includegraphics
å½ä»¤ãç»åãæ¿å
¥ããå ´åã« bbox ã¨ãã¦ä½¿ãããã®ã¯ã©ããªã®ããçã㯠DVIãã©ã¤ãï¼ã¨ã³ã¸ã³ã«ããç°ãªãããªããå
è¿°ã®éãããã¥ã¼ã¢ã§éããã¨ãã«è¦ããã®ã¯ CropBoxããªã®ã§ãä¸è¬ã®ã¦ã¼ã¶ã«ã¨ã£ã¦ã¯ CropBox ã使ããã*3ã®ãæãç´æã«åãã¨æããããã ããã
- pdfTeX ç¨ã®ãã©ã¤ãã使ç¨ã®å ´åï¼LuaTeX ãå«ãï¼ï¼
\includegraphics
å½ä»¤ã®ãªãã·ã§ã³ãã¼pagebox
ã«ããã使ç¨ããâãã³ãã«Boxâãã¦ã¼ã¶ãé¸æã§ãããå¯è½ãªå¤ã¯mediabox
ãcropbox
ãbleedbox
ãtrimbox
ãartbox
ã®ä½ããã§ããã\includegraphics[pagebox=artbox,width=.6\linewidth]{image.pdf}
pagebox
ãã¼ã®æ¢å®å¤ã¯cropbox
ã§ãããã¤ã¾ããæ®é㯠CropBox ã bbox ã¨ãã¦ä½¿ãããã - XeTeX ç¨ã®ãã©ã¤ãã使ç¨ã®å ´åï¼
ããã¯ã¹ã®ç¨®å¥ãã¦ã¼ã¶ãé¸æãããã¨ã¯ã§ããã常㫠CropBox ã bbox ã¨ãã¦ä½¿ãããã*4 - dvipdfmx ç¨ã®ãã©ã¤ãã使ç¨ã®å ´åï¼
ãã¯ãããã¯ã¹ã®ç¨®å¥ãã¦ã¼ã¶ãé¸æãããã¨ã¯ã§ããªããããã使ç¨ãããããã¯ã¹ã®é¸æã®è¦åã以ä¸ã®ããã«å°ã ããããããCropBoxâArtBoxâTrimBoxâBleedBoxâMediaBox ã®é ã§æ示ããã¦ããæåã®ãã®ã使ãã
dvipdfmx ã®è§£éã®ä½ãåé¡ãã¨ããã¨ãå è¿°ã®ãéæ示æã®è§£éã®è¦åãã¨é½é½¬ãèµ·ããã¦ãããããåç´ã«ããã®ããã¯ã¹ã使ããããã¨è¨ãåããªãã®ã§ããã*5ç¾ç¶ã§ã¯ãdvipdfmx ã解éãã bboxããããã¨èªèããããä»ã«ä»æ¹ãç¡ãã§ãããã
ãªããdvipdfmx ã®å ´åãLaTeX å¦çæã« bbox ã®æ
å ±ã .xbb ãã¡ã¤ã«ã¾ã㯠\includegraphics
å½ä»¤ã® bb
ãªãã·ã§ã³ãã¼ã®ä½ããã®æ¹æ³ã§ä¸ããå¿
è¦ãããããdvipdfmx èªä½ãå
è¿°ã®è§£éãè¡ã£ã¦ãã以ä¸ãããã§ä¸ãã bbox ã®æ
å ±ã dvipdfmx ãé¸æããããã¯ã¹ã®ãã®ãç¨ããå¿
è¦ããããã¨ã«æ³¨æãã¦ããããããªãã¨ããbbox ã®å½è£
ããè¡ã£ããã¨ã«ãªããå°æ¥ã«ããã¦äºæãã¬åä½ãèµ·ããå¯è½æ§ãããã((ãbbox ã®å½è£
ããããªãã¡ dvipdfmx ãï¼æ¢å®ã§ï¼è§£éãã bbox ã¨ã¯ç°ãªãå¤ã .xbb ãã¡ã¤ã«ã bb
ãã¼ã§ä¸ããã¨ãããååæãã¯ãEPS ç»åã¨ããããããç»åã«é¢ãã¦ã¯ãææ°ã® dvipdfmx ã®ãã©ã¤ãã§ã¯ãã¯ãèªããããªããªã£ã¦ãããPDF ç»åã«ã¤ãã¦ã¯ãä»ã¯ã¾ã 使ãããç¶æ
ã§ã¯ããããå°æ¥ã使ãããã©ããã«ã¤ãã¦ã¯æ±ºãã¦æ¥½è¦³ã§ããªãã¨æãã))
*1:ãªãããã®è¨äºã§ã¯åãã¼ã¸ã®åããã¯ã¹ã®å¤ã PDF ãã¡ã¤ã«ä¸ã«ã©ã®ããã«è¨è¿°ããããã«ã¤ãã¦ã®è§£èª¬ã¯è¡ããªãã
*2:ãã ããå ¨ä½çãªææ¸è¨å®ã¨ã㦠MediaBox ã®å¤ãä¸ãã¦ããã¦ãåãã¼ã¸ã§ã¯ãããç¶æ¿ãããã¨ãããã¨ãå¯è½ã§ãããããã
*3:念ã®ããç¹°ãè¿ããããCropBox ã使ããããã¯ãCropBox ãæ示ãããå ´å㯠CropBox ããããã§ãªãå ´åã¯ï¼å¿ ãæ示ããã¦ããã¯ãã®ï¼MediaBox ã使ããããã¨è¨ã£ã¦ããã®ã¨åãã§ããã
*4:å®ã¯ XeTeX ã¨ã³ã¸ã³èªä½ã«ã¯ PDF ç»åæ¿å ¥æã«ããã¯ã¹ã®é¸æãæ©è½ãåãã£ã¦ããããæ®å¿µãªãã graphicx ã®ãã©ã¤ãã¯ããã«å¯¾å¿ãã¦ããªãã
*5:ä¾ãã°ãMediaBox=[M], CropBox=[M], ArtBox=[A]ããæ示ããã PDF ç»åã¨ãMediaBox=[M], ArtBox=[A]ããæ示ããã PDF ç»åã¯ãPDF è¦æ ¼ã®è§£éã«å¾ãã¨ãå ¨ãåãããã¯ã¹æå®ããæã£ã¦ãããã«ãé¢ããããdvipdfmx ã®è§£éãã bbox ã¯åè 㯠[M]ãå¾è 㯠[A} ã¨é£ãéã£ã¦ãã¾ãã