Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve missing gnuplot plots in manual #1239

Merged
merged 3 commits into from
Jan 4, 2024

Conversation

muzimuzhi
Copy link
Member

@muzimuzhi muzimuzhi commented Feb 11, 2023

Motivation for this change

The last commit is just temp and should be removed before merging.

Fixes #1191
Fixes #1238

Checklist

Please signoff your commits to explicitly state your agreement to the Developer Certificate of Origin. If that is not possible you may check the boxes below instead:

build.lua Outdated
-- Execute cp() manually to keep the directory structure, otherwise if
-- "plots/*.table" is appended to docfiles, ".table" files will be copied
-- directly to typesetdir, not typesetdir .. "/plots".
cp("plots/*.table", docfiledir, typesetdir .. "/plots")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To keep treatments unified, do similar special treatment for "images/*.jpg"?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternatively, appending the subdir name to docfiles does the trick. @josephwright Is this the expected behavior or a misused "feature"?

diff --git a/build.lua b/build.lua
index 7bf4f678..9e712ddb 100644
--- a/build.lua
+++ b/build.lua
@@ -12,7 +12,7 @@ docfiledir = "./doc/generic/pgf"
 docfiles =
   {
     "RELEASE_NOTES.md", "description.html", -- Part of the release script
-    "color.cfg", "pgfmanual.cfg", "images/*.jpg", "*.tex" -- Build the PDF
+    "color.cfg", "pgfmanual.cfg", "images", "plots", "*.tex" -- Build the PDF
   }
 tdsroot = "generic"
 typesetfiles = {"pgfmanual.tex"}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another idea: if \input@path/\l_file_search_path_seq is respected by \pgfutil@IfFileExists and \pgfutil@InputIfFileExists (see #1259), then we can drop prefix plots/ in manual examples

\tikz \draw plot[mark=x,smooth] file {plots/pgfmanual-sine.table};

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternatively, appending the subdir name to docfiles does the trick. @josephwright Is this the expected behavior or a misused "feature"?

From conversation in latex3/l3build#331 and a casual check in l3build source, yes it is supported. I tend to use this currently undocumented feature in pgf's l3build configuration.

As this PR also promotes missing plot data file from warning to error, feature breaking change in l3build will be caught.

@muzimuzhi
Copy link
Member Author

The last commit is just temp and should be removed before merging.

\usetikzpackage raises error for unknown package name. I'm now leaning towards (officially) promote "Plot data file not found" from warning to error.

@muzimuzhi muzimuzhi force-pushed the gnuplots-files branch 2 times, most recently from 2e3b1f7 to 2386280 Compare February 13, 2023 04:18
@muzimuzhi muzimuzhi changed the title Resolve missing plots in manual Resolve missing gnuplot plots in manual Feb 14, 2023
@muzimuzhi
Copy link
Member Author

As d1ada29 didn't pass the "Check commits" check, I reorganized commits and reworded CHANGELOG entries (perhaps overly), and force pushed again (sorry).

@muzimuzhi muzimuzhi requested a review from hmenke January 3, 2024 18:57
Copy link
Member

@hmenke hmenke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect 👌

@hmenke hmenke merged commit 4da661c into pgf-tikz:master Jan 4, 2024
3 checks passed
@muzimuzhi muzimuzhi deleted the gnuplots-files branch January 14, 2024 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

gnuplot plots are all missing How to compile the “tex” files to generate the documentation pgfmanual.pdf
2 participants