【LaTeX】でsubfilesを使ってファイル分割をしているとき、draftにして画像を枠で置き換える
最近私はLaTeXでsubfilesを使ってファイル分割をしています、というのもSandyBridgeおじさんなのでtexファイルのビルドが遅いからです。
その時、分割されたページをビルドする際は画像を枠だけにして、メインのtexファイルをビルドするときは画像をちゃんと埋め込むということをできないか考えました。
画像を埋め込むとビルドやレンダリングの時間が増加するので...
ファイル構成
- main.tex
- imgs/test.png
- pages/4_aaaaaaa.tex
ファイル
main.tex
\providecommand{\main}{..}
\documentclass[dvipdfmx]{jsarticle}
\usepackage[dvipdfmx]{graphicx}
\usepackage{subfiles}
\usepackage{graphicx}
\graphicspath{{\main/imgs/}{imgs/}}
\title{\vspace{-3cm} Problem set}
\author{\vspace{-1cm} だれそれ\thanks{うんたらだいがく がくぶ2年}}
\date{最終更新:~\today~\currenttime~(JST)}
\begin{document}
\maketitle
\subfile{pages/4_aaaaaaa}
\end{document}
4_aaaaaaa.tex
\makeatletter
\def\@classoptionslist{draft}
\makeatother
\documentclass[../main]{subfiles}
\setcounter{section}{3}
\begin{document}
\includegraphics[width=16cm]{test.png}\\
よって、企業の限界費用関数は
\end{document}
結果
4_aaaaaaa.texのほうをbuild
main.tex
\providecommand{\main}{..}
\documentclass[dvipdfmx]{jsarticle}
\usepackage[dvipdfmx]{graphicx}
\usepackage{subfiles}
\usepackage{graphicx}
\graphicspath{{\main/imgs/}{imgs/}}
\title{\vspace{-3cm} Problem set}
\author{\vspace{-1cm} だれそれ\thanks{うんたらだいがく がくぶ2年}}
\date{最終更新:~\today~\currenttime~(JST)}
\begin{document}
\maketitle
\subfile{pages/4_aaaaaaa}
\end{document}
4_aaaaaaa.tex
\makeatletter
\def\@classoptionslist{draft}
\makeatother
\documentclass[../main]{subfiles}
\setcounter{section}{3}
\begin{document}
\includegraphics[width=16cm]{test.png}\\
よって、企業の限界費用関数は
\end{document}
結果
4_aaaaaaa.texのほうをbuild
main.texのほうをbuild
Ref
Author And Source
この問題について(【LaTeX】でsubfilesを使ってファイル分割をしているとき、draftにして画像を枠で置き換える), 我々は、より多くの情報をここで見つけました https://qiita.com/haniokasai/items/ca04b7d31b22c20ffe81著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .