614 private links
This unofficial site let's you explore the In Our Time archive by topic and year.
Via kottke.org.
Could we cross-reference objects (tables, figures, etc.) that exist in the attached papers (whose code-base is foreign to the thesis) while also having these cross-references target the appropriate paper in the List of Papers, with the aid of the cleveref, caption and hyperref packages?
To clarify, for a compilation PhD thesis, where the thesis itself is created using LaTeX, but where the attached papers (hence the compilation part in the thesis) may or may not have been created using LaTeX (even if they were created using LaTeX, their codebase is not available to the thesis at runtime).
So we need to setup some sort of static list of manually created \label{}s, that should occupy a counter and namespace separate from the thesis' own figures, tables, etc.
Preamble, literally
Uppsala university has a thesis template (my version, LuaLaTeX-based) that defines a listofpapers environment (the details of which are not important right now) that allows us to create a List of Papers and easily assign a label for each paper, like this:
\begin{listofpapers}
\item\label{P1}
Li, C.; Ahmed, T.; Ma, M.; Edvinsson, T.; Zhu, J. %
Photocatalytic properties of ZnO/CdS nanoarrays\\%
\item \label{P2}
Ahmed, T.; Edvinsson, T. %
Photocatalytic activity of ultrasmall ZnO\\%
\end{listofpapers}
The above works in conjunction with the following definitions in the preamble:
\usepackage{cleveref}
\crefname{listofpapersc}{\textbf{\textsc{paper}}}{\textbf{\textsc{papers}}}
\Crefname{listofpapersc}{\textbf{\textsc{paper}}}{\textbf{\textsc{papers}}}
\creflabelformat{listofpapersc}{#2\textbf{\textsc{#1}}#3}
to give a nicely formatted Paper 1 (in small-caps in this case) in the text when we issue \cref{P1}.
Solution: new floating environment and a custom cleveref format per paper
I have limited time to type this up, so here goes.
\usepackage{newfloat} % for the DeclareFloatingEnvironment cmd
\usepackage[nameinlink]{cleveref}
\crefname{listofpapersc}{\textbf{\textsc{paper}}}{\textbf{\textsc{papers}}}
\Crefname{listofpapersc}{\textbf{\textsc{paper}}}{\textbf{\textsc{papers}}}
\creflabelformat{listofpapersc}{#2\textbf{\textsc{#1}}#3}
\DeclareFloatingEnvironment[within=none]{tableP1}
\crefformat{tableP1}{\textsc{#2tab.~#1#3}~of\space\cref{P1}}
\Crefformat{tableP1}{\textsc{#2Tab.~#1#3}~of\space\cref{P1}}
\crefrangeformat{tableP1}{\textsc{tabs.~#3#1#4--#5#2#6}~of\space\cref{P1}}
\Crefrangeformat{tableP1}{\textsc{Tabs.~#3#1#4--#5#2#6}~of\space\cref{P1}}
\crefmultiformat{tableP1}{%
\scshape tabs.~#2#1#3}{%
\:\&\:#2#1#3~\textnormal{of\space}\cref{P1}}{%
, #2#1#3}{%
\:\&\:#2#1#3~\textnormal{of\space}\cref{P1}}
\Crefmultiformat{tableP1}{%
\scshape Tabs.~#2#1#3}{%
\:\&\:#2#1#3~\textnormal{of\space}\cref{P1}}{%
, #2#1#3}{%
\:\&\:#2#1#3~\textnormal{of\space}\cref{P1}}
\crefrangemultiformat{tableP1}{%
\scshape tabs.~#3#1#4--#5#2#6}{%
\:\&\:#3#1#4--#5#2#6~\textnormal{of\space}\cref{P1}}{%
, #3#1#4--#5#2#6}{%
\:\&\:#3#1#4--#5#2#6~\textnormal{of\space}\cref{P1}}
\Crefrangemultiformat{tableP1}{%
\scshape Tabs.~#3#1#4--#5#2#6}{%
\:\&\:#3#1#4--#5#2#6~\textnormal{of\space}\cref{P1}}{%
, #3#1#4--#5#2#6}{%
\:\&\:#3#1#4--#5#2#6~\textnormal{of\space}\cref{P1}}
and repeat the last block (everything down from DeclareFloatingEnvironment) for figureP1, and for tableP2, figureP2, etc.
And then, for the pièce de résistance, in one fell swoop we abuse both the listofpapers environment and the phantomcaption command to create the labels that our cross-references will target:
\begin{listofpapers}
\item\label{P1}
Li, C.; Ahmed, T.; Ma, M.; Edvinsson, T.; Zhu, J. %
Photocatalytic properties of ZnO/CdS nanoarrays\\%
\bgroup
\captionsetup{type=figureP2}
\phantomcaption\label{fig:P1-schematic}
\phantomcaption\label{fig:P1-mechanism}
[... more figure labels as necessary ...]
\egroup
\bgroup
\captionsetup{type=tableP2}
\phantomcaption\label{tab:P1-parameters}
\phantomcaption\label{tab:P1-rates}
[... more table labels as necessary ...]
\egroup
\item \label{P2}
Ahmed, T.; Edvinsson, T. %
Photocatalytic activity of ultrasmall ZnO\\%
\end{listofpapers}
captionsetup needs to be constrained by an environment (the manual suggests a minipage, which works fine but occupies a little bit of vertical space on the page), and it turns out group works in this context and has the added benefit of occupying no space in the List of Papers.
With that, we can simply type \cref{fig:P1-schematic} in the source to produce a nicely formatted cross-reference in the output document. The use of small-caps, abbreviated label names, and the trailing of paper X is my way to make these references contrast with the normal, in-thesis cross-references.
Here's an example of how the typeset cross-references look like:

Links and notes
- https://tex.stackexchange.com/questions/383587/plural-cref-with-custom-unnumbered-subsections
- https://tex.stackexchange.com/questions/597048/cleveref-fig-for-citing-multiple-subfigures-from-the-same-figure-but-figs
- https://gist.github.com/ummels/3428745
- https://reddit.com/r/LaTeX/comments/5gv6al/reference_multiple_list_items_in_single/
- the cleveref manual
- the caption and subcaption manuals
A small wrinkle when using bib2df together with bib2gls: the latter does not tolerate empty cross-reference fields.
bib2df::df2bib() takes a tibble and generates the entries.bib file, and since the tibble by necessity contains one column for each field, any entries with empty see fields get converted by bib2df::df2bib() to see={}. The presence of any glossary entry with an empty see={} field causes bib2gls to fail:
Processing resource thesis-1.glstex.
Parsing fields for entry 'absorption_coefficient'
Checking field aliases for absorption_coefficient.
Value=>user1={}
>> name={{}\ensuremath{\alpha}}
=>> name={{}\ensuremath{\alpha}}
>> first={absorption coefficient, \ensuremath{\alpha}}
=>> first={absorption coefficient, \ensuremath{\alpha}}
>> text={absorption coefficient}
=>> text={absorption coefficient}
>> description={absorption coefficient}
=>> description={absorption coefficient}
>> user1={}
=>> user1={}
>> see={}
=>> see={}
Checking cross-references for: absorption_coefficient
Field alias not set.
Error: EOFException
com.dickimawbooks.texparserlib.TeXParser.popStack(TeXParser.java:2635)
com.dickimawbooks.texparserlib.TeXObjectList.popArg(TeXObjectList.java:1294)
com.dickimawbooks.texparserlib.TeXObjectList.popArg(TeXObjectList.java:1275)
com.dickimawbooks.bib2gls.Bib2GlsEntry.initSeeRef(Bib2GlsEntry.java:4710)
com.dickimawbooks.bib2gls.Bib2GlsEntry.initCrossRefs(Bib2GlsEntry.java:4694)
com.dickimawbooks.bib2gls.GlsResource.processBibList(GlsResource.java:6722)
com.dickimawbooks.bib2gls.Bib2Gls.process(Bib2Gls.java:2706)
com.dickimawbooks.bib2gls.Bib2Gls.main(Bib2Gls.java:6616)
As you can see, other fields may be empty, but not the see field.
This is not a bug in either bib2df:: or bib2gls, and I don't expect either project to "fix" this issue. The former is not meant for and has no notion of glossaries, and the latter is not really expecting us to be generating the .bib file, so why should there be empty see fields?
To work around this I suggest removing all lines with see={} fields from the entries.bib file, here an example using sed:
sed -i '"/[Ss]ee\s*=\s*{}/d" entries.bib
I simply added this sed command to the R chunk that calls bib2df::df2bib().
I should probably add that my reason for generating the glossary bib-file from R in the first place was to make use of the excellent constants library.
Notes and links
This behaviour was observed on Ubuntu 22.04, R 4.1.3, TeXLive 2022, glossaries-extra 1.50, bib2gls 3.2, bib2df 1.1.1.
A work in progress. Over 700 pages, encompassing band structure, symmetry and much more.
By Daniel Arovas, UC Santa Barbara.
Lectures on theoretical physics from Cambridge University professor David Tong.
David Tong at Cambridge is a gifted educator and communicator who has written lecture notes that span a wide swath of the physics curriculum, from introductory material on mechanics through advanced graduate-level treatments of quantum field theory. Truly, these are a fantastic resource, made freely available.
Link and quote thanks to Douglas Natelson (nanoscale views).
I particularly like his notes on solid state physics (which contains links to other resources).
Cyklar och tillbehör
- https://sportson.se
- https://www.cykloteket.se
- https://www.velotek.se (butik och verkstad i Uppsala)
- https://www.skitotal.se (butik i Uppsala)
- Cykel-Viktor (verkstad och butik i Uppsala)
- http://stationsgatancykel.com (verkstad och butik i Uppsala)
- http://www.leffescykel.se (verkstad och butik i Uppsala)
- https://www.eriksbergscykel.se (verkstad och butik i Uppsala)
- http://cykelnestors.se (verkstad och begagnade cyklar i Uppsala)
- Rosendal cykel (verkstad och butik i Uppsala)
- https://www.uppsalareturcyklar.se (begagnade cyklar i Uppsala)
- https://jarlacykel.se (butik i Vasastan)
- https://www.cykelcity.se (butik på Södermalm)
- https://cykelspecialisten.com (butik på Södermalm)
- https://www.urbanbikewear.com (verkstad och butik på Södermalm)
- https://www.cykelstaden.se (butik i Vasastan)
- https://www.cykelverket.se (butik på Kungsholmen)
- https://morencykel.se (butik i Kärrtorp), lastcyklar (video)
- https://monarkcrescentoutlet.se (butik i Varberg)
- https://enskede-cykel.se
- https://www.tcmcykel.se (butik i Tyresö)
- https://cykelhuset.com (butik i Upplands Väsby)
- https://www.erlan.se (butik i Varberg)
- https://cykel-experten.se (butik i Malmö)
- https://www.rosebikes.se
- https://www.bikester.se
- https://www.cykelkraft.se
- https://www.cykelringen.se
- https://xxl.se (säljer allt möjligt, även cyklar och tillbehör)
- https://teamsportia.se (säljer allt möjligt, även cyklar och tillbehör)
- https://andtherev.com (bespoke bicycle builder, Södermalm)
- https://www.bike-discount.de (prices in EUR, ships to SWE)
- https://www.bike-components.de (prices in EUR, ships to SWE)
- https://www.bike24.com (prices in EUR, ships to SWE)
- https://www.chainreactioncycles.com (prices in GBP/EUR, ships to SWE)
- https://www.elektrofahrrad24.de (e-bikes and accessories)
- https://www.rei.com (sports gear and clothing, also bikes)
- https://www.bricklanebikes.co.uk (bespoke bicycle builder, London)
Bara tillbehör
- Gusti Läder: sadlar, väskor, handtag, och dylikt
- https://www.dutchbikebits.com (tillbehör, prices in EUR, ships to SWE)
Bara verkstad
- http://www.hokarangenicentrum.se/olssons-cykelverkstad
- https://bagarmossenscykelkok.se (ideell förening, gör-det-själv verkstad i Bagarmossen)
Andras listor
- Bästa sajterna för cykel och tillbehör - Cyklistbloggen
- https://cykelpendlare.blogspot.com/p/blog-page_31.html
Inte en rekommendation av någon butik - gör din egen bedömning innan du handlar!
The de-facto industry standard chart from the US National Renewable Energy Laboratory now published as an interactive web app.
- I figured out how to rename the headers, which involved editing longtab definitions, always a little tricky...
- Breaking issue with bib2gls v2.9, fixed by bib2gls author. Same issue on git.solarchemist.se. Related missing field "name" warning.
but more work remains to be done.
Good resources:
I wanted to create an ASCII art "bismillah" for use in the terminal.
Found this beautiful calligraphy by Nuria Garcia Masip. After cropping it, rotating it slightly and making the background monochromatic, I tried the ascii-image-converter by Zoraiz Hassan, and it worked great with the --braille flag:
This converter tool was really easy to install (just run the binary), and the output was automatically resized to fit the terminal window size, which was a convenient feature.
I discovered some other ASCII art CLI tools (never tested them though):
The website is a collaboration between two Dutch data science centers.
Should in my opinion also mention Gitea or Codeberg under suggested version control repositories, but otherwise good advice all around!
Det här var ju goda nyheter!
34 svenska myndigheter (inom ramen för eSam och dess projekt digital samarbetsplattform, dSam) har tagit tydlig ställning för e-tjänster med hög säkerhet, garanterad suveränitet, öppen källkod och öppna standarder.
الحلوة دي performed by the Ayoub Sisters. 4 min video.
As always, you should watch youtube videos from a libre frontend.
In Engine Trouble, an animation by Nate Milton, Krulwich shares how Earth’s delicate balance was transformed by the invention of the modern engine.
Nice, informative video. 7 min long.
Via https://thekidshouldseethis.com/post/engine-trouble-robert-krulwich-video
Riksdagen har beslutat att införa in- och utpasseringskontroller med metalldetektor vid högskoleprov från och med hösten 2023. Kontrollen ska utföras av ordningsvakter, och om det finns särskilda skäl kan en kroppsvisitation göras.
Förslaget innebär att samtliga provdeltagare utom personer under 15 år ska kontrolleras vid in- eller utpassering till och från de lokaler där provet skrivs och där kontroller upprättats.
Jag tycker det här är ett mycket olyckligt beslut. Givetvis behöver fusk stävjas, men det här är helt fel väg att gå. Högskoleprovet är för många gymnasister en av de första kontakterna med högskolan. Det här är en kraftig (och sen) överreaktion från riksdagen som kommer sända helt fel signaler om högskolans roll i samhället till framtida studenter.
Find a Fediverse server to sign up for, find one close to you!
A site that shows Fediverse servers status. Cool.
This unofficial guide to the Fediverse is also really good
https://fedi.tips
More good introductions to the Fediverse keep popping up:
Utility for converting cURL commands to code (Python, JavaScript, PHP, R, Go, C#, Ruby, Rust, Elixir, Java, MATLAB, Dart, CFML, Ansible URI, Strest or JSON).
American companies will never be able to resist the demands of American intelligence services. It doesn't matter if their servers are located in Virginia or Paris or on the damn moon.
Although the author does not mention alternatives, I think he makes a a strong case for self-hosted services (such as Nextcloud).
https://world.hey.com/dhh/american-data-spies-will-never-care-where-the-servers-are-371d4016
Solen är en i det närmaste outtömlig källa av energi och kommer så fortsätta vara under mer än överskådlig framtid. På vilka sätt kan vi utnyttja detta för att lösa energifrågan på jorden? I denna veckas UppTalk Weekly möter vi Tomas Edvinsson som kommer ge oss några av svaren.
UppTalk Weekly den 28 oktober 2022, 31 min 28 s.
Gäst: Tomas Edvinsson, professor vid institutionen för materialvetenskap, Uppsala universitet.
Moderator: Fredrik Engelmark, samverksansledare UU samverkan.
För att slippa reklam och tracking på youtube, titta på videon via valfri Invidious-server, eller ännu hellre, använd mpv med sponsorblock.
