# Created 2022-03-03 Thu 01:40 #+title: April 2021 #+date: 2021-04-30 #+author: TEC #+subtitle: Export /&/ plot in style #+html_head: * A discussion on contributor support Concerns [[https://lists.gnu.org/archive/html/emacs-orgmode/2021-04/msg00291.html][were raised]][fn:1] about some contributors' patches languishing, and it not being made clear how long it might take to get a response from someone. In [[https://lists.gnu.org/archive/html/emacs-orgmode/2021-04/msg00549.html][response to this]], a the new role of /Contributor Steward/ has been created to: help ensure contributors get a timely response, help out with preliminary patch feedback, and keep [[https://updates.orgmode.org/][updates.orgmode.org]] up to date. Org now has three Contributor Stewards to ease the process for patch submitters and core maintainers: - Timothy / TEC - Tim Cross - John Corless If you've been thinking about [[https://orgmode.org/contribute.html][getting involved with Org]], now is a great time to give it a shot! #+begin_info *Ways you can contribute to the project* Test patches, improve documentation, translate pages, confirm bugs, feedback on a proposed feature, and more... #+end_info [fn:1] Disclosure: this is me. * DOI link exporting [[https://www.doi.org/][Digital Document Identifiers]] (DOIs) are an ISO-standardised way of robustly linking to a particular online resource. You'll see these a lot with academic papers, for example. Thanks to Nicolas Goaziou, when exporting to HTML, LaTeX, Ascii, and texinfo DOIs are turned into links, for example [[doi:10.18637/jss.v046.i03]] becomes: #+begin_src html doi:10.18637/jss.v046.i03 #+end_src #+begin_src LaTeX \href{https://doi.org/10.18637/jss.v046.i03}{doi:10.18637/jss.v046.i03} #+end_src #+begin_src text #+end_src #+begin_src texinfo @uref{https://doi.org/10.18637/jss.v046.i03} #+end_src This is a minor change, but I think DOIs are great, so I'm highlighting it. * Org plot improvements Over the past month =org-plot.el= has received some attention, my two favourite changes are: - You can now call ~org-plot/gnuplot~ with =C-c C-c= on a =#+plot= line _TEC_ - When an image is regenerated, all instances of the image in the buffer are refreshed _TEC_ Other than a few minor tweaks and bug fixes, that's it for April. However, over the last year there have been some rather nice improvements that I didn't mention in the initial blog post, so let's go over them now. - The inbuilt plot types have been abstracted out into a new structure: ~org-plot/preset-plot-types~. This means if you have a gnuplot template you find yourself using a lot, you can now turn it into a custom plot type 😀 _TEC_ - A new plot type has been added: a radar / spider plot _TEC_ - Some new plot keywords have arrived too _TEC_ - =transpose= (=trans=) --- The plot internally does something very similar to =M-x org-table-transpose-table-at-point= before using the table data. - =ymin= (=min=), =ymax= (=max=), =xmin=, =xmax= --- Four new keywords (and two aliases) to set the bounds of a plot. Partially supported by the default types. - =ticks= --- The number of axis ticks to use along the axis. A good value is guessed based on a prime factorisation based heuristic (welcome to improvements). - Some new customisation functions --- The new variables ~org-plot/gnuplot-script-preamble~, ~org-plot/gnuplot-term-extra~, and ~org-plot/gnuplot-script-preamble~ open up new ways to tweak plots to your liking. For example, [[https://tecosaur.github.io/emacs-config/config.html#org-plot][I use this]] to set line and background colours based on my current Emacs theme. If you haven't used Org plot before, I think it's a great way to quickly visualise data in a table. To get started, all you need is a =#+plot= line above the table, with a certain =type= specified (e.g. =type:2d= for a 2d line plot). Then, if you can specify a certain columns as the independent variable (x-values) with =ind=, and list dependant variables (y-values) with =deps=. You can see these parameters set in the figure above, #+begin_src org ,#+plot: type:2d ind:1 deps:(2 3 4) | Xval | Red | Blue | Green | |------+-----+------+-------| | 0 | 1 | 2 | 3 | | 1 | 2 | 3 | 4 | #+end_src This will call gnuplot and a window showing the plot will appear. If you want to save the plot to a file, just use the =file= parameter, e.g. =file:"demoplot.svg"= (note the quotes). That should get you started, you can see [[https://orgmode.org/manual/Org-Plot.html][the manual]] for the full list of available keywords and find more examples of usage [[https://orgmode.org/worg/org-tutorials/org-plot.html][on worg]]. * Tweaked ~ox-html~ style As displays become more high-res, lines of text which span the whole screen become ... long. So long that it genuinely makes it harder to read the text. A small tweak to the default style and lines are now capped at =60em= wide and centred in the page --- much better 🙂. _TEC_ Also, the HTML export now: - has a slightly nicer source block style - labels =authinfo= blocks * A collection of export improvements - =Verbatim= in headings no longer breaks LaTeX exports _TEC_ - Make the top level class for exported HTML customisable via ~org-html-content-class~ / =#+HTML_CONTENT_CLASS= _Sameer Rahmani_ - Use == tags for SVGs with =ox-html=, for better behaviour and W3C compliance _TEC_ - Remove redundant ~type="text/javascript"~ from ~