branch: externals/org-mathsheet commit b512f038cba5bc4c382d2d85bb6e96d89136caa9 Author: Ian Martins <ia...@jhu.edu> Commit: Ian Martins <ia...@jhu.edu>
Minor changes suggested by ELPA maintainers --- README.md | 25 ++++++++++++------------- mathsheet.org | 15 +++++++-------- org-mathsheet.el | 9 ++++----- 3 files changed, 23 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 028a50b37f..65311c2544 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Here are some example worksheets generated by this tool: 1. [arithmetic](examples/add-sub-1.pdf) 2. [algebra](examples/algebra-1.pdf) -They were generated using [this configuration](examples/example.org). +They were generated using [this configuration](examples/example.md). ## Requirements @@ -99,7 +99,7 @@ Both are described in detail below. These math functions are allowed: sqrt, sin, cos, tan, asin, acos, atan, floor, ceil, round. Find more details about each of these - functions in the emacs calc manual. + functions in the Emacs Calc manual. 4. Template Examples @@ -126,7 +126,7 @@ Both are described in detail below. a worksheet, each worksheet is configured with a set of templates in a templates table. For example - <table id="org63a6bd3" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides"> + <table id="orga527c8f" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides"> <colgroup> @@ -184,7 +184,7 @@ Both are described in detail below. Here is another example template table. - <table id="org5f01db6" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides"> + <table id="orgf65faac" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides"> <colgroup> @@ -287,7 +287,7 @@ Both are described in detail below. ### Header -This is the standard emacs package header. +This is the standard Emacs package header. `emacs 26` is needed for `seq-random-elt`. `calc` is used to solve the problems as well as converting them to mathematical notation in LaTeX @@ -858,11 +858,10 @@ will overwrite the same file. (dolist (group (seq-partition problems prob-cols)) (insert (format "\\begin{multicols}{%d}\n" prob-cols)) (dolist (row group) - (if (cadddr row) - (insert (format"\\question %s\n" - (org-mathsheet--convert-to-latex (car row)))) - (insert (format"\\question %s = \\rule[-.2\\baselineskip]{2cm}{0.4pt}\n" - (org-mathsheet--convert-to-latex (car row)))))) + (insert (format (if (nth 3 row) + "\\question %s\n" + "\\question %s = \\rule[-.2\\baselineskip]{2cm}{0.4pt}\n") + (org-mathsheet--convert-to-latex (car row))))) (insert "\\end{multicols}\n") (insert "\\vspace{\\stretch{1}}\n")) @@ -889,12 +888,12 @@ will overwrite the same file. # Literate Programming -This is written as a [literate program](https://en.wikipedia.org/wiki/Literate_programming) using [emacs -org-mode](https://orgmode.org/). [The org file](mathsheet.org) contains the code and +This is written as a [literate program](https://en.wikipedia.org/wiki/Literate_programming) using [Emacs +org-mode](https://orgmode.org/). [The org file](mathsheet.md) contains the code and documentation for the math worksheet generation script. When this file is saved, the source code is generated using `org-babel-tangle` and the readme is generated using `org-md-export-to-file`. -The first line of [the org file](mathsheet.org) configures emacs to run those commands +The first line of [the org file](mathsheet.md) configures emacs to run those commands whenever this file is saved, which generates the scripts and readme. diff --git a/mathsheet.org b/mathsheet.org index 02e42d7c4f..b573b20b0a 100644 --- a/mathsheet.org +++ b/mathsheet.org @@ -77,7 +77,7 @@ answers that are negative or don't divide evenly. These math functions are allowed: sqrt, sin, cos, tan, asin, acos, atan, floor, ceil, round. Find more details about each of these -functions in the emacs calc manual. +functions in the Emacs Calc manual. **** Template Examples Here are a few more examples: @@ -167,7 +167,7 @@ This is an example problem-set block. * Code walkthrough ** Problem generation *** Header -This is the standard emacs package header. +This is the standard Emacs package header. ~emacs 26~ is needed for ~seq-random-elt~. ~calc~ is used to solve the problems as well as converting them to mathematical notation in LaTeX @@ -829,11 +829,10 @@ will overwrite the same file. (dolist (group (seq-partition problems prob-cols)) (insert (format "\\begin{multicols}{%d}\n" prob-cols)) (dolist (row group) - (if (cadddr row) - (insert (format"\\question %s\n" - (org-mathsheet--convert-to-latex (car row)))) - (insert (format"\\question %s = \\rule[-.2\\baselineskip]{2cm}{0.4pt}\n" - (org-mathsheet--convert-to-latex (car row)))))) + (insert (format (if (nth 3 row) + "\\question %s\n" + "\\question %s = \\rule[-.2\\baselineskip]{2cm}{0.4pt}\n") + (org-mathsheet--convert-to-latex (car row))))) (insert "\\end{multicols}\n") (insert "\\vspace{\\stretch{1}}\n")) @@ -858,7 +857,7 @@ will overwrite the same file. #+end_src * Literate Programming -This is written as a [[https://en.wikipedia.org/wiki/Literate_programming][literate program]] using [[https://orgmode.org/][emacs +This is written as a [[https://en.wikipedia.org/wiki/Literate_programming][literate program]] using [[https://orgmode.org/][Emacs org-mode]]. [[file:mathsheet.org][The org file]] contains the code and documentation for the math worksheet generation script. When this file is saved, the source code is generated using =org-babel-tangle= and diff --git a/org-mathsheet.el b/org-mathsheet.el index 31433a5c6d..755b0ecc19 100644 --- a/org-mathsheet.el +++ b/org-mathsheet.el @@ -404,11 +404,10 @@ answers will be in 4 columns." (dolist (group (seq-partition problems prob-cols)) (insert (format "\\begin{multicols}{%d}\n" prob-cols)) (dolist (row group) - (if (cadddr row) - (insert (format"\\question %s\n" - (org-mathsheet--convert-to-latex (car row)))) - (insert (format"\\question %s = \\rule[-.2\\baselineskip]{2cm}{0.4pt}\n" - (org-mathsheet--convert-to-latex (car row)))))) + (insert (format (if (nth 3 row) + "\\question %s\n" + "\\question %s = \\rule[-.2\\baselineskip]{2cm}{0.4pt}\n") + (org-mathsheet--convert-to-latex (car row))))) (insert "\\end{multicols}\n") (insert "\\vspace{\\stretch{1}}\n"))