Skip to content

Instantly share code, notes, and snippets.

View MichalPt's full-sized avatar

Michal Ptáček MichalPt

  • Charles University
  • Prague, CZE
View GitHub Profile
@MichalPt
MichalPt / script-heic2jpg
Last active October 31, 2023 00:23
Short batch script to convert .heic images to .jpg using ImageMagick. Place this script to "shell:sendto" to be able to convert selected images using "right-click>Send to" in Windows
@echo off
for %%a in (%*) do (
echo %%a
echo %%~na %%~xa
if "%%~xa"==".heic" magick convert %%a %%~na.jpg
)
@MichalPt
MichalPt / macro.sty
Created July 26, 2023 10:50
Latex - Liouville space notation for (super)kets and (super)bras
%%%% Ket & bra with double angles - for Liouville space notation
% use the following command to source it in the main tex file:
% \input{macro.sty}
%
\def\lang{\ensuremath{\langle}}
\def\rang{\ensuremath{\rangle}}
\NewDocumentCommand{\braa}{sO{}m}{%
\IfBooleanTF{#1}
@MichalPt
MichalPt / latexmkrc
Created July 26, 2023 10:45
Use custom package files on Overleaf.com
$ENV{'TEXINPUTS'}='./tex//:' . $ENV{'TEXINPUTS'}
@MichalPt
MichalPt / doi.sty
Created July 26, 2023 10:43
DOI package for abbrvnat.bst
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{doi}[2018/09/09 handle doi numbers]
\RequirePackage{hyperref}
%% To change the default prefix, redefine this command within your own code.
%% It takes no argument, which is different from the doipubmed package.
%\newcommand{\doitext}{}
@MichalPt
MichalPt / abbrvnat.bst
Last active July 26, 2023 10:47
Customized Latex citation format, based on 'abbrvnat' of Natbib package
%% File: `abbrvnat.bst'
%% A modification of `abbrv.bst' for use with natbib package
%%
%% Copyright 1993-2007 Patrick W Daly
%% Max-Planck-Institut f\"ur Sonnensystemforschung
%% Max-Planck-Str. 2
%% D-37191 Katlenburg-Lindau
%% Germany
%% E-mail: daly@mps.mpg.de
%%
@MichalPt
MichalPt / readleaf.user.js
Last active July 25, 2023 19:13 — forked from tillahoffmann/readleaf.user.js
Readcube-Overleaf integration: Toggle to sort the imported bib entries is added, couple of bugs fixed
// ==UserScript==
// @name Readcube-Overleaf integration
// @namespace https://tillahoffmann.github.io/
// @version 0.3
// @description Adds an "Update Library" button to Overleaf that allows you to import your Readcube library.
// @author Till Hoffmann, Michal Ptacek
// @match https://www.overleaf.com/*
// @connect readcube.com
// @grant GM_xmlhttpRequest
// ==/UserScript==