Skip to content

Commit

Permalink
Merge pull request #1030 from drgrice1/tikz-image
Browse files Browse the repository at this point in the history
Implement TikZ images for problems
  • Loading branch information
mgage authored Dec 28, 2019
2 parents 4efbef7 + e45183e commit cc87cca
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions conf/defaults.config
Original file line number Diff line number Diff line change
Expand Up @@ -1238,6 +1238,7 @@ ${pg}{modules} = [
[qw(GD)],
[qw(AlgParser AlgParserWithImplicitExpand Expr ExprWithImplicitExpand utf8)],
[qw(AnswerHash AnswerEvaluator)],
[qw(TikZImage)],
[qw(WWPlot)], # required by Circle (and others)
[qw(Circle)],
[qw(Class::Accessor)],
Expand Down
7 changes: 6 additions & 1 deletion conf/site.conf.dist
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@ $externalPrograms{pdflatex} ="/usr/bin/pdflatex --shell-escape";

$externalPrograms{dvipng} ="/usr/bin/dvipng";

# In order to use imagemagick convert you need to change the rights for PDF files from
# "none" to "read" in the policy file /etc/ImageMagick-6/policy.xml. This has possible
# security implications for the server.
$externalPrograms{convert} ="/usr/bin/convert";

####################################################
# NetPBM - basic image manipulation utilities
# Most sites only need to configure $netpbm_prefix.
Expand All @@ -128,7 +133,7 @@ $externalPrograms{pngtopnm} = "$netpbm_prefix/pngtopnm";
####################################################
# set timeout time (-t 40 sec) to be less than timeout for problem (usually 60 seconds)
$externalPrograms{checkurl} = "/usr/bin/lwp-request -d -t 40 -mHEAD "; # or "/usr/local/bin/w3c -head "
$externalPrograms{curlCommand} = "/usr/bin/curl";
$externalPrograms{curl} = "/usr/bin/curl";

####################################################
# image conversions utiltiies
Expand Down
2 changes: 1 addition & 1 deletion lib/WeBWorK/PG.pm
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ sub defineProblemEnvir {
$envir{externalPng2EpsPath} = $ce->{externalPrograms}->{png2eps};
$envir{externalGif2PngPath} = $ce->{externalPrograms}->{gif2png};
$envir{externalCheckUrl} = $ce->{externalPrograms}->{checkurl};
$envir{externalCurlCommand} = $ce->{externalPrograms}->{curlCommand};
#$envir{externalCurlCommand} = $ce->{externalPrograms}->{curl};
# Directories and URLs
# REMOVED: courseName
# ADDED: dvipngTempDir
Expand Down

0 comments on commit cc87cca

Please sign in to comment.