Initial commit

This commit is contained in:
Ian Jauslin 2022-06-14 16:32:34 +02:00
commit d254a3e3f4
34 changed files with 4340 additions and 0 deletions

2395
Jauslin_2022.tex Normal file

File diff suppressed because it is too large Load Diff

59
Makefile Normal file
View File

@ -0,0 +1,59 @@
PROJECTNAME=$(basename $(wildcard *.tex))
LIBS=$(notdir $(wildcard libs/*))
FIGS=$(notdir $(wildcard figs/*.fig))
PDFS=$(addsuffix .pdf, $(PROJECTNAME))
SYNCTEXS=$(addsuffix .synctex.gz, $(PROJECTNAME))
all: $(PROJECTNAME)
$(PROJECTNAME): $(LIBS) $(FIGS)
pdflatex -file-line-error $@.tex
pdflatex -file-line-error $@.tex
pdflatex -synctex=1 $@.tex
$(PROJECTNAME).aux: $(LIBS) $(FIGS)
pdflatex -file-line-error -draftmode $(PROJECTNAME).tex
$(SYNCTEXS): $(LIBS) $(FIGS)
pdflatex -synctex=1 $(patsubst %.synctex.gz, %.tex, $@)
libs: $(LIBS)
$(LIBS):
ln -fs libs/$@ ./
bibliography/bibliography.tex: $(PROJECTNAME).aux
BBlog -c bibliography/conf.BBlog -d $(BIBLIOGRAPHY) -b bibliography/bibliography.tex
figs: $(FIGS)
$(FIGS):
make -C figs/$@
for pdf in $$(find figs/$@/ -name '*.pdf'); do ln -fs "$$pdf" ./ ; done
clean-aux: clean-figs-aux
rm -f $(addsuffix .aux, $(PROJECTNAME))
rm -f $(addsuffix .log, $(PROJECTNAME))
rm -f $(addsuffix .out, $(PROJECTNAME))
rm -f $(addsuffix .toc, $(PROJECTNAME))
clean-libs:
rm -f $(LIBS)
clean-figs:
$(foreach fig,$(addprefix figs/, $(FIGS)), make -C $(fig) clean clean-dat; )
rm -f $(notdir $(wildcard figs/*.fig/*.pdf))
clean-figs-aux:
$(foreach fig,$(addprefix figs/, $(FIGS)), make -C $(fig) clean-aux; )
clean-tex:
rm -f $(PDFS) $(SYNCTEXS)
clean-bibliography:
rm -f bibliography/bibliography.tex
clean: clean-aux clean-tex clean-libs clean-figs

42
README Normal file
View File

@ -0,0 +1,42 @@
This directory contains the source files to typeset the article, and generate
the figures. This can be accomplished by running
make
This document uses a custom class file, located in the 'libs' directory, which
defines a number of commands. Most of these are drop-in replacements for those
defined in the 'article' class.
Some extra functionality is provided in custom style files, located in the
'libs' directory.
* Dependencies:
pdflatex
TeXlive packages:
amsfonts
array
color
graphics
hyperref
latex
marginnote
mathds
pgf
standalone
GNU make
gnuplot
meankondo v1.5
* Files:
Jauslin_2022.tex:
main LaTeX file
libs:
custom LaTeX class file
figs:
source code for the figures

View File

@ -0,0 +1,80 @@
\bibitem[An70]{An70}P.W. Anderson - {\it A poor man's derivation of scaling laws for the Kondo problem}, Journal of Physics C: Solid State Physics, volume\-~3, page\-~2436, 1970,\par\penalty10000
doi:{\tt\color{blue}\href{http://dx.doi.org/10.1088/0022-3719/3/12/008}{10.1088/0022-3719/3/12/008}}.\par\medskip
\bibitem[An80]{An80}N. Andrei - {\it Diagonalization of the Kondo Hamiltonian}, Physical Review Letters, volume\-~45, issue\-~5, 1980,\par\penalty10000
doi:{\tt\color{blue}\href{http://dx.doi.org/10.1103/PhysRevLett.45.379}{10.1103/PhysRevLett.45.379}}.\par\medskip
\bibitem[BF84]{BF84}G.A. Battle, P. Federbush - {\it A note on cluster expansions, tree graph identities, extra $1/N!$ factors!!!}, Letters in Mathematical Physics, volume\-~8, pages\-~55-57, 1984,\par\penalty10000
doi:{\tt\color{blue}\href{http://dx.doi.org/10.1007/BF00420041}{10.1007/BF00420041}}.\par\medskip
\bibitem[BCe78]{BCe78}G. Benfatto, M. Cassandro, G. Gallavotti, F. Nicol\`o, E. Olivieri, E. Presutti, E. Scacciatelli - {\it Some probabilistic techniques in field theory}, Communications in Mathematical Physics, volume\-~59, issue\-~2, pages\-~143-166, 1978,\par\penalty10000
doi:{\tt\color{blue}\href{http://dx.doi.org/10.1007/BF01614247}{10.1007/BF01614247}}.\par\medskip
\bibitem[BG90]{BG90}G. Benfatto, G. Gallavotti - {\it Perturbation theory of the Fermi surface in a quantum liquid - a general quasiparticle formalism and one-dimensional systems}, Journal of Statistical Physics, volume\-~59, issue\-~3-4, pages\-~541-664, 1990,\par\penalty10000
doi:{\tt\color{blue}\href{http://dx.doi.org/10.1007/BF01025844}{10.1007/BF01025844}}.\par\medskip
\bibitem[BGe94]{BGe94}G. Benfatto, G. Gallavotti, A.Procacci, B. Scoppola - {\it Beta function and Schwinger functions for a many Fermions system in one dimension - Anomaly of the Fermi surface}, Communications in Mathematical Physics, volume\-~160, pages\-~93-171, 1994,\par\penalty10000
doi:{\tt\color{blue}\href{http://dx.doi.org/10.1007/BF02099791}{10.1007/BF02099791}}.\par\medskip
\bibitem[BGJ15]{BGJ15}G. Benfatto, G. Gallavotti, I. Jauslin - {\it Kondo Effect in a Fermionic Hierarchical Model}, Journal of Statistical Physics, volume\-~161, issue\-~5, pages\-~1203-1230, 2015,\par\penalty10000
doi:{\tt\color{blue}\href{http://dx.doi.org/10.1007/s10955-015-1378-7}{10.1007/s10955-015-1378-7}}, arxiv:{\tt\color{blue}\href{http://arxiv.org/abs/1506.04381}{1506.04381}}.\par\medskip
\bibitem[BF78]{BF78}D. Brydges, P. Federbush - {\it A new form of the Mayer expansion in classical statistical mechanics}, Journal of Mathematical Physics, volume\-~19, page\-~2064, 1978,\par\penalty10000
doi:{\tt\color{blue}\href{http://dx.doi.org/10.1063/1.523586}{10.1063/1.523586}}.\par\medskip
\bibitem[Do91]{Do91}T.C. Dorlas - {\it Renormalization group analysis of a simple hierarchical fermion model}, Communications in Mathematical Physics, volume\-~136, pages\-~169-194, 1991,\par\penalty10000
doi:{\tt\color{blue}\href{http://dx.doi.org/10.1007/BF02096796}{10.1007/BF02096796}}.\par\medskip
\bibitem[Dy69]{Dy69}F.J. Dyson - {\it Existence of a phase-transition in a one-dimensional Ising ferromagnet}, Communications in Mathematical Physics, volume\-~12, pages\-~91-107, 1969,\par\penalty10000
doi:{\tt\color{blue}\href{http://dx.doi.org/10.1007/BF01645907}{10.1007/BF01645907}}.\par\medskip
\bibitem[GJ15]{GJ15}G. Gallavotti, I. Jauslin - {\it Kondo Effect in the Hierarchical s-d Model}, Journal of Statistical Physics, volume\-~161, issue\-~5, pages\-~1231-1235, 2015,\par\penalty10000
doi:{\tt\color{blue}\href{http://dx.doi.org/10.1007/s10955-015-1370-2}{10.1007/s10955-015-1370-2}}, arxiv:{\tt\color{blue}\href{http://arxiv.org/abs/1507.05678}{1507.05678}}.\par\medskip
\bibitem[GN85]{GN85}G. Gallavotti, F. Nicol\`o - {\it Renormalization theory for four dimensional scalar fields I}, Communications in Mathematical Physics, volume\-~100, pages\-~545-590, 1985,\par\penalty10000
doi:{\tt\color{blue}\href{http://dx.doi.org/10.1007/BF01217729}{10.1007/BF01217729}}.\par\medskip
\bibitem[GK81]{GK81}K. Gawedzki, A. Kupiainen - {\it Renormalization group study of a critical lattice model I: Convergence to the line of fixed points}, Communications in Mathematical Physics, volume\-~82, issue\-~3, pages\-~407-433, 1981,\par\penalty10000
doi:{\tt\color{blue}\href{http://dx.doi.org/10.1007/BF01237048}{10.1007/BF01237048}}.\par\medskip
\bibitem[Gi10]{Gi10}A. Giuliani - {\it The Ground State Construction of the Two-dimensional Hubbard Model on the Honeycomb Lattice}, Quantum Theory from Small to Large Scales, lecture notes of the Les Houches Summer School, volume\-~95, Oxford University Press, 2010, arxiv:{\tt\color{blue}\href{http://arxiv.org/abs/1102.3881}{1102.3881}}.\par\medskip
\bibitem[GGM12]{GGM12}A. Giuliani, R.L. Greenblatt, V. Mastropietro - {\it The scaling limit of the energy correlations in non-integrable Ising models}, Journal of Mathematical Physics, volume\-~53, page\-~095214, 2012,\par\penalty10000
doi:{\tt\color{blue}\href{http://dx.doi.org/10.1063/1.4745910}{10.1063/1.4745910}}, arxiv:{\tt\color{blue}\href{http://arxiv.org/abs/1204.4040}{1204.4040}}.\par\medskip
\bibitem[GJ16]{GJ16}A. Giuliani, I. Jauslin - {\it The ground state construction of bilayer graphene}, Reviews in Mathematical Physics, volume\-~28, issue\-~8, page\-~1650018, 2016,\par\penalty10000
doi:{\tt\color{blue}\href{http://dx.doi.org/10.1142/S0129055X16500185}{10.1142/S0129055X16500185}}, arxiv:{\tt\color{blue}\href{http://arxiv.org/abs/1507.06024}{1507.06024}}.\par\medskip
\bibitem[GM10]{GM10}A. Giuliani, V. Mastropietro - {\it The two-dimensional Hubbard model on the honeycomb lattice}, Communications in Mathematical Physics, volume\-~293, pages\-~301-364, 2010,\par\penalty10000
doi:{\tt\color{blue}\href{http://dx.doi.org/10.1007/s00220-009-0910-5}{10.1007/s00220-009-0910-5}}, arxiv:{\tt\color{blue}\href{http://arxiv.org/abs/0811.1881}{0811.1881}}.\par\medskip
\bibitem[GMP12]{GMP12}A. Giuliani, V. Mastropietro, M. Porta - {\it Universality of conductivity in interacting graphene}, Communications in Mathematical Physics, volume\-~311, issue\-~2, pages\-~317-355, 2012,\par\penalty10000
doi:{\tt\color{blue}\href{http://dx.doi.org/10.1007/s00220-012-1444-9}{10.1007/s00220-012-1444-9}}, arxiv:{\tt\color{blue}\href{http://arxiv.org/abs/1101.2169}{1101.2169}}.\par\medskip
\bibitem[GMP17]{GMP17}A. Giuliani, V. Mastropietro, M. Porta - {\it Universality of the Hall Conductivity in Interacting Electron Systems}, Communications in Mathematical Physics, volume\-~349, issue\-~3, pages\-~1107-1161, 2017,\par\penalty10000
doi:{\tt\color{blue}\href{http://dx.doi.org/10.1007/s00220-016-2714-8}{10.1007/s00220-016-2714-8}}, arxiv:{\tt\color{blue}\href{http://arxiv.org/abs/1511.04047}{1511.04047}}.\par\medskip
\bibitem[Ko64]{Ko64}J. Kondo - {\it Resistance minimum in dilute magnetic alloys}, Progress of Theoretical Physics, volume\-~32, issue\-~1, 1964,\par\penalty10000
doi:{\tt\color{blue}\href{http://dx.doi.org/10.1143/PTP.32.37}{10.1143/PTP.32.37}}.\par\medskip
\bibitem[Ma11]{Ma11}V. Mastropietro - {\it Conductivity between Luttinger liquids: coupled chains and bilayer graphene}, Physical Review B, volume\-~84, page\-~035109, 2011,\par\penalty10000
doi:{\tt\color{blue}\href{http://dx.doi.org/10.1103/PhysRevB.84.035109}{10.1103/PhysRevB.84.035109}}, arxiv:{\tt\color{blue}\href{http://arxiv.org/abs/1012.5736}{1012.5736}}.\par\medskip
\bibitem[Mc57]{Mc57}J.W. McClure - {\it Band structure of graphite and de Haas-van Alphen effect}, Physical review, volume\-~108, pages\-~612-618, 1957,\par\penalty10000
doi:{\tt\color{blue}\href{http://dx.doi.org/10.1103/PhysRev.108.612}{10.1103/PhysRev.108.612}}.\par\medskip
\bibitem[NGe04]{NGe04}K.S. Novoselov, A.K. Geim, S. V.Morozov, D. Jiang, Y. Zhang, S.V. Dubonos, I.V. Grigorieva, A.A. Firsov - {\it Electric field effect in atomically thin carbon films}, Science, vol. 306, pages\-~666-669, 2004,\par\penalty10000
doi:{\tt\color{blue}\href{http://dx.doi.org/10.1126/science.1102896}{10.1126/science.1102896}}.\par\medskip
\bibitem[SW58]{SW58}J.C. Slonczewski, P.R. Weiss - {\it Band structure of graphite}, Physical Review, volume\-~109, pages\-~272-279, 1958,\par\penalty10000
doi:{\tt\color{blue}\href{http://dx.doi.org/10.1103/PhysRev.109.272}{10.1103/PhysRev.109.272}}.\par\medskip
\bibitem[Wi65]{Wi65}K.G. Wilson - {\it Model Hamiltonians for Local Quantum Field Theory}, Physical Review, volume\-~140, issue\-~2B, page B445-B457, 1965,\par\penalty10000
doi:{\tt\color{blue}\href{http://dx.doi.org/10.1103/PhysRev.140.B445}{10.1103/PhysRev.140.B445}}.\par\medskip
\bibitem[Wi75]{Wi75}K.G. Wilson - {\it The renormalization group: Critical phenomena and the Kondo problem}, Reviews of Modern Physics, volume\-~47, issue\-~4, 1975,\par\penalty10000
doi:{\tt\color{blue}\href{http://dx.doi.org/10.1103/RevModPhys.47.773}{10.1103/RevModPhys.47.773}}.\par\medskip
\bibitem[mk]{mk}{\tt meankondo} software package v1.5, I.\-~Jauslin,\par\penalty10000
{\tt\color{blue}\href{http://ian.jauslin.org/software/meankondo}{http://ian.jauslin.org/software/meankondo}}.\par\medskip

25
figs/bands.fig/Makefile Normal file
View File

@ -0,0 +1,25 @@
PROJECTNAME=$(basename $(wildcard *.gnuplot))
PDFS=$(addsuffix .pdf, $(PROJECTNAME))
all: $(PDFS)
$(PDFS):
gnuplot $(patsubst %.pdf, %.gnuplot, $@) > $(patsubst %.pdf, %.tikz.tex, $@)
pdflatex -jobname $(basename $@) -file-line-error $(patsubst %.pdf, %.tikz.tex, $@)
install: $(PDFS)
cp $^ $(INSTALLDIR)/
clean-aux:
rm -f $(addsuffix .tikz.tex, $(PROJECTNAME))
rm -f $(addsuffix .aux, $(PROJECTNAME))
rm -f $(addsuffix .log, $(PROJECTNAME))
clean-dat:
rm -f $(DATS)
clean-tex:
rm -f $(PDFS)
clean: clean-aux clean-tex

View File

@ -0,0 +1,33 @@
# default output canvas size: 12.5cm x 8.75cm
set term lua tikz size 8,6 standalone
unset key
unset xtics
unset ytics
unset ztics
unset border
unset colorbox
set pointsize 1
#set xrange [0:4*pi/3]
#set yrange [-2*pi/sqrt(3):2*pi/sqrt(3)]
set pm3d depthorder
# make this odd and divisible by 7 to get the Fermi points
set isosamples 49
# rescale x and y components to render the Fermi points better
# units of 2*pi/3
set xrange [0:2]
# units of 2*pi/(3*sqrt(3))
set yrange [-3:3]
set view 80,35
splot sqrt(1+4*cos(pi*x)*cos(pi/3*y)+4*cos(pi/3*y)**2) w pm3d, -sqrt(1+4*cos(pi*x)*cos(pi/3*y)+4*cos(pi/3*y)**2) w pm3d
#pause mouse close

23
figs/bilayer.fig/Makefile Normal file
View File

@ -0,0 +1,23 @@
PROJECTNAME=$(basename $(basename $(wildcard *.tikz.tex)))
PDFS=$(addsuffix .pdf, $(PROJECTNAME))
all: $(PDFS)
$(PDFS):
pdflatex -jobname $(basename $@) $(patsubst %.pdf, %.tikz.tex, $@)
install: $(PROJECTNAME)
cp $^.pdf $(INSTALLDIR)/
clean-aux:
rm -f $(addsuffix .aux, $(PROJECTNAME))
rm -f $(addsuffix .log, $(PROJECTNAME))
rm -f $(addsuffix .out, $(PROJECTNAME))
clean-tex:
rm -f $(PDFS) $(SYNCTEXS)
clean: clean-aux clean-tex

View File

@ -0,0 +1,40 @@
\documentclass{standalone}
\usepackage{tikz}
\usepackage{graphene}
% reflected graphene grid at #1 of width #2 and height #3
\def\graphenereflected#1#2#3{
\foreach \i in {0,...,#2}{
\foreach \j in {0,...,#3}{
\cellreflected{#1++(\i*3,-2*\j*\sqrtThOT)}
\cellreflected{#1++(\i*3+1.5,\sqrtThOT-2*\j*\sqrtThOT)}
}
}
}
\def\cellreflected#1{
\draw[dotted]#1--++(0:-1);
\draw[dotted]#1--++(120:-1);
\draw[dotted]#1--++(240:-1);
\asite{#1}
\draw[dotted]#1++(-1,0)--++(0:1);
\draw[dotted]#1++(-1,0)--++(120:1);
\draw[dotted]#1++(-1,0)--++(240:1);
\bsite{#1++(-1,0)}
}
\def\square#1#2{\draw#1++(-#2,-#2)--++(#2,0)--++(#2,0)--++(0,#2)--++(0,#2)--++(-#2,0)--++(-#2,0)--++(0,-#2)--++(0,-#2);}
\begin{document}
\begin{tikzpicture}
% first layer
\graphene{(0,0)}{3}{3}
% redefine sites for second layer
\def\bsite#1{\draw#1circle(.1);}
\def\asite#1{\square{#1}{.17}}
% second layer
\graphenereflected{(0,0)}{3}{3}
\end{tikzpicture}
\end{document}

View File

@ -0,0 +1 @@
../lib/graphene.sty

View File

@ -0,0 +1,23 @@
PROJECTNAME=$(basename $(basename $(wildcard *.tikz.tex)))
PDFS=$(addsuffix .pdf, $(PROJECTNAME))
all: $(PDFS)
$(PDFS):
pdflatex -jobname $(basename $@) $(patsubst %.pdf, %.tikz.tex, $@)
install: $(PROJECTNAME)
cp $^.pdf $(INSTALLDIR)/
clean-aux:
rm -f $(addsuffix .aux, $(PROJECTNAME))
rm -f $(addsuffix .log, $(PROJECTNAME))
rm -f $(addsuffix .out, $(PROJECTNAME))
clean-tex:
rm -f $(PDFS) $(SYNCTEXS)
clean: clean-aux clean-tex

View File

@ -0,0 +1,17 @@
\documentclass{standalone}
\usepackage{tikz}
% sqrt(3)
\def\sqrtTh{1.732}
% pi
\def\pival{3.14159}
\begin{document}
\begin{tikzpicture}
\draw(0,0)--(2*\pival/3,2*\pival/\sqrtTh)--(4*\pival/3,0)--(2*\pival/3,-2*\pival/\sqrtTh)--cycle;
\fill(2*\pival/3,2*\pival/3/\sqrtTh)circle(0.05);
\fill(2*\pival/3,-2*\pival/3/\sqrtTh)circle(0.05);
\end{tikzpicture}
\end{document}

View File

@ -0,0 +1,47 @@
\documentclass{standalone}
\usepackage{tikz}
\usepackage{xcolor}
\definecolor{gray0}{HTML}{EEEEEE}
\definecolor{gray1}{HTML}{CCCCCC}
\definecolor{gray2}{HTML}{AAAAAA}
\definecolor{gray3}{HTML}{888888}
\definecolor{gray4}{HTML}{666666}
\definecolor{gray5}{HTML}{444444}
\definecolor{gray6}{HTML}{222222}
\definecolor{gray7}{HTML}{000000}
% sqrt(3)
\def\sqrtTh{1.732}
% pi
\def\pival{3.14159}
\begin{document}
\begin{tikzpicture}
\draw(0,0)--(2*\pival/3,2*\pival/\sqrtTh)--(4*\pival/3,0)--(2*\pival/3,-2*\pival/\sqrtTh)--cycle;
\fill[color=gray0](0,0)--(2*\pival/3,2*\pival/\sqrtTh)--(4*\pival/3,0)--(2*\pival/3,-2*\pival/\sqrtTh)--cycle;
\fill[color=gray1](2*\pival/3, 2*\pival/3/\sqrtTh)circle(1);
\fill[color=gray1](2*\pival/3,-2*\pival/3/\sqrtTh)circle(1);
\fill[color=gray2](2*\pival/3, 2*\pival/3/\sqrtTh)circle(0.5);
\fill[color=gray2](2*\pival/3,-2*\pival/3/\sqrtTh)circle(0.5);
\fill[color=gray3](2*\pival/3, 2*\pival/3/\sqrtTh)circle(0.25);
\fill[color=gray3](2*\pival/3,-2*\pival/3/\sqrtTh)circle(0.25);
\fill[color=gray4](2*\pival/3, 2*\pival/3/\sqrtTh)circle(0.125);
\fill[color=gray4](2*\pival/3,-2*\pival/3/\sqrtTh)circle(0.125);
\fill[color=gray5](2*\pival/3, 2*\pival/3/\sqrtTh)circle(0.0626);
\fill[color=gray5](2*\pival/3,-2*\pival/3/\sqrtTh)circle(0.0625);
\fill[color=gray6](2*\pival/3, 2*\pival/3/\sqrtTh)circle(0.03125);
\fill[color=gray6](2*\pival/3,-2*\pival/3/\sqrtTh)circle(0.03125);
\fill[color=gray7](2*\pival/3, 2*\pival/3/\sqrtTh)circle(0.015625);
\fill[color=gray7](2*\pival/3,-2*\pival/3/\sqrtTh)circle(0.015625);
\end{tikzpicture}
\end{document}

View File

@ -0,0 +1,23 @@
PROJECTNAME=$(basename $(basename $(wildcard *.tikz.tex)))
PDFS=$(addsuffix .pdf, $(PROJECTNAME))
all: $(PDFS)
$(PDFS):
pdflatex -jobname $(basename $@) $(patsubst %.pdf, %.tikz.tex, $@)
install: $(PROJECTNAME)
cp $^.pdf $(INSTALLDIR)/
clean-aux:
rm -f $(addsuffix .aux, $(PROJECTNAME))
rm -f $(addsuffix .log, $(PROJECTNAME))
rm -f $(addsuffix .out, $(PROJECTNAME))
clean-tex:
rm -f $(PDFS) $(SYNCTEXS)
clean: clean-aux clean-tex

View File

@ -0,0 +1,28 @@
\documentclass{standalone}
\usepackage{tikz}
\usepackage{graphene}
% rescale cells by
\def\rr{4}
\begin{document}
\begin{tikzpicture}
%\graphene{(0,0)}{12}{12}
\graphene{(-3,3*\sqrtTh)}{17}{16}
\foreach \i in {0,...,3}{
\draw[line width=1pt, color=blue](-1*\rr,-\i*\sqrtTh*\rr)--++(1.5*2*\i*\rr+3*\rr,\sqrtThOT*2*\i*\rr+\sqrtTh*\rr);
}
\foreach \i in {0,...,3}{
\draw[line width=1pt, color=blue](0.5*\rr+3*\i*\rr,-3.5*\sqrtTh*\rr)--++(-1.5*2*\i*\rr+12*\rr,-\sqrtThOT*2*\i*\rr+4*\sqrtTh*\rr);
}
\foreach \i in {0,...,3}{
\draw[line width=1pt, color=blue](-1*\rr,-\i*\sqrtTh*\rr)--++(-1.5*2*\i*\rr+10.5*\rr,+\sqrtThOT*2*\i*\rr-3.5*\sqrtTh*\rr);
}
\foreach \i in {0,...,3}{
\draw[line width=1pt, color=blue](-1*\rr+3*\i*\rr,\sqrtTh*\rr)--++(-1.5*2*\i*\rr+13.5*\rr,\sqrtThOT*2*\i*\rr-4.5*\sqrtTh*\rr);
}
\end{tikzpicture}
\end{document}

View File

@ -0,0 +1 @@
../lib/graphene.sty

23
figs/cell.fig/Makefile Normal file
View File

@ -0,0 +1,23 @@
PROJECTNAME=$(basename $(basename $(wildcard *.tikz.tex)))
PDFS=$(addsuffix .pdf, $(PROJECTNAME))
all: $(PDFS)
$(PDFS):
pdflatex -jobname $(basename $@) $(patsubst %.pdf, %.tikz.tex, $@)
install: $(PROJECTNAME)
cp $^.pdf $(INSTALLDIR)/
clean-aux:
rm -f $(addsuffix .aux, $(PROJECTNAME))
rm -f $(addsuffix .log, $(PROJECTNAME))
rm -f $(addsuffix .out, $(PROJECTNAME))
clean-tex:
rm -f $(PDFS) $(SYNCTEXS)
clean: clean-aux clean-tex

View File

@ -0,0 +1,30 @@
\documentclass{standalone}
\usepackage{tikz}
\usepackage{graphene}
\begin{document}
\begin{tikzpicture}
\graphene{(0,0)}{3}{3}
\foreach \i in {0,...,3}{
\draw[color=blue](-1,-\i*\sqrtTh)--++(1.5*2*\i+3,\sqrtThOT*2*\i+\sqrtTh);
}
\foreach \i in {0,...,3}{
\draw[color=blue](0.5+3*\i,-3.5*\sqrtTh)--++(-1.5*2*\i+12,-\sqrtThOT*2*\i+4*\sqrtTh);
}
\foreach \i in {0,...,3}{
\draw[color=blue](-1,-\i*\sqrtTh)--++(-1.5*2*\i+10.5,+\sqrtThOT*2*\i-3.5*\sqrtTh);
}
\foreach \i in {0,...,3}{
\draw[color=blue](-1+3*\i,\sqrtTh)--++(-1.5*2*\i+13.5,\sqrtThOT*2*\i-4.5*\sqrtTh);
}
\draw[color=red] (6,-\sqrtTh)++(0.5,.6)node[rotate=30]{$l_1$};
\draw[color=red](6,-\sqrtTh)++(0.5,-.6)node[rotate=-30]{$l_2$};
\pgfsetarrowsend{latex};
\draw[color=red,line width=1.5pt](6,-\sqrtTh)--++\Lo;
\draw[color=red,line width=1.5pt](6,-\sqrtTh)--++\Lt;
\end{tikzpicture}
\end{document}

1
figs/cell.fig/graphene.sty Symbolic link
View File

@ -0,0 +1 @@
../lib/graphene.sty

View File

@ -0,0 +1,23 @@
PROJECTNAME=$(basename $(basename $(wildcard *.tikz.tex)))
PDFS=$(addsuffix .pdf, $(PROJECTNAME))
all: $(PDFS)
$(PDFS):
pdflatex -jobname $(basename $@) $(patsubst %.pdf, %.tikz.tex, $@)
install: $(PROJECTNAME)
cp $^.pdf $(INSTALLDIR)/
clean-aux:
rm -f $(addsuffix .aux, $(PROJECTNAME))
rm -f $(addsuffix .log, $(PROJECTNAME))
rm -f $(addsuffix .out, $(PROJECTNAME))
clean-tex:
rm -f $(PDFS) $(SYNCTEXS)
clean: clean-aux clean-tex

View File

@ -0,0 +1 @@
../lib/graphene.sty

View File

@ -0,0 +1,12 @@
\documentclass{standalone}
\usepackage{tikz}
\usepackage{graphene}
\def\bsite#1{\fill#1circle(.1);}
\begin{document}
\begin{tikzpicture}
\graphene{(0,0)}{3}{3}
\end{tikzpicture}
\end{document}

View File

@ -0,0 +1,32 @@
PROJECTNAME=graphene_vector_field
DATS=graphene_vector_field.dat
PDFS=$(addsuffix .pdf, $(PROJECTNAME))
TEXS=$(addsuffix .tikz.tex, $(PROJECTNAME))
all: $(PDFS)
$(PDFS): $(DATS)
gnuplot $(patsubst %.pdf, %.gnuplot, $@) > $(patsubst %.pdf, %.tikz.tex, $@)
pdflatex -jobname $(basename $@) -file-line-error $(patsubst %.pdf, %.tikz.tex, $@)
graphene_vector_field.dat:
meankondo -C graphene.mk > graphene-numkondo.mk
./gendat > $@
install: $(PDFS)
cp $^ $(INSTALLDIR)/
clean-aux:
rm -f $(addsuffix .tikz.tex, $(PROJECTNAME))
rm -f $(addsuffix .aux, $(PROJECTNAME))
rm -f $(addsuffix .log, $(PROJECTNAME))
clean-dat:
rm -f $(DATS)
rm -f graphene-numkondo.mk
clean-tex:
rm -f $(PDFS)
clean: clean-aux clean-tex

View File

@ -0,0 +1,30 @@
#!/bin/bash
# location of numkondo config
config=$(dirname $0)/graphene-numkondo.mk
# range and number of points in each direction
minx=-2
maxx=2
nx=20
miny=-1
maxy=1
ny=20
# compute each point
for i in $(seq $nx); do
# alpha_0
alpha0=$(python -c "print($minx+($maxx-($minx))/($nx-1)*($i-1))")
for j in $(seq $ny); do
# alpha_1
alpha1=$(python -c "print($miny+($maxy-($miny))/($ny-1)*($j-1))")
# print alphas
echo -n "$alpha0 $alpha1 "
# compute step and select the relevant lines
dat=$(numkondo -N 1 -F -I "0:$alpha0,1:$alpha1" "$config" | sed -r '/^[^01]/d;s/^[0-9]*://;s/,//' | tr '\n' ' ')
echo "$dat"
done
done

View File

@ -0,0 +1,148 @@
## This computes the logarithm of the flow equation
#!fields
# extrenal fields: xy0 where x=alpha, y=sigma
x:110,120,210,220
# internal fields: xy1 where x=alpha, y=sigma
i:111,121,211,221
# all are Fermions
f:110,120,210,220,111,121,211,221
&
#!groups
# different spins are independent
(111,211) (121,221)
&
#!preprocessor_variables
# psi's with internal fields
psiAU=(1/2)[f110]+[f111],
psiAD=(1/2)[f120]+[f121],
psiBU=(1/2)[f210]+[f211],
psiBD=(1/2)[f220]+[f221],
psiAU-=(1/2)[f-110]+[f-111],
psiAD-=(1/2)[f-120]+[f-121],
psiBU-=(1/2)[f-210]+[f-211],
psiBD-=(1/2)[f-220]+[f-221],
# operators with internal fields
O0=
<<$psiAU>*<$psiBU->>+
<<$psiBU>*<$psiAU->>+
<<$psiAD>*<$psiBD->>+
<<$psiBD>*<$psiAD->>,
O1=
<<$psiAU>*<$psiAU->*<$psiAD>*<$psiAD->>+
<<$psiBU>*<$psiBU->*<$psiBD>*<$psiBD->>,
O2=
<<$psiAU>*<$psiAD->*<$psiBD>*<$psiBU->>+
<<$psiBU>*<$psiBD->*<$psiAD>*<$psiAU->>+
<<$psiAD>*<$psiAU->*<$psiBU>*<$psiBD->>+
<<$psiBD>*<$psiBU->*<$psiAU>*<$psiAD->>,
O3=
<<$psiAU>*<$psiAU->*<$psiBU>*<$psiBU->>+
<<$psiAD>*<$psiAD->*<$psiBD>*<$psiBD->>,
O4=
<<$psiAU>*<$psiBU->*<$psiAD>*<$psiBD->>+
<<$psiBU>*<$psiAU->*<$psiBD>*<$psiAD->>,
O5=
<<$psiAU>*<$psiAU->*<$psiAD>*<$psiBU->*<$psiBU>*<$psiBD->>+
<<$psiAD>*<$psiAD->*<$psiAU>*<$psiBD->*<$psiBD>*<$psiBU->>+
<<$psiBU>*<$psiBU->*<$psiBD>*<$psiAU->*<$psiAU>*<$psiAD->>+
<<$psiBD>*<$psiBD->*<$psiBU>*<$psiAD->*<$psiAD>*<$psiAU->>,
O6=<<$psiAU>*<$psiAU->*<$psiAD>*<$psiAD->*<$psiBU>*<$psiBU->*<$psiBD>*<$psiBD->>,
# psi's without internal fields
phiAU=[f110],
phiAD=[f120],
phiBU=[f210],
phiBD=[f220],
phiAU-=[f-110],
phiAD-=[f-120],
phiBU-=[f-210],
phiBD-=[f-220],
# operators without internal fields
E0=
<<$phiAU>*<$phiBU->>+
<<$phiBU>*<$phiAU->>+
<<$phiAD>*<$phiBD->>+
<<$phiBD>*<$phiAD->>,
E1=
<<$phiAU>*<$phiAU->*<$phiAD>*<$phiAD->>+
<<$phiBU>*<$phiBU->*<$phiBD>*<$phiBD->>,
E2=
<<$phiAU>*<$phiAD->*<$phiBD>*<$phiBU->>+
<<$phiBU>*<$phiBD->*<$phiAD>*<$phiAU->>+
<<$phiAD>*<$phiAU->*<$phiBU>*<$phiBD->>+
<<$phiBD>*<$phiBU->*<$phiAU>*<$phiAD->>,
E3=
<<$phiAU>*<$phiAU->*<$phiBU>*<$phiBU->>+
<<$phiAD>*<$phiAD->*<$phiBD>*<$phiBD->>,
E4=
<<$phiAU>*<$phiBU->*<$phiAD>*<$phiBD->>+
<<$phiBU>*<$phiAU->*<$phiBD>*<$phiAD->>,
E5=
<<$phiAU>*<$phiAU->*<$phiAD>*<$phiBU->*<$phiBU>*<$phiBD->>+
<<$phiAD>*<$phiAD->*<$phiAU>*<$phiBD->*<$phiBD>*<$phiBU->>+
<<$phiBU>*<$phiBU->*<$phiBD>*<$phiAU->*<$phiAU>*<$phiAD->>+
<<$phiBD>*<$phiBD->*<$phiBU>*<$phiAD->*<$phiAD>*<$phiAU->>,
E6=<<$phiAU>*<$phiAU->*<$phiAD>*<$phiAD->*<$phiBU>*<$phiBU->*<$phiBD>*<$phiBD->>
&
#!propagator
111;211: 1 ,121;221: 1 ,
211;111: 1 ,221;121: 1
&
#!input_polynomial
<%exp<
<<[l0]>*<$O0>>+
<<[l1]>*<$O1>>+
<<[l2]>*<$O2>>+
<<[l3]>*<$O3>>+
<<[l4]>*<$O4>>+
<<[l5]>*<$O5>>+
<<[l6]>*<$O6>>
>>
&
#!postprocess_flow_equation
<<8>*<%log_1<$FLOW>>>
&
#!id_table
0: <$E0>,
1: <$E1>,
2: <$E2>,
3: <$E3>,
4: <$E4>,
5: <$E5>,
6: <$E6>
&
#!labels
0:"O0" ,
1:"O1" ,
2:"O2" ,
3:"O3" ,
4:"O4" ,
5:"O5" ,
6:"O6"

View File

@ -0,0 +1,25 @@
set ylabel "$\\alpha_1$" norotate
set xlabel "$\\alpha_0$"
# default output canvas size: 12.5cm x 8.75cm
set term lua tikz size 8,6 standalone
unset key
set pointsize 1
# color functions
rgb(r,g,b) = 65536 * int(r) + 256 * int(g) + int(b)
color(x) = rgb(x*255, 0 , (1-x)*255)
# get min/max
set yrange [-1000:1000]
stats "graphene_vector_field.dat" u (log10(sqrt(($3-$1)**2+($4-$2)**2)))
set xrange [-2:2]
set yrange [-1:1]
rescale=15
plot "graphene_vector_field.dat" u 1:2:(($3-$1)/sqrt(($3-$1)**2+($4-$2)**2)/rescale):(($4-$2)/sqrt(($3-$1)**2+($4-$2)**2)/rescale):(color((log10(sqrt(($3-$1)**2+($4-$2)**2))-STATS_min)/(STATS_max-STATS_min))) with vec filled head linecolor rgb variable

View File

@ -0,0 +1,32 @@
PROJECTNAME=sd_vector_field
DATS=sd_vector_field.dat
PDFS=$(addsuffix .pdf, $(PROJECTNAME))
TEXS=$(addsuffix .tikz.tex, $(PROJECTNAME))
all: $(PDFS)
$(PDFS): $(DATS)
gnuplot $(patsubst %.pdf, %.gnuplot, $@) > $(patsubst %.pdf, %.tikz.tex, $@)
pdflatex -jobname $(basename $@) -file-line-error $(patsubst %.pdf, %.tikz.tex, $@)
sd_vector_field.dat:
meankondo -C sd.mk > sd-numkondo.mk
./gendat > $@
install: $(PDFS)
cp $^ $(INSTALLDIR)/
clean-aux:
rm -f $(addsuffix .tikz.tex, $(PROJECTNAME))
rm -f $(addsuffix .aux, $(PROJECTNAME))
rm -f $(addsuffix .log, $(PROJECTNAME))
clean-dat:
rm -f $(DATS)
rm -f sd-numkondo.mk
clean-tex:
rm -f $(PDFS)
clean: clean-aux clean-tex

30
figs/hierarchical_sd.fig/gendat Executable file
View File

@ -0,0 +1,30 @@
#!/bin/bash
# location of numkondo config
config=$(dirname $0)/sd-numkondo.mk
# range and number of points in each direction
minx=-1
maxx=0.5
nx=20
miny=-0.4
maxy=0.4
ny=20
# compute each point
for i in $(seq $nx); do
# alpha_0
alpha0=$(python -c "print($minx+($maxx-($minx))/($nx-1)*($i-1))")
for j in $(seq $ny); do
# alpha_1
alpha1=$(python -c "print($miny+($maxy-($miny))/($ny-1)*($j-1))")
# print alphas
echo -n "$alpha0 $alpha1 "
# compute step and select the relevant lines
dat=$(numkondo -N 1 -F -I "0:$alpha0,1:$alpha1" "$config" | sed -r '/^[^01]/d;s/^[0-9]*://;s/,//' | tr '\n' ' ')
echo "$dat"
done
done

View File

@ -0,0 +1,81 @@
#!fields
x:100,110
i:101,102,111,112
h:400,410,420
f:100,110,101,102,111,112
a:400,410,420
&
#!preprocessor_variables
psiAu1=[f100]+[f101],
psiAu2=[f100]+[f102],
psiAd1=[f110]+[f111],
psiAd2=[f110]+[f112],
psiAu1-=[f-100]+[f-101],
psiAu2-=[f-100]+[f-102],
psiAd1-=[f-110]+[f-111],
psiAd2-=[f-110]+[f-112],
A11=<<$psiAu1>*<$psiAd1->>+<<$psiAd1>*<$psiAu1->>,
A12=<<$psiAu2>*<$psiAd2->>+<<$psiAd2>*<$psiAu2->>,
A21=<<(-1)s{-1}>*<$psiAu1>*<$psiAd1->>+<<s{-1}>*<$psiAd1>*<$psiAu1->>,
A22=<<(-1)s{-1}>*<$psiAu2>*<$psiAd2->>+<<s{-1}>*<$psiAd2>*<$psiAu2->>,
A31=<<$psiAu1>*<$psiAu1->>+<<-1>*<$psiAd1>*<$psiAd1->>,
A32=<<$psiAu2>*<$psiAu2->>+<<-1>*<$psiAd2>*<$psiAd2->>,
AB1=<<$A11>*<[f400]>>+<<$A21>*<[f410]>>+<<$A31>*<[f420]>>,
AA1=<<$A11>*<$A11>>+<<$A21>*<$A21>>+<<$A31>*<$A31>>,
AB2=<<$A12>*<[f400]>>+<<$A22>*<[f410]>>+<<$A32>*<[f420]>>,
AA2=<<$A12>*<$A12>>+<<$A22>*<$A22>>+<<$A32>*<$A32>>,
A1=[f100][f-110] + [f110][f-100],
A2=((-1)s{-1})[f100][f-110] + (s{-1})[f110][f-100],
A3=[f100][f-100] + (-1)[f110][f-110],
AB=<<$A1>*<[f400]>>+<<$A2>*<[f410]>>+<<$A3>*<[f420]>>,
AA=<<$A1>*<$A1>>+<<$A2>*<$A2>>+<<$A3>*<$A3>>
&
#!identities
[f400][f400]=(1),
[f400][f410]=(s{-1})[f420],
[f420][f410]=((-1)s{-1})[f400],
[f410][f410]=(1),
[f410][f420]=(s{-1})[f400],
[f400][f420]=((-1)s{-1})[f410],
[f420][f420]=(1),
[f420][f400]=(s{-1})[f410],
[f410][f400]=((-1)s{-1})[f420]
&
#!propagator
101;102: 1 ,111;112: 1 ,
102;101: -1 ,112;111: -1
&
#!input_polynomial
<
<1>
+ <<(1/2)[l0]>*<$AB1>>
+ <<(1/2)[l1]>*<$AA1>>
>*<
<1>
+ <<(1/2)[l0]>*<$AB2>>
+ <<(1/2)[l1]>*<$AA2>>
>
&
#!id_table
0: <$AB>,
1: <2>*<$AA>
&
#!labels
0:"at" ,
1:"aa" ,

View File

@ -0,0 +1,25 @@
set ylabel "$\\ell_1$" norotate
set xlabel "$\\ell_0$"
# default output canvas size: 12.5cm x 8.75cm
set term lua tikz size 8,6 standalone
unset key
set pointsize 1
# color functions
rgb(r,g,b) = 65536 * int(r) + 256 * int(g) + int(b)
color(x) = rgb(x*255, 0 , (1-x)*255)
# get min/max
set yrange [-1000:1000]
stats "sd_vector_field.dat" u (log10(sqrt(($3-$1)**2+($4-$2)**2)))
set xrange [-1:0.5]
set yrange [-0.4:0.4]
rescale=40
plot "sd_vector_field.dat" u 1:2:(($3-$1)/sqrt(($3-$1)**2+($4-$2)**2)/rescale):(($4-$2)/sqrt(($3-$1)**2+($4-$2)**2)/rescale):(color((log10(sqrt(($3-$1)**2+($4-$2)**2))-STATS_min)/(STATS_max-STATS_min))) with vec filled head linecolor rgb variable

48
figs/lib/graphene.sty Normal file
View File

@ -0,0 +1,48 @@
% sqrt(3)/2
\def\sqrtThOT{0.866}
% sqrt(3)
\def\sqrtTh{1.732}
% pi
\def\pival{3.14159}
% base vectorsj
\def\Lo{(1.5,\sqrtThOT)}
\def\Lt{(1.5,-\sqrtThOT)}
\def\mLo{(-1.5,-\sqrtThOT)}
\def\mLt{(-1.5,\sqrtThOT)}
% filled square at #1 of side-length #2
\def\fullsquare#1#2{\fill#1++(-#2,-#2)--++(#2,0)--++(#2,0)--++(0,#2)--++(0,#2)--++(-#2,0)--++(-#2,0)--++(0,-#2)--++(0,-#2);}
% in color
\def\fullsquarecolor#1#2#3{\fill[color=#3]#1++(-#2,-#2)--++(#2,0)--++(#2,0)--++(0,#2)--++(0,#2)--++(-#2,0)--++(-#2,0)--++(0,-#2)--++(0,-#2);}
% type-a site at #1
\def\asite#1{\fill#1circle(.1);}
% in color
\def\asitec#1#2{\fill[color=#2]#1circle(.1);}
% type-b site at #1
\def\bsite#1{\fullsquare{#1}{.1}}
% in color
\def\bsitec#1#2{\fullsquarecolor{#1}{.1}{#2}}
% base cell with a site at #1
\def\cell#1{
\draw#1--++(0:1);
\draw#1--++(120:1);
\draw#1--++(240:1);
\asite{#1}
\draw#1++(1,0)--++(0:-1);
\draw#1++(1,0)--++(120:-1);
\draw#1++(1,0)--++(240:-1);
\bsite{#1++(1,0)}
}
% grpahene grid at #1 of width #2 and height #3
\def\graphene#1#2#3{
\foreach \i in {0,...,#2}{
\foreach \j in {0,...,#3}{
\cell{#1++(\i*3,-2*\j*\sqrtThOT)}
\cell{#1++(\i*3+1.5,\sqrtThOT-2*\j*\sqrtThOT)}
}
}
}

667
libs/ian.cls Normal file
View File

@ -0,0 +1,667 @@
%%
%% Ian's class file
%%
%% TeX format
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
%% class name
\ProvidesClass{ian}[2017/09/29]
%% boolean to signal that this class is being used
\newif\ifianclass
\ianclasstrue
%% options
% no section numbering in equations
\DeclareOption{section_in_eq}{\sectionsineqtrue}
\DeclareOption{section_in_fig}{\sectionsinfigtrue}
\DeclareOption{section_in_all}{\sectionsineqtrue\sectionsinfigtrue}
\DeclareOption{subsection_in_eq}{\subsectionsineqtrue}
\DeclareOption{subsection_in_fig}{\subsectionsinfigtrue}
\DeclareOption{subsection_in_all}{\subsectionsineqtrue\subsectionsinfigtrue}
\DeclareOption{no_section_in_eq}{\sectionsineqfalse}
\DeclareOption{no_section_in_fig}{\sectionsinfigfalse}
\DeclareOption{no_section_in_all}{\sectionsineqfalse\sectionsinfigfalse}
\DeclareOption{no_subsection_in_eq}{\subsectionsineqfalse}
\DeclareOption{no_subsection_in_fig}{\subsectionsinfigfalse}
\DeclareOption{no_subsection_in_all}{\subsectionsineqfalse\subsectionsinfigfalse}
\def\ian@defaultoptions{
\ExecuteOptions{section_in_all, no_subsection_in_all}
\ProcessOptions
%% required packages
\RequirePackage{color}
\RequirePackage{marginnote}
\RequirePackage{amssymb}
\PassOptionsToPackage{hidelinks}{hyperref}
\RequirePackage{hyperref}
\pagestyle{plain}
}
%% paper dimensions
\setlength\paperheight{297mm}
\setlength\paperwidth{210mm}
%% fonts
\input{size11.clo}
\DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm}
\DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf}
\DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt}
\DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf}
\DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit}
%% text dimensions
\hoffset=-50pt
\voffset=-72pt
\textwidth=460pt
\textheight=704pt
%% remove default indentation
\parindent=0pt
%% indent command
\def\indent{\hskip20pt}
%% something is wrong with \thepage, redefine it
\gdef\thepage{\the\c@page}
%% array lines (to use the array environment)
\setlength\arraycolsep{5\p@}
\setlength\arrayrulewidth{.4\p@}
%% correct vertical alignment at the end of a document
\AtEndDocument{
\vfill
\eject
}
%% hyperlinks
% hyperlinkcounter
\newcounter{lncount}
% hyperref anchor
\def\hrefanchor{%
\stepcounter{lncount}%
\hypertarget{ln.\thelncount}{}%
}
%% define a command and write it to aux file
\def\outdef#1#2{%
% define command%
\expandafter\xdef\csname #1\endcsname{#2}%
% hyperlink number%
\expandafter\xdef\csname #1@hl\endcsname{\thelncount}%
% write command to aux%
\immediate\write\@auxout{\noexpand\expandafter\noexpand\gdef\noexpand\csname #1\endcsname{\csname #1\endcsname}}%
\immediate\write\@auxout{\noexpand\expandafter\noexpand\gdef\noexpand\csname #1@hl\endcsname{\thelncount}}%
}
%% can call commands even when they are not defined
\def\safe#1{%
\ifdefined#1%
#1%
\else%
{\color{red}\bf?}%
\fi%
}
%% define a label for the latest tag
%% label defines a command containing the string stored in \tag
\def\deflabel{
\def\label##1{\expandafter\outdef{label@##1}{\safe\tag}}
\def\ref##1{%
% check whether the label is defined (hyperlink runs into errors if this check is omitted)
\ifcsname label@##1@hl\endcsname%
\hyperlink{ln.\csname label@##1@hl\endcsname}{{\color{blue}\safe\csname label@##1\endcsname}}%
\else%
\ifcsname label@##1\endcsname%
{\color{blue}\csname ##1\endcsname}%
\else%
{\bf ??}%
\fi%
\fi%
}
}
%% make a custom link at any given location in the document
\def\makelink#1#2{%
\hrefanchor%
\outdef{label@#1}{#2}%
}
%% section command
% counter
\newcounter{sectioncount}
% space before section
\newlength\secskip
\setlength\secskip{40pt}
% a prefix to put before the section number, e.g. A for appendices
\def\sectionprefix{}
% define some lengths
\newlength\secnumwidth
\newlength\sectitlewidth
\def\section#1{
% reset counters
\stepcounter{sectioncount}
\setcounter{subsectioncount}{0}
\ifsectionsineq
\setcounter{seqcount}0
\fi
\ifsectionsinfig
\setcounter{figcount}0
\fi
% space before section (if not first)
\ifnum\thesectioncount>1
\vskip\secskip
\penalty-1000
\fi
% hyperref anchor
\hrefanchor
% define tag (for \label)
\xdef\tag{\sectionprefix\thesectioncount}
% get widths
\def\@secnum{{\bf\Large\sectionprefix\thesectioncount.\hskip10pt}}
\settowidth\secnumwidth{\@secnum}
\setlength\sectitlewidth\textwidth
\addtolength\sectitlewidth{-\secnumwidth}
% print name
\parbox{\textwidth}{
\@secnum
\parbox[t]{\sectitlewidth}{\Large\bf #1}}
% write to table of contents
\iftoc
% save lncount in aux variable which is written to toc
\immediate\write\tocoutput{\noexpand\expandafter\noexpand\edef\noexpand\csname toc@sec.\thesectioncount\endcsname{\thelncount}}
\write\tocoutput{\noexpand\tocsection{#1}{\thepage}}
\fi
%space
\par\penalty10000
\bigskip\penalty10000
}
%% subsection
% counter
\newcounter{subsectioncount}
% space before subsection
\newlength\subsecskip
\setlength\subsecskip{30pt}
\def\subsection#1{
% counters
\stepcounter{subsectioncount}
\setcounter{subsubsectioncount}{0}
\ifsubsectionsineq
\setcounter{seqcount}0
\fi
\ifsubsectionsinfig
\setcounter{figcount}0
\fi
% space before subsection (if not first)
\ifnum\thesubsectioncount>1
\vskip\subsecskip
\penalty-500
\fi
% hyperref anchor
\hrefanchor
% define tag (for \label)
\xdef\tag{\sectionprefix\thesectioncount.\thesubsectioncount}
% get widths
\def\@secnum{{\bf\large\hskip.5cm\sectionprefix\thesectioncount.\thesubsectioncount.\hskip5pt}}
\settowidth\secnumwidth{\@secnum}
\setlength\sectitlewidth\textwidth
\addtolength\sectitlewidth{-\secnumwidth}
% print name
\parbox{\textwidth}{
\@secnum
\parbox[t]{\sectitlewidth}{\large\bf #1}}
% write to table of contents
\iftoc
% save lncount in aux variable which is written to toc
\immediate\write\tocoutput{\noexpand\expandafter\noexpand\edef\noexpand\csname toc@subsec.\thesectioncount.\thesubsectioncount\endcsname{\thelncount}}
\write\tocoutput{\noexpand\tocsubsection{#1}{\thepage}}
\fi
% space
\par\penalty10000
\medskip\penalty10000
}
%% subsubsection
% counter
\newcounter{subsubsectioncount}
% space before subsubsection
\newlength\subsubsecskip
\setlength\subsubsecskip{20pt}
\def\subsubsection#1{
% counters
\stepcounter{subsubsectioncount}
% space before subsubsection (if not first)
\ifnum\thesubsubsectioncount>1
\vskip\subsubsecskip
\penalty-500
\fi
% hyperref anchor
\hrefanchor
% define tag (for \label)
\xdef\tag{\sectionprefix\thesectioncount.\thesubsectioncount.\thesubsubsectioncount}
% get widths
\def\@secnum{{\bf\hskip1.cm\sectionprefix\thesectioncount.\thesubsectioncount.\thesubsubsectioncount.\hskip5pt}}
\settowidth\secnumwidth{\@secnum}
\setlength\sectitlewidth\textwidth
\addtolength\sectitlewidth{-\secnumwidth}
% print name
\parbox{\textwidth}{
\@secnum
\parbox[t]{\sectitlewidth}{\large\bf #1}}
% write to table of contents
\iftoc
% save lncount in aux variable which is written to toc
\immediate\write\tocoutput{\noexpand\expandafter\noexpand\edef\noexpand\csname toc@subsubsec.\thesectioncount.\thesubsectioncount.\thesubsubsectioncount\endcsname{\thelncount}}
\write\tocoutput{\noexpand\tocsubsubsection{#1}{\thepage}}
\fi
% space
\par\penalty10000
\medskip\penalty10000
}
%% itemize
\newlength\itemizeskip
% left margin for items
\setlength\itemizeskip{20pt}
\newlength\itemizeseparator
% space between the item symbol and the text
\setlength\itemizeseparator{5pt}
% penalty preceding an itemize
\newcount\itemizepenalty
\itemizepenalty=0
% counter counting the itemize level
\newcounter{itemizecount}
% item symbol
\def\itemizept#1{
\ifnum#1=1
\textbullet
\else
$\scriptstyle\blacktriangleright$
\fi
}
\newlength\current@itemizeskip
\setlength\current@itemizeskip{0pt}
\def\itemize{%
\par\expandafter\penalty\the\itemizepenalty\medskip\expandafter\penalty\the\itemizepenalty%
\addtocounter{itemizecount}{1}%
\addtolength\current@itemizeskip{\itemizeskip}%
\leftskip\current@itemizeskip%
}
\def\enditemize{%
\addtocounter{itemizecount}{-1}%
\addtolength\current@itemizeskip{-\itemizeskip}%
\par\expandafter\penalty\the\itemizepenalty\leftskip\current@itemizeskip%
\medskip\expandafter\penalty\the\itemizepenalty%
}
% item, with optional argument to specify the item point
% @itemarg is set to true when there is an optional argument
\newif\if@itemarg
\def\item{%
% check whether there is an optional argument (if there is none, add on empty '[]')
\@ifnextchar [{\@itemargtrue\@itemx}{\@itemargfalse\@itemx[]}%
}
\newlength\itempt@total
\def\@itemx[#1]{
\if@itemarg
\settowidth\itempt@total{#1}
\else
\settowidth\itempt@total{\itemizept\theitemizecount}
\fi
\addtolength\itempt@total{\itemizeseparator}
\par
\medskip
\if@itemarg
\hskip-\itempt@total#1\hskip\itemizeseparator
\else
\hskip-\itempt@total\itemizept\theitemizecount\hskip\itemizeseparator
\fi
}
%% prevent page breaks after itemize
\newcount\previtemizepenalty
\def\nopagebreakafteritemize{
\previtemizepenalty=\itemizepenalty
\itemizepenalty=10000
}
%% back to previous value
\def\restorepagebreakafteritemize{
\itemizepenalty=\previtemizepenalty
}
%% enumerate
\newcounter{enumerate@count}
\def\enumerate{
\setcounter{enumerate@count}0
\let\olditem\item
\let\olditemizept\itemizept
\def\item{
% counter
\stepcounter{enumerate@count}
% set header
\def\itemizept{\theenumerate@count.}
% hyperref anchor
\hrefanchor
% define tag (for \label)
\xdef\tag{\theenumerate@count}
\olditem
}
\itemize
}
\def\endenumerate{
\enditemize
\let\item\olditem
\let\itemizept\olditemizept
}
%% equation numbering
% counter
\newcounter{seqcount}
% define possible prefix to equation
\def\eqprefix{}
% booleans (write section or subsection in equation number)
\newif\ifsectionsineq
\newif\ifsubsectionsineq
\def\seqcount{
\stepcounter{seqcount}
% the output
\edef\seqformat{\eqprefix\theseqcount}
% add subsection number
\ifsubsectionsineq
\let\tmp\seqformat
\edef\seqformat{\thesubsectioncount.\tmp}
\fi
% add section number
\ifsectionsineq
\let\tmp\seqformat
\edef\seqformat{\sectionprefix\thesectioncount.\tmp}
\fi
% define tag (for \label)
\xdef\tag{\seqformat}
% write number
\marginnote{\hfill(\seqformat)}
}
%% equation environment compatibility
\def\equation{\hrefanchor$$\seqcount}
\def\endequation{$$\@ignoretrue}
%% figures
% counter
\newcounter{figcount}
% booleans (write section or subsection in equation number)
\newif\ifsectionsinfig
\newif\ifsubsectionsinfig
% width of figures
\newlength\figwidth
\setlength\figwidth\textwidth
\addtolength\figwidth{-2.5cm}
% caption
\def\defcaption{
\long\def\caption##1{
\stepcounter{figcount}
% hyperref anchor
\hrefanchor
% the number of the figure
\edef\figformat{\thefigcount}
% add subsection number
\ifsubsectionsinfig
\let\tmp\figformat
\edef\figformat{\thesubsectioncount.\tmp}
\fi
% add section number
\ifsectionsinfig
\let\tmp\figformat
\edef\figformat{\sectionprefix\thesectioncount.\tmp}
\fi
% define tag (for \label)
\xdef\tag{\figformat}
% write
\hfil fig \figformat: \parbox[t]{\figwidth}{\leavevmode\small##1}
% space
\par\bigskip
}
}
%% short caption: centered
\def\captionshort#1{
\stepcounter{figcount}
% hyperref anchor
\hrefanchor
% the number of the figure
\edef\figformat{\thefigcount}
% add section number
\ifsectionsinfig
\let\tmp\figformat
\edef\figformat{\sectionprefix\thesectioncount.\tmp}
\fi
% define tag (for \label)
\xdef\tag{\figformat}
% write
\hfil fig \figformat: {\small#1}
%space
\par\bigskip
}
%% environment
\def\figure{
\par
\vfil\penalty100\vfilneg
\bigskip
}
\def\endfigure{
\par
\bigskip
}
%% start appendices
\def\appendix{
\vfill
\pagebreak
% counter
\setcounter{sectioncount}0
% prefix
\def\sectionprefix{A}
% write
{\bf \LARGE Appendices}\par\penalty10000\bigskip\penalty10000
% add a mention in the table of contents
\iftoc
\immediate\write\tocoutput{\noexpand\tocappendices}\penalty10000
\fi
%% uncomment for new page for each appendix
%\def\seqskip{\vfill\pagebreak}
}
%% bibliography
% size of header
\newlength\bibheader
\def\thebibliography#1{
\hrefanchor
% add a mention in the table of contents
\iftoc
% save lncount in aux variable which is written to toc
\immediate\write\tocoutput{\noexpand\expandafter\noexpand\edef\noexpand\csname toc@references\endcsname{\thelncount}}
\write\tocoutput{\noexpand\tocreferences{\thepage}}\penalty10000
\fi
% write
{\bf \LARGE References}\par\penalty10000\bigskip\penalty10000
% width of header
\settowidth\bibheader{[#1]}
\leftskip\bibheader
}
% end environment
\def\endthebibliography{
\par\leftskip0pt
}
%% bibitem command
\def\bibitem[#1]#2{%
\hrefanchor%
\outdef{label@cite#2}{#1}%
\hskip-\bibheader%
\makebox[\bibheader]{\cite{#2}\hfill}%
}
%% cite command
% @tempswa is set to true when there is an optional argument
\newif\@tempswa
\def\cite{%
% check whether there is an optional argument (if there is none, add on empty '[]')
\@ifnextchar [{\@tempswatrue\@citex}{\@tempswafalse\@citex[]}%
}
% command with optional argument
\def\@citex[#1]#2{\leavevmode%
% initialize loop
\let\@cite@separator\@empty%
% format
\@cite{%
% loop over ',' separated list
\@for\@cite@:=#2\do{%
% text to add at each iteration of the loop (separator between citations)
\@cite@separator\def\@cite@separator{,\ }%
% add entry to citelist
\@writecitation{\@cite@}%
\ref{cite\@cite@}%
}%
}%
% add optional argument text (as an argument to '\@cite')
{#1}%
}
\def\@cite#1#2{%
[#1\if@tempswa , #2\fi]%
}
%% add entry to citelist after checking it has not already been added
\def\@writecitation#1{%
\ifcsname if#1cited\endcsname%
\else%
\expandafter\newif\csname if#1cited\endcsname%
\immediate\write\@auxout{\string\citation{#1}}%
\fi%
}
%% table of contents
% boolean
\newif\iftoc
\def\tableofcontents{
\hfil{\bf Table of contents}\par\penalty10000\smallskip\penalty10000
% copy content from file
\IfFileExists{\jobname.toc}{\input{\jobname.toc}}{{\tt error: table of contents missing}}
% open new toc
\newwrite\tocoutput
\immediate\openout\tocoutput=\jobname.toc
\toctrue
}
%% close file
\AtEndDocument{
% close toc
\iftoc
\immediate\closeout\tocoutput
\fi
}
%% fill line with dots
\def\leaderfill{\leaders\hbox to 1em {\hss. \hss}\hfill}
%% same as sectionprefix
\def\tocsectionprefix{}
%% toc formats
\newcounter{tocsectioncount}
\def\tocsection #1#2{
\stepcounter{tocsectioncount}
\setcounter{tocsubsectioncount}{0}
\setcounter{tocsubsubsectioncount}{0}
% write
\smallskip\hyperlink{ln.\csname toc@sec.\thetocsectioncount\endcsname}{{\bf \tocsectionprefix\thetocsectioncount}.\hskip5pt {\color{blue}#1}\leaderfill#2}\par
}
\newcounter{tocsubsectioncount}
\def\tocsubsection #1#2{
\stepcounter{tocsubsectioncount}
\setcounter{tocsubsubsectioncount}{0}
% write
{\hskip10pt\hyperlink{ln.\csname toc@subsec.\thetocsectioncount.\thetocsubsectioncount\endcsname}{{\bf \thetocsubsectioncount}.\hskip5pt {\color{blue}\small #1}\leaderfill#2}}\par
}
\newcounter{tocsubsubsectioncount}
\def\tocsubsubsection #1#2{
\stepcounter{tocsubsubsectioncount}
% write
{\hskip20pt\hyperlink{ln.\csname toc@subsubsec.\thetocsectioncount.\thetocsubsectioncount.\thetocsubsubsectioncount\endcsname}{{\bf \thetocsubsubsectioncount}.\hskip5pt {\color{blue}\small #1}\leaderfill#2}}\par
}
\def\tocappendices{
\medskip
\setcounter{tocsectioncount}0
{\bf Appendices}\par
\smallskip
\def\tocsectionprefix{A}
}
\def\tocreferences#1{
\medskip
{\hyperlink{ln.\csname toc@references\endcsname}{{\color{blue}\bf References}\leaderfill#1}}\par
\smallskip
}
%% definitions that must be loaded at begin document
\let\ian@olddocument\document
\def\document{
\ian@olddocument
\deflabel
\defcaption
}
%% end
\ian@defaultoptions
\endinput

162
libs/iantheo.sty Normal file
View File

@ -0,0 +1,162 @@
%%
%% iantheorem package:
%% Ian's customized theorem command
%%
%% boolean to signal that this package was loaded
\newif\ifiantheo
%% TeX format
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
%% package name
\ProvidesPackage{iantheo}[2016/11/10]
%% options
\newif\ifsectionintheo
\DeclareOption{section_in_theo}{\sectionintheotrue}
\DeclareOption{no_section_in_theo}{\sectionintheofalse}
\newif\ifsubsectionintheo
\DeclareOption{subsection_in_theo}{\subsectionintheotrue}
\DeclareOption{no_subsection_in_theo}{\subsectionintheofalse}
\def\iantheo@defaultoptions{
\ExecuteOptions{section_in_theo, no_subsection_in_theo}
\ProcessOptions
%%% reset at every new section
\ifsectionintheo
\let\iantheo@oldsection\section
\gdef\section{\setcounter{theocount}{0}\iantheo@oldsection}
\fi
%% reset at every new subsection
\ifsubsectionintheo
\let\iantheo@oldsubsection\subsection
\gdef\subsection{\setcounter{theocount}{0}\iantheo@oldsubsection}
\fi
}
%% delimiters
\def\delimtitle#1{
\par%
\leavevmode%
\raise.3em\hbox to\hsize{%
\lower0.3em\hbox{\vrule height0.3em}%
\hrulefill%
\ \lower.3em\hbox{#1}\ %
\hrulefill%
\lower0.3em\hbox{\vrule height0.3em}%
}%
\par\penalty10000%
}
%% callable by ref
\def\delimtitleref#1{
\par%
%
\ifdefined\ianclass%
% hyperref anchor%
\hrefanchor%
% define tag (for \label)%
\xdef\tag{#1}%
\fi%
%
\leavevmode%
\raise.3em\hbox to\hsize{%
\lower0.3em\hbox{\vrule height0.3em}%
\hrulefill%
\ \lower.3em\hbox{\bf #1}\ %
\hrulefill%
\lower0.3em\hbox{\vrule height0.3em}%
}%
\par\penalty10000%
}
%% no title
\def\delim{
\par%
\leavevmode\raise.3em\hbox to\hsize{%
\lower0.3em\hbox{\vrule height0.3em}%
\hrulefill%
\lower0.3em\hbox{\vrule height0.3em}%
}%
\par\penalty10000%
}
%% end delim
\def\enddelim{
\par\penalty10000%
\leavevmode%
\raise.3em\hbox to\hsize{%
\vrule height0.3em\hrulefill\vrule height0.3em%
}%
\par%
}
%% theorem
% counter
\newcounter{theocount}
% booleans (write section or subsection in equation number)
\def\theo#1{
\stepcounter{theocount}
\ifdefined\ianclass
% hyperref anchor
\hrefanchor
\fi
% the number
\def\formattheo{\thetheocount}
% add subsection number
\ifsubsectionintheo
\let\tmp\formattheo
\edef\formattheo{\thesubsectioncount.\tmp}
\fi
% add section number
\ifsectionintheo
\let\tmp\formattheo
\edef\formattheo{\sectionprefix\thesectioncount.\tmp}
\fi
% define tag (for \label)
\xdef\tag{\formattheo}
% write
\delimtitle{\bf #1 \formattheo}
}
\let\endtheo\enddelim
%% theorem headers with name
\def\theoname#1#2{
\theo{#1}\hfil({\it #2})\par\penalty10000\medskip%
}
%% qed symbol
\def\qedsymbol{$\square$}
\def\qed{\penalty10000\hfill\penalty10000\qedsymbol}
%% compatibility with article class
\ifdefined\ianclasstrue
\relax
\else
\def\thesectioncount{\thesection}
\def\thesubsectioncount{\thesubsection}
\def\sectionprefix{}
\fi
%% prevent page breaks after displayed equations
\newcount\prevpostdisplaypenalty
\def\nopagebreakaftereq{
\prevpostdisplaypenalty=\postdisplaypenalty
\postdisplaypenalty=10000
}
%% back to previous value
\def\restorepagebreakaftereq{
\postdisplaypenalty=\prevpostdisplaypenalty
}
%% end
\iantheo@defaultoptions
\endinput

19
libs/largearray.sty Normal file
View File

@ -0,0 +1,19 @@
%%
%% largearray package:
%% Array spanning the entire line
%%
%% TeX format
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
%% package name
\ProvidesPackage{largearray}[2016/11/10]
\RequirePackage{array}
%% array spanning the entire line
\newlength\largearray@width
\setlength\largearray@width\textwidth
\addtolength\largearray@width{-10pt}
\def\largearray{\begin{array}{@{}>{\displaystyle}l@{}}\hphantom{\hspace{\largearray@width}}\\[-.5cm]}
\def\endlargearray{\end{array}}

114
libs/point.sty Normal file
View File

@ -0,0 +1,114 @@
%%
%% Points package:
%% \point commands
%%
%% TeX format
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
%% package name
\ProvidesPackage{point}[2017/06/13]
%% options
\newif\ifresetatsection
\DeclareOption{reset_at_section}{\resetatsectiontrue}
\DeclareOption{no_reset_at_section}{\resetatsectionfalse}
\newif\ifresetatsubsection
\DeclareOption{reset_at_subsection}{\resetatsubsectiontrue}
\DeclareOption{no_reset_at_subsection}{\resetatsubsectionfalse}
\newif\ifresetatsubsubsection
\DeclareOption{reset_at_subsubsection}{\resetatsubsubsectiontrue}
\DeclareOption{no_reset_at_subsubsection}{\resetatsubsubsectionfalse}
\newif\ifresetattheo
\DeclareOption{reset_at_theo}{\resetattheotrue}
\DeclareOption{no_reset_at_theo}{\resetattheofalse}
\def\point@defaultoptions{
\ExecuteOptions{reset_at_section, reset_at_subsection, reset_at_subsubsection, no_reset_at_theo}
\ProcessOptions
%% reset at every new section
\ifresetatsection
\let\point@oldsection\section
\gdef\section{\resetpointcounter\point@oldsection}
\fi
%% reset at every new subsection
\ifresetatsubsection
\let\point@oldsubsection\subsection
\gdef\subsection{\resetpointcounter\point@oldsubsection}
\fi
%% reset at every new subsubsection
\ifresetatsubsubsection
\let\point@oldsubsubsection\subsubsection
\gdef\subsubsection{\resetpointcounter\point@oldsubsubsection}
\fi
%% reset at every new theorem
\ifresetattheo
\ifdefined\iantheotrue
\let\point@oldtheo\theo
\gdef\theo{\resetpointcounter\point@oldtheo}
\fi
\fi
}
%% point
% counter
\newcounter{pointcount}
\def\point{
\stepcounter{pointcount}
\setcounter{subpointcount}{0}
% hyperref anchor (only if the class is 'ian')
\ifdefined\ifianclass
\hrefanchor
% define tag (for \label)
\xdef\tag{\thepointcount}
\fi
% header
\indent{\bf \thepointcount\ - }
}
%% subpoint
% counter
\newcounter{subpointcount}
\def\subpoint{
\stepcounter{subpointcount}
\setcounter{subsubpointcount}0
% hyperref anchor (only if the class is 'ian')
\ifdefined\ifianclass
\hrefanchor
% define tag (for \label)
\xdef\tag{\thepointcount-\thesubpointcount}
\fi
% header
\indent\hskip.5cm{\bf \thepointcount-\thesubpointcount\ - }
}
%% subsubpoint
% counter
\newcounter{subsubpointcount}
\def\subsubpoint{
\stepcounter{subsubpointcount}
% hyperref anchor (only if the class is 'ian')
\ifdefined\ifianclass
\hrefanchor
% define tag (for \label)
\xdef\tag{\thepointcount-\thesubpointcount-\thesubsubpointcount}
\fi
\indent\hskip1cm{\bf \thepointcount-\thesubpointcount-\thesubsubpointcount\ - }
}
%% reset point counters
\def\resetpointcounter{
\setcounter{pointcount}{0}
\setcounter{subpointcount}{0}
\setcounter{subsubpointcount}{0}
}
%% end
\point@defaultoptions
\endinput