593 private links
Is there a website or R function that can help us answer the question "has this particular person authored any CRAN packages"? Turns out, no.
This question was asked a decade ago on StackOverflow, and for a while the p_search_any()
function of the pacman
package seems to have done the job. But since at least 2018 this function no longer works (likely because CRAN changed its website HTML).
It is unfortunate that the pacman documentation still describes this function, which I imagine might confuse any would-be users.
CRAN does list all package maintainers in a simple (but quite large) HTML table, but that is not the same as authors.
The more modern pkgsearch
package does not offer any way to search by authors, as far as I can tell.
I am not sure whether other repositories (TeXLive, for example) offer a simple way to search by authors. But as demonstrated by pacman
this is doable via web scraping, but as scraping is inherently fragile ideally CRAN should offer the data in some structured format (JSON, XML, whatever). If we are wishing for stuff anyway, I would also like to add that it would be awesome to search not just using name but also ORCID.
When writing in R Markdown format I often would like to comment out one or more lines of text (for example to quickly test variations on sentences or paragraphs) in a way that these comments do not show in the generated HTML file.
The R Markdown Cookbook only mentions HTML comment syntax <!-- your comment -->
which does not stop the comment from remaining in the generated HTML file.
Best solutions, as far as I know:
Additional YAML blocks
Add a YAML block with commented out lines (baptiste's suggestion):
Some text in the document.
---
# commented out text
# and such
---
This works fine, it is just slightly verbose to use.
But it is the only option that works without any issues.
Abuse the markdown link labels syntax
This is the most popular answer (by far) on SO:
Some text in the document.
[//]: # (commented out text)
[//]: # (another comment)
According to other answers/comments, this sort of comment line should always have a blank line before it to be proper.
The drawback for Rmd appears as soon as we have more than one such comment line; knitr spits out a very visible warning in the standard output:
[WARNING] Duplicate link reference '[//]' at ... line ...
.
The only(?) way to avoid those warnings is to differentiate the link labels, but that quickly becomes tedious.
Some text in the document.
[//1]: # (commented out text)
[//2]: # (another comment, now without a knitr warning)
If you know of a less verbose method than adding YAML blocks, or an easier way to circumvent the knitr warnings, I would love to learn about it.
Passwordstore is a great password manager, and I rely on it also in my Ansible playbooks, where it works by causing the gpg-agent to prompt me for the passphrase of my gpg key.
This prompt is a GUI prompt, which is very suitable when sitting at the computer in question. But a small annoyance is that it does not work at all when working on a remote computer via ssh (the prompt shows up on the remote computer's desktop, and the Ansible playbook in the terminal just freezes until it eventually fails).
It would be so much nicer if those ssh terminal sessions would instead get the gpg-agent prompt in the terminal. So far I have not found a method that achieves this without also sacrificing the GUI desktop prompt for non-remote work.
Desktop and laptop running Ubuntu 22.04 with i3wm desktop.
The relevant parts of my config can be seen in https://codeberg.org/ansible/dotfiles.
I considered the following related Q:s&A:s but did not achieve the desired outcome.
- https://unix.stackexchange.com/questions/554153/what-is-the-proper-configuration-for-gpg-ssh-and-gpg-agent-to-use-gpg-auth-sub
- https://stackoverflow.com/questions/17769831/how-to-make-gpg-prompt-for-passphrase-on-cli
- https://superuser.com/questions/1189602/how-to-configure-gpg2-to-ask-for-passphrase-on-the-console-instead-of-in-a-popup
- https://unix.stackexchange.com/questions/217737/pinentry-fails-with-gpg-agent-and-ssh
Some more tests
In the SSH session (no effect, unfortunately):
gpg-connect-agent updatestartuptty /bye
Learned that the gpg-agent is running in --supervised
mode, and its ENV variables include DISPLAY=:0
:
solarchemist@desktop:~
$ sudo cat /proc/2652288/environ
HOME=/home/solarchemist LANG=en_US.UTF-8 LC_TIME=sv_SE.UTF-8 LOGNAME=solarchemist
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin
SHELL=/bin/bash SYSTEMD_EXEC_PID=2652288 USER=solarchemist
XDG_DATA_DIRS=/home/solarchemist/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop
XDG_RUNTIME_DIR=/run/user/1000 QT_ACCESSIBILITY=1
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus DISPLAY=:0 XAUTHORITY=/home/solarchemist/.Xauthority
MANAGERPID=1532 LISTEN_PID=2652288 LISTEN_FDS=4
LISTEN_FDNAMES=browser:extra:std:ssh INVOCATION_ID=<stuff> JOURNAL_STREAM=<stuff>
(the PID of the gpg-agent process is easily identified with ps aux | grep [g]pg
).
Manual work-around
Manual work-around is to set pinentry-program /usr/bin/pinentry-tty
in ~/.gnupg/gpg-agent.conf
and reload the agent gpg-connect-agent reloadagent /bye
.
To revert to the default (GUI) pinentry behaviour, just remove the line and reload the agent again.
How could we go about to draw a straight line (vertical or horizontal) on top of any other window on our Linux desktop? I'm using i3
window manager with picom
compositor at present, so I'm primarily interested in solutions that works for that.
I should get back to this question in the future and implement a nicer solution than pango-view
pango-view
Produces a vertical line (actually, more of a vertical box of limited width).
Very easy to make it, just issue the command in a terminal. pango-view
was already installed.
$ pango-view --height=99999 --margin=1 --background=red -t ''
- https://forum.puppylinux.com/viewtopic.php?p=76743 relevant, very good and recent
- https://askubuntu.com/questions/328543/are-there-any-tools-for-drawing-on-the-desktop-drawing-over-apps
gromit-mpx
is a good over-app painter, but does not provide perfectly straight lines- https://www.linuxfordevices.com/tutorials/linux/tools-to-draw-on-linux-screen
Using biblatex with a numeric style and a book class with frontmatter/mainmatter, would it be possible to have all citations in the frontmatter appear last in the list of references, as if the frontmatter (from biblatex's point of view) appeared after the mainmatter?
\documentclass{book}
\usepackage[utf8]{inputenc}
\usepackage[backend=biber,sorting=none,style=nature]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@misc{hydrogen,
author = {Author, A.},
year = {2001},
title = {Alpha}}
@misc{neodymium,
author = {Luthor, Lex.},
year = {2002},
title = {Bravo}}
\end{filecontents}
\addbibresource{\jobname.bib}
\frontmatter
\cite{neodymium}
\mainmatter
\cite{hydrogen}
\backmatter
\printbibliography[title={List of references}]
\end{document}
In the above MWE, references in the "List of references" are printed in the same order as they were given in the document, so neodymium
would be listed before hydrogen
in the "List of references".
This also means that the citation in the frontmatter would be labelled [1]
in the text and the first citation in the mainmatter would be labelled [2]
.
This is just as expected with the numeric style as often used in science and engineering theses.
I wonder if there is some way to make the first citation in the mainmatter be [1]
(because it might be jarring for the reader to see the first citation in the first chapter be something like [11]
, it may make them wonder what they missed), without having a separate \printbibliography
for the frontmatter (nor using refsection
or refsegments
, because I don't think they will help in this case). Preferably any citations in the frontmatter would simply be appended to the end of "List of references", as if the frontmatter was processed after the frontmatter by biblatex
.
I think this would be hard to achieve. But I'd like to hear if anyone knows better?
Would something like this be possible? Have I missed something obvious?
I have read the Sorting section in the biblatex manual, and read these related (but not-very-pertinent) questions on TeX.SE
- https://tex.stackexchange.com/questions/540610/numbering-issue-in-printbiblography/540615
- https://tex.stackexchange.com/questions/306678/biblatex-have-two-separate-bibliographies-with-consecutive-numbering
- https://tex.stackexchange.com/questions/244150/citations-out-of-order-with-appendix-and-split-bibliographies-in-backmatter
Would it be possible to add a comment system to Shaarli posts?
It seems so.
- Add Disqus or Isso comments box on a permalink page [#181](https://links.solarchemist.se/./add-tag/181)
- also see Shaarli plugins, may be some ready-made solution out there.