RCU-test-ratio.pdf has fairly wide side margins and Figure 12.4 does not fully utilize available page width. Crop the plot and include the resulting RCU-test-ratio-crop.pdf so that it can enjoy wider width.
At the moment, it is the only plot generated on-the-fly, but the same scheme can be applied in the future to similar plots. Signed-off-by: Akira Yokosawa <[email protected]> --- Makefile | 14 ++++++++++---- formal/formal.tex | 4 ++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 337f34aa..29d7c99f 100644 --- a/Makefile +++ b/Makefile @@ -58,6 +58,7 @@ SVG_GENERATED := CodeSamples/formal/data/RCU-test-ratio.svg SVGSOURCES := $(filter-out $(SVG_EMERGENCY) $(SVG_GENERATED),$(SVGSOURCES_ALL)) $(SVG_GENERATED) FAKE_EPS_FROM_SVG := $(SVGSOURCES:%.svg=%.eps) PDFTARGETS_OF_SVG := $(SVGSOURCES:%.svg=%.pdf) +PDFTARGETS_OF_SVG_CROP := CodeSamples/formal/data/RCU-test-ratio-crop.pdf OBSOLETE_FILES = extraction $(FAKE_EPS_FROM_SVG) CodeSamples/snippets.mk @@ -298,8 +299,9 @@ endif LATEX=$(LATEX) sh utilities/runfirstlatex.sh $(basename $@) autodate.tex: $(LATEXSOURCES) $(BIBSOURCES) $(LST_SOURCES) \ - $(PDFTARGETS_OF_EPS) $(PDFTARGETS_OF_SVG) $(FCVSNIPPETS) $(FCVSNIPPETS_VIA_LTMS) \ - $(GITREFSTAGS) utilities/autodate.sh + $(PDFTARGETS_OF_EPS) $(PDFTARGETS_OF_SVG) $(PDFTARGETS_OF_SVG_CROP) \ + $(FCVSNIPPETS) $(FCVSNIPPETS_VIA_LTMS) \ + $(GITREFSTAGS) utilities/autodate.sh sh utilities/autodate.sh perfbook_flat.tex: autodate.tex @@ -498,6 +500,10 @@ endif sh plot.sh && \ cd ../../.. +$(PDFTARGETS_OF_SVG_CROP): %-crop.pdf: %.pdf + @echo "Crop $< (pdfcrop)" + @pdfcrop $< $@ > /dev/null + ifdef RSVG_CONVERT FALLBACK_RSVG_CONVERT = || (cat $<i | rsvg-convert $(RSVG_FMT_OPT) > $@ && echo "$< --> $(suffix $@) (fallback rsvg-convert)") endif @@ -682,11 +688,11 @@ cleanfigs-eps: rm -f $(PDFTARGETS_OF_EPS) cleanfigs-svg: - rm -f $(PDFTARGETS_OF_SVG) $(SVG_EMERGENCY) $(SVG_GENERATED) + rm -f $(PDFTARGETS_OF_SVG) $(SVG_EMERGENCY) $(SVG_GENERATED) $(PDFTARGETS_OF_SVG_CROP) cleanfigs: cleanfigs-eps cleanfigs-svg -figs: $(PDFTARGETS_OF_EPS) $(PDFTARGETS_OF_SVG) +figs: $(PDFTARGETS_OF_EPS) $(PDFTARGETS_OF_SVG) $(PDFTARGETS_OF_SVG_CROP) punctcheck: utilities/punctcheck.sh diff --git a/formal/formal.tex b/formal/formal.tex index 9a3b20dc..c54e1505 100644 --- a/formal/formal.tex +++ b/formal/formal.tex @@ -318,9 +318,9 @@ can help reduce the cost of finding and fixing any bugs located. \begin{figure} \centering \IfEbookSize{ -\resizebox{\onecolumntextwidth}{!}{\includegraphics{CodeSamples/formal/data/RCU-test-ratio.pdf}} +\resizebox{\onecolumntextwidth}{!}{\includegraphics{CodeSamples/formal/data/RCU-test-ratio-crop.pdf}} }{ -\resizebox{4.5in}{!}{\includegraphics{CodeSamples/formal/data/RCU-test-ratio.pdf}} +\resizebox{4.5in}{!}{\includegraphics{CodeSamples/formal/data/RCU-test-ratio-crop.pdf}} } \caption{Linux-Kernel RCU Test Code} \label{fig:formal:Linux-Kernel RCU Test Code} -- 2.43.0
