diff --git a/source/BandstructureParameters.en.tex b/source/BandstructureParameters.en.tex
index 4331f583403fb799017ce9343ffeb2489eee5dfd..50fadf414f4d4b7cc71832218760d3eb29fc787e 100644
--- a/source/BandstructureParameters.en.tex
+++ b/source/BandstructureParameters.en.tex
@@ -1,3 +1,6 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 \begin{mhmodnl}{BandstructureParameters}{en}
 \begin{definition}
   The \defiii[name=conduction-band-DOS]{effective}{density}{of state
@@ -30,7 +33,4 @@
 \end{definition}
 \end{mhmodnl}
 
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/BandstructureParameters.tex b/source/BandstructureParameters.tex
index e870502c779640eee8479facad0ef64fa3aeb8d7..7f40aacf9ba6411f1929bea2a1f0b71d83df1121 100644
--- a/source/BandstructureParameters.tex
+++ b/source/BandstructureParameters.tex
@@ -1,3 +1,6 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 \begin{modsig}{BandstructureParameters}
 \symdef[name=effective-density-of-states-conduction-bands]{DOSConductionBand}{N_c}
 \symtest{DOSConductionBand}{\DOSConductionBand}
@@ -14,7 +17,4 @@
 \symi{conduction-band-DOS}
 \end{modsig}
 
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/Charge.en.tex b/source/Charge.en.tex
index 3e0ba6a30e22db453a65241bf62ad47b426a1cd1..d50240e81902a071fb993d356111ce4fb22ee244 100644
--- a/source/Charge.en.tex
+++ b/source/Charge.en.tex
@@ -1,3 +1,6 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 \begin{mhmodnl}{Charge}{en}
   \begin{definition}
     The \defii{total}{charge} denoted by $\TotalCharge$ describes the net charge entering
@@ -10,7 +13,4 @@
   \end{definition}   
 \end{mhmodnl}
 
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/Charge.tex b/source/Charge.tex
index b1d6aafdfd38428c9f7f6f4af8bcaf569c170c09..f30cade562ea310c144ecbf1428f19da4cace056 100644
--- a/source/Charge.tex
+++ b/source/Charge.tex
@@ -1,3 +1,6 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 \begin{modsig}{Charge}
   \gimport{DopingProfile}
   \gimport{PoissonParameters}
@@ -11,7 +14,4 @@
   \symtest{TotalCharge}{\TotalCharge}
 \end{modsig}
 
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/ContinuityBoundaryConditionsElectrons.en.tex b/source/ContinuityBoundaryConditionsElectrons.en.tex
index 910398049ebde2d5782ecf85549e89a17b2e7e12..14cd506a78554261f2702d0da202fe6c64a0208c 100644
--- a/source/ContinuityBoundaryConditionsElectrons.en.tex
+++ b/source/ContinuityBoundaryConditionsElectrons.en.tex
@@ -1,3 +1,6 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 \begin{mhmodnl}{ContinuityBoundaryConditionsElectrons}{en}
   \begin{definition}
     Boundary condition for the top contact.
@@ -8,7 +11,4 @@
   \end{definition}
 \end{mhmodnl}
 
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/ContinuityBoundaryConditionsElectrons.tex b/source/ContinuityBoundaryConditionsElectrons.tex
index d479a3fa3ee6e8af9e436871ae0030dc2b78e6b0..08e3ca55ef0c4da949438375971410c31eb9bfd8 100644
--- a/source/ContinuityBoundaryConditionsElectrons.tex
+++ b/source/ContinuityBoundaryConditionsElectrons.tex
@@ -1,3 +1,6 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 \begin{modsig}{ContinuityBoundaryConditionsElectrons}
   \gimport{DeviceOperationState}
   
@@ -8,7 +11,4 @@
   \symtest{FnBottom}{\FnBottom}
 \end{modsig}
 
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/ContinuityBoundaryConditionsHoles.en.tex b/source/ContinuityBoundaryConditionsHoles.en.tex
index a0207948a28077b5d0cf123d751212d6bfdee90d..79f3018008fa04b51a17481cccc7a8e41f13667f 100644
--- a/source/ContinuityBoundaryConditionsHoles.en.tex
+++ b/source/ContinuityBoundaryConditionsHoles.en.tex
@@ -1,3 +1,6 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 \begin{mhmodnl}{ContinuityBoundaryConditionsHoles}{en}
   \begin{definition}
     Boundary condition for the top contact.
@@ -8,7 +11,4 @@
   \end{definition}
 \end{mhmodnl}
 
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/ContinuityBoundaryConditionsHoles.tex b/source/ContinuityBoundaryConditionsHoles.tex
index 8ed8fbcf0bed781e92892b5ce33445561fd381e4..aba0807b5db805228a854a1a92e71dcf78a5c916 100644
--- a/source/ContinuityBoundaryConditionsHoles.tex
+++ b/source/ContinuityBoundaryConditionsHoles.tex
@@ -1,3 +1,6 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 
 \begin{modsig}{ContinuityBoundaryConditionsHoles}
   \gimport{DeviceOperationState}
@@ -9,7 +12,4 @@
   \symtest{FpBottom}{\FpBottom}
 \end{modsig}
 
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/ContinuityEquationElectrons.en.tex b/source/ContinuityEquationElectrons.en.tex
index 2cb3dfb7576726755a5def53bd4d2b00e3a04214..353fc126b4fdd1fc0199c23ae4b073e1ffdae272 100644
--- a/source/ContinuityEquationElectrons.en.tex
+++ b/source/ContinuityEquationElectrons.en.tex
@@ -1,10 +1,10 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 \begin{mhmodnl}{ContinuityEquationElectrons}{en}
   \begin{definition}
     Formulation of the continuity equation for electrons in divergence form.
   \end{definition}
 \end{mhmodnl}
 
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/ContinuityEquationElectrons.tex b/source/ContinuityEquationElectrons.tex
index aac4cb337c822f76a315e08f05913dac677b6ab3..0ba112c00f9a86d8c3ea5543da8f19aeaddf22be 100644
--- a/source/ContinuityEquationElectrons.tex
+++ b/source/ContinuityEquationElectrons.tex
@@ -1,10 +1,10 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 \begin{modsig}{ContinuityEquationElectrons}
   \gimport{CurrentElectrons}
   \gimport{FermiPotentialHoles}
   \gimport{Recombination}
 \end{modsig}
 
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/ContinuityEquationHoles.en.tex b/source/ContinuityEquationHoles.en.tex
index 220232070ce4e8c27aaed1eecc2585643c19a936..5b07fa70585257836f66b0c22c1b3cf575a55f70 100644
--- a/source/ContinuityEquationHoles.en.tex
+++ b/source/ContinuityEquationHoles.en.tex
@@ -1,10 +1,10 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 \begin{mhmodnl}{ContinuityEquationHoles}{en}
   \begin{definition}
     Formulation of the continuity equation for holes in divergence form.
   \end{definition}
 \end{mhmodnl}
 
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/ContinuityEquationHoles.tex b/source/ContinuityEquationHoles.tex
index 982f25074bb5d710562796fda3cb2f175bf68e81..98cf3d4196001f7985510515196dc31a7f95f1ad 100644
--- a/source/ContinuityEquationHoles.tex
+++ b/source/ContinuityEquationHoles.tex
@@ -1,10 +1,10 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 \begin{modsig}{ContinuityEquationHoles}
   \gimport{CurrentHoles}
   \gimport{FermiPotentialElectrons}
   \gimport{Recombination}
 \end{modsig}
 
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/CurrentElectrons.en.tex b/source/CurrentElectrons.en.tex
index 7f8c2487d28d3bd08ad333c5b755777737486b0a..8ad971ce7ba04a5f69f88eab570bae679f5f1a80 100644
--- a/source/CurrentElectrons.en.tex
+++ b/source/CurrentElectrons.en.tex
@@ -1,3 +1,6 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 \begin{mhmodnl}{CurrentElectrons}{en}
   \begin{definition}
     Definition of the electron current in gradient form.  The driving force of the current
@@ -6,7 +9,4 @@
   \end{definition}
 \end{mhmodnl}
 
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/CurrentElectrons.tex b/source/CurrentElectrons.tex
index 92008697d2b6b040ad8db5076d44ded342594fef..592dd9aab186822c0be1ee1956797f541a802527 100644
--- a/source/CurrentElectrons.tex
+++ b/source/CurrentElectrons.tex
@@ -1,3 +1,6 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 \begin{modsig}{CurrentElectrons}
   \gimport{FermiPotentialElectrons}
   \gimport{ElectrostaticPotential}
@@ -8,7 +11,4 @@
   \symtest{CurrentElectrons}{\CurrentElectrons}
 \end{modsig}
 
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/CurrentHoles.en.tex b/source/CurrentHoles.en.tex
index c1ae507633c91bc1d51c3f26f2f4fa92f8e51ff9..e2e7ba5dc4be1e0b00a9eb5024aae6f0ef288407 100644
--- a/source/CurrentHoles.en.tex
+++ b/source/CurrentHoles.en.tex
@@ -1,3 +1,6 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 \begin{mhmodnl}{CurrentHoles}{en}
   \begin{definition}
     Defintion of the hole current in gradient form.  The driving force of the current are
@@ -5,7 +8,4 @@
   \end{definition}
 \end{mhmodnl}
 
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/CurrentHoles.tex b/source/CurrentHoles.tex
index aab6c752f17ac5d8c2ba5939d7f74e37a9fedf2f..1e6e4a92e9778b4ffe309bef424489dc0e364529 100644
--- a/source/CurrentHoles.tex
+++ b/source/CurrentHoles.tex
@@ -1,3 +1,6 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 \begin{modsig}{CurrentHoles}
   \gimport{FermiPotentialHoles}
   \gimport{ElectrostaticPotential}
@@ -8,7 +11,4 @@
   \symtest{CurrentHoles}{\CurrentHoles}
 \end{modsig}
 
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/DensityElectrons.en.tex b/source/DensityElectrons.en.tex
index cfc7860b1c63e8e485242b372d4b740693bc3881..7441900020eafe08e6aac762241efdcb7868986c 100644
--- a/source/DensityElectrons.en.tex
+++ b/source/DensityElectrons.en.tex
@@ -1,10 +1,10 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 \begin{mhmodnl}{DensityElectrons}{en}
 \begin{definition}
   Formula for the \defii{electron}{density} for the Boltzmann approximation.
 \end{definition}
 \end{mhmodnl}
 
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/DensityElectrons.tex b/source/DensityElectrons.tex
index b9459683ae90f8d7969b731f3530a7b662560c53..05911287d9668e9d9d1550dd98cf82ad91fcefd1 100644
--- a/source/DensityElectrons.tex
+++ b/source/DensityElectrons.tex
@@ -1,3 +1,6 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 \begin{modsig}{DensityElectrons}
   \gimport{DeviceOperationState}
   \gimport{PhysicalConstants}
@@ -7,7 +10,4 @@
   \symtest{DensityElectrons}{\DensityElectrons}
 \end{modsig}
 
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/DensityHoles.en.tex b/source/DensityHoles.en.tex
index 4166def3a6ece82c6ab2881d1d5f14c30d0900dc..905c1ed123e829884684487d2197ba34fe9b0925 100644
--- a/source/DensityHoles.en.tex
+++ b/source/DensityHoles.en.tex
@@ -1,10 +1,10 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 \begin{mhmodnl}{DensityHoles}{en}
   \begin{definition}
     Formula for the \defii{hole}{density} for the Boltzmann approximation.
   \end{definition}
 \end{mhmodnl}
 
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/DensityHoles.tex b/source/DensityHoles.tex
index 553a77ef11a305c60809279bef62d1b9adbd74d5..84312c180cb4314e091cf3ab449d8a22196e7a09 100644
--- a/source/DensityHoles.tex
+++ b/source/DensityHoles.tex
@@ -1,3 +1,6 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 \begin{modsig}{DensityHoles}
   \gimport{DeviceOperationState}
   \gimport{PhysicalConstants}
@@ -7,7 +10,4 @@
   \symtest{DensityHoles}{\DensityHoles}
 \end{modsig}
 
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/Device.en.tex b/source/Device.en.tex
index 09f02aa26c5d5e0cbf591c48a45c1702e3a08d12..34fb6d1d12ef8d4c75bcc661e42ce7a0a32576f1 100644
--- a/source/Device.en.tex
+++ b/source/Device.en.tex
@@ -1,3 +1,6 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 \begin{mhmodnl}{Device}{en}
   \begin{definition}
     To model properties of physical objects, we assume a \defi{device} under
@@ -5,7 +8,4 @@
       properties}{device}{property}.
   \end{definition}
 \end{mhmodnl}
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/Device.tex b/source/Device.tex
index 381f5d47e32ac39326dc08d568a55c2174ac1022..271d591221a33a6d7450a227037dff9b9f57436f 100644
--- a/source/Device.tex
+++ b/source/Device.tex
@@ -1,8 +1,8 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 \begin{modsig}{Device}
     \symi{device}
     \symii{device}{property}
 \end{modsig}
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/DeviceGeometry.en.tex b/source/DeviceGeometry.en.tex
index e63f8ef8fc6eac6abfc2cca3be7c920d2a1bc1eb..b473e6e1a8c2d431aeaee40550b09e383b23853f 100644
--- a/source/DeviceGeometry.en.tex
+++ b/source/DeviceGeometry.en.tex
@@ -1,3 +1,6 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 \begin{mhmodnl}{DeviceGeometry}{en}
   \begin{definition}
     An important \trefii[Device]{device}{property} is the spatial geometry. It is modelled
@@ -10,7 +13,4 @@
   \end{definition}
 \end{mhmodnl}
 
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/DeviceGeometry.tex b/source/DeviceGeometry.tex
index b99b497063b20b538bf68370692e1911839d84b0..a17711458e6780706592cdaf56dac1ae5c95b066 100644
--- a/source/DeviceGeometry.tex
+++ b/source/DeviceGeometry.tex
@@ -1,3 +1,6 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 \begin{modsig}{DeviceGeometry}
   \gimport{Device}
   \gimport[smglom/sets]{cartesian-space}
@@ -6,7 +9,4 @@
   \symtest{DeviceDomain}{\DeviceDomain}
 \end{modsig}
 
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/DeviceOperationState.en.tex b/source/DeviceOperationState.en.tex
index 13a8b08071f0110b91aeb30f75d930a7772e876c..19ca4624afacb5f7a7d846177f31aa0cc91b7960 100644
--- a/source/DeviceOperationState.en.tex
+++ b/source/DeviceOperationState.en.tex
@@ -1,3 +1,6 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 \begin{mhmodnl}{DeviceOperationState}{en}
   \begin{definition}
     The global temperature of the device denoted by temperature.
@@ -15,7 +18,4 @@
     all, temperatures are appliccable to non-electric devices as well.}
 \end{mhmodnl}
 
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/DeviceOperationState.tex b/source/DeviceOperationState.tex
index c85c45edc35b6f1440b13d37013aacc45c0bd569..bf9c1fa58d1f146f004725e1f3cb7a282db77163 100644
--- a/source/DeviceOperationState.tex
+++ b/source/DeviceOperationState.tex
@@ -1,3 +1,6 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 \begin{modsig}{DeviceOperationState}
  
 \symdef[name=temperature]{DeviceTemperature}{T}
@@ -10,7 +13,4 @@
 \symtest{BottomVoltage}{\BottomVoltage}
 \end{modsig}
 
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/Displacement.en.tex b/source/Displacement.en.tex
index 50a91363b8f193639b90ec4930acd5920bd9caf4..979253368882817469595ee45948025439aae5f1 100644
--- a/source/Displacement.en.tex
+++ b/source/Displacement.en.tex
@@ -1,3 +1,6 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 \begin{mhmodnl}{Displacement}{en}
   \begin{definition}
     Expression for electric displacement denoted by 
@@ -6,7 +9,4 @@
   \end{definition}
 \end{mhmodnl}
 
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/Displacement.tex b/source/Displacement.tex
index a013b5c4265f43ebf794511b9559cf6615ae3ff5..46003c6214f088c7deb8a47e942c40f07cd023ba 100644
--- a/source/Displacement.tex
+++ b/source/Displacement.tex
@@ -1,3 +1,6 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 \begin{modsig}{Displacement}
   \gimport[smglom/arithmetics]{realarith}
   \gimport{ElectrostaticPotential}
@@ -7,7 +10,4 @@
   \symtest{ElectricDisplacement}{\ElectricDisplacement}
 \end{modsig}
 
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/DopingProfile.en.tex b/source/DopingProfile.en.tex
index bcb7590bd19eb0156162d089059ae620d923176f..4f2db7daaccff67a15c84f9b650288a50e54fb52 100644
--- a/source/DopingProfile.en.tex
+++ b/source/DopingProfile.en.tex
@@ -1,3 +1,6 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 \begin{mhmodnl}{DopingProfile}{en}
   \begin{definition}
     The \defii{doping}{profile} $\DopingProfile$ of a \trefi[Device]{device} with
@@ -6,7 +9,4 @@
   \end{definition}
 \end{mhmodnl}
 
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/DopingProfile.tex b/source/DopingProfile.tex
index 2da599bf82215f017711189f5f983b0c04f7eb04..6089d9098d0c0187017b5825a71a74e1b66b5aa9 100644
--- a/source/DopingProfile.tex
+++ b/source/DopingProfile.tex
@@ -1,3 +1,6 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 \begin{modsig}{DopingProfile}
   \gimport{DeviceGeometry}
  
@@ -5,7 +8,4 @@
   \symtest{DopingProfile}{\DopingProfile}
 \end{modsig}
 
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/ElectrostaticPotential.en.tex b/source/ElectrostaticPotential.en.tex
index ebd04d253956f272ecc7a6914ed43ed2e68391cc..12f89d746e9ca9685075363bc60eee0075854900 100644
--- a/source/ElectrostaticPotential.en.tex
+++ b/source/ElectrostaticPotential.en.tex
@@ -1,3 +1,6 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 \begin{mhmodnl}{ElectrostaticPotential}{en}
   \begin{definition}
     Spatial variation of the \defii{electrostatic}{potential}, usually denoted by
@@ -5,8 +8,5 @@
   \end{definition}
 \end{mhmodnl}
 
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
 
+\end{document}
diff --git a/source/ElectrostaticPotential.tex b/source/ElectrostaticPotential.tex
index 2805bb954330fe9535add795114a2550257a173a..e79ee3e69f6e55593e48e868ad50708315a7736b 100644
--- a/source/ElectrostaticPotential.tex
+++ b/source/ElectrostaticPotential.tex
@@ -1,3 +1,6 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 \begin{modsig}{ElectrostaticPotential}
   \gimport{DeviceGeometry}
 
@@ -5,7 +8,4 @@
   \symtest{ElectrostaticPotential}{\ElectrostaticPotential}
 \end{modsig}
 
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/FermiPotentialElectrons.en.tex b/source/FermiPotentialElectrons.en.tex
index 74e4a5973cb9e07aab341da1ced28ffb71f3ed2b..cb76ae5b36559f8e038a6871233d92e04c05abb0 100644
--- a/source/FermiPotentialElectrons.en.tex
+++ b/source/FermiPotentialElectrons.en.tex
@@ -1,3 +1,6 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 \begin{mhmodnl}{FermiPotentialElectrons}{en}
 \begin{definition}
   The \defiii{Fermi}{potential}{electrons} usually denoted by $\QFPnOp$ is a function
@@ -8,7 +11,4 @@
 \end{definition}
 \end{mhmodnl}
 
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/FermiPotentialElectrons.tex b/source/FermiPotentialElectrons.tex
index f87d43274320d7da349f7cc68ba0b9d9599ec3cc..fdb348dc5f3fde7fc77162776f2602e52d9c11d4 100644
--- a/source/FermiPotentialElectrons.tex
+++ b/source/FermiPotentialElectrons.tex
@@ -1,3 +1,6 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 % sTeX file automatically generated from OMDoc/MMT file, needs to be adapted 
 \begin{modsig}{FermiPotentialElectrons}
   \gimport{DeviceGeometry}
@@ -8,7 +11,4 @@
   \symiii{Fermi}{potential}{electrons}
 \end{modsig}
 
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/FermiPotentialHoles.en.tex b/source/FermiPotentialHoles.en.tex
index d397e9b464fffc06dd1d6b77be9f9c7172dfc52d..91dec1b19e11f1d195ab58cbdc69d3bfbaf84492 100644
--- a/source/FermiPotentialHoles.en.tex
+++ b/source/FermiPotentialHoles.en.tex
@@ -1,3 +1,6 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 \begin{mhmodnl}{FermiPotentialHoles}{en}
 \begin{definition}
   The \defiii{Fermi}{Potential}{Holes} usually denoted by $\QFPpOp$ is a function describing
@@ -7,7 +10,4 @@
 \end{definition}
 \end{mhmodnl}
 
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/FermiPotentialHoles.tex b/source/FermiPotentialHoles.tex
index 0ee8add36aaac35a2e7091f937075484a4d57d8d..0a8f671bfba1ea48879a07f2149178040d322f9d 100644
--- a/source/FermiPotentialHoles.tex
+++ b/source/FermiPotentialHoles.tex
@@ -1,3 +1,6 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 \begin{modsig}{FermiPotentialHoles}
   \gimport{DeviceGeometry}
   
@@ -7,7 +10,4 @@
   \symiii{Fermi}{Potential}{Holes}
 \end{modsig}
 
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/Mobilities.en.tex b/source/Mobilities.en.tex
index 67de48e7356cf034349a393ed1ca250128056f25..8f3a1506b0a3c8145b0f87be10d91f4cb3679813 100644
--- a/source/Mobilities.en.tex
+++ b/source/Mobilities.en.tex
@@ -1,3 +1,6 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 \begin{mhmodnl}{Mobilities}{en}
   \begin{definition}
     The electron mobility parameter usually denoted by $\ElectronMobility$.\ednote{Do we
@@ -9,7 +12,4 @@
   \end{definition}
 \end{mhmodnl}
 
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/Mobilities.tex b/source/Mobilities.tex
index a338e1dc51661e315aaca32956a27411c0681e33..3b683f28c085b0fc799f93d92e217cb41461988a 100644
--- a/source/Mobilities.tex
+++ b/source/Mobilities.tex
@@ -1,3 +1,6 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 \begin{modsig}{Mobilities}
   \symdef[name=mobility-electrons]{ElectronMobility}{\mu_n}
   \symtest{ElectronMobility}{ElectronMobility}
@@ -6,7 +9,4 @@
   \symtest{HoleMobility}{HoleMobility}
 \end{modsig}
 
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/OneDimDevice.en.tex b/source/OneDimDevice.en.tex
index 2b40651f6a2bd0b4f2604a83444dafdc9726ef85..daac7d9da484a67c244a9814cb1d403efc9e6491 100644
--- a/source/OneDimDevice.en.tex
+++ b/source/OneDimDevice.en.tex
@@ -1,3 +1,6 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 \begin{mhmodnl}{OneDimDevice}{en}
   \begin{definition}
     A \trefi[Device]{device} is called \defi{one-dimensional}, iff all of its
@@ -6,7 +9,4 @@
   \end{definition}
 \end{mhmodnl}
 
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/OneDimDevice.tex b/source/OneDimDevice.tex
index 91a84b785e797f42818a5dbcf01e86ae2059b61d..0602833a95628d256a588fab90903cf2dccd085c 100644
--- a/source/OneDimDevice.tex
+++ b/source/OneDimDevice.tex
@@ -1,9 +1,9 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 \begin{modsig}{OneDimDevice}
   \gimport{DeviceGeometry}
   \symi{one-dimensional}
 \end{modsig}
 
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/OneDimDeviceGeometry.en.tex b/source/OneDimDeviceGeometry.en.tex
index 4e8938d22f8b3dc5a694fa2a354ba40917c786d4..c5e27e2aaaa3770c8e6785dc017567c5c7ab4176 100644
--- a/source/OneDimDeviceGeometry.en.tex
+++ b/source/OneDimDeviceGeometry.en.tex
@@ -1,3 +1,6 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 \begin{mhmodnl}{OneDimDeviceGeometry}{en}
   \begin{definition}
     In a \trefi[OneDimDevice]{one-dimensional} \trefi[Device]{device}, we have 
@@ -5,7 +8,4 @@
   \end{definition}
 \end{mhmodnl}
 
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/OneDimDeviceGeometry.tex b/source/OneDimDeviceGeometry.tex
index 18912c9686f55c954f9799349c92e7d904d7e5e5..27d9f5ba06866ae2d236c26b783796f4771a76f9 100644
--- a/source/OneDimDeviceGeometry.tex
+++ b/source/OneDimDeviceGeometry.tex
@@ -1,8 +1,8 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 \begin{modsig}{OneDimDeviceGeometry}
   \gimport{OneDimDevice}
 \end{modsig}
 
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/PDERegularDomain.en.tex b/source/PDERegularDomain.en.tex
index 659be614e605b8bc97bc1f517226c3d8dc1327ac..ddb8ec875573720725b870e049dd844ae037a65c 100644
--- a/source/PDERegularDomain.en.tex
+++ b/source/PDERegularDomain.en.tex
@@ -1,10 +1,10 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 \begin{mhmodnl}{PDERegularDomain}{en}
   \begin{definition}
     A set $\sseteq{G}{\ndim\RealNumbers{n}}$ is called \defii{sufficiently}{regular} for
     PDEs, if the PDE methods work for it.
   \end{definition}
 \end{mhmodnl}
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/PDERegularDomain.tex b/source/PDERegularDomain.tex
index 18190371738d9ae2a30183e5ff6ad18b66a236b9..6a5711b07b6165d1d9bab8eff11a68cda47f8e9c 100644
--- a/source/PDERegularDomain.tex
+++ b/source/PDERegularDomain.tex
@@ -1,9 +1,9 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 \begin{modsig}{PDERegularDomain}
   \gimport[smglom/arithmetics]{realnumbers}
   \gimport[smglom/sets]{cartesian-space}
   \symii{sufficiently}{regular}
 \end{modsig}
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/PhysicalConstants.en.tex b/source/PhysicalConstants.en.tex
index 72814b1e978d7e34d709cc2fd4a1506b4556a23f..c861eddd15135713e37b87520b8c69fa4a5b9b63 100644
--- a/source/PhysicalConstants.en.tex
+++ b/source/PhysicalConstants.en.tex
@@ -1,3 +1,6 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 \begin{mhmodnl}[creators=miko]{PhysicalConstants}{en}
   \begin{definition}
     The \defiii{vaccuum}{dielectric}{permitivity} constant (usually denoted by
@@ -42,7 +45,4 @@
   \ednote{These should be separated into separate theories.}
 \end{mhmodnl}
 
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/PhysicalConstants.tex b/source/PhysicalConstants.tex
index 8eca54809cffcc8352f509a2d4c0e272efcda0d2..dcf6dbb67dd3648960c83cb191c22885599c4da4 100644
--- a/source/PhysicalConstants.tex
+++ b/source/PhysicalConstants.tex
@@ -1,3 +1,6 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 \begin{modsig}[creators=miko]{PhysicalConstants}
   \importmhmodule[mhrepos=BaseMH/physics,dir=units/en]{energy}
   \importmhmodule[mhrepos=BaseMH/physics,dir=units/en]{temperature}
@@ -24,7 +27,4 @@
   \symiii{vaccuum}{dielectric}{permitivity}
 \end{modsig}
 
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/PoissonBoundaryConditions.en.tex b/source/PoissonBoundaryConditions.en.tex
index 668d237ad558b6e99bc2c96a058367fdd3326c8f..1d8d188fc02c264d02dc542de079cb18cc90fa60 100644
--- a/source/PoissonBoundaryConditions.en.tex
+++ b/source/PoissonBoundaryConditions.en.tex
@@ -1,3 +1,6 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 % sTeX file automatically generated from OMDoc/MMT file, needs to be adapted 
 \begin{mhmodnl}{PoissonBoundaryConditions}{en}
   \begin{definition}
@@ -16,7 +19,4 @@
   \end{omtext}
 \end{mhmodnl}
 
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/PoissonBoundaryConditions.tex b/source/PoissonBoundaryConditions.tex
index 92158fe88cd2335695b2cff4d5e921512a13691b..22ccff52e3eb9f3f22b0e219bf11413da933db19 100644
--- a/source/PoissonBoundaryConditions.tex
+++ b/source/PoissonBoundaryConditions.tex
@@ -1,3 +1,6 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 % sTeX file automatically generated from OMDoc/MMT file, needs to be adapted 
 \begin{modsig}{PoissonBoundaryConditions}
   \gimport{ThermodynamicEquilibrium}
@@ -9,7 +12,4 @@
   \symtest{EPotBottom}{\EPotBottom}
 \end{modsig}
 
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/PoissonEquation.en.tex b/source/PoissonEquation.en.tex
index 8847753b18e3f91cf781562497dbbb55c7526924..d97e5529d8ac5092d3e12a8b318869149593f20c 100644
--- a/source/PoissonEquation.en.tex
+++ b/source/PoissonEquation.en.tex
@@ -1,3 +1,6 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 % sTeX file automatically generated from OMDoc/MMT file, needs to be adapted 
 \begin{mhmodnl}{PoissonEquation}{en}
   \begin{definition}
@@ -5,7 +8,4 @@
   \end{definition}
 \end{mhmodnl}
 
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/PoissonEquation.tex b/source/PoissonEquation.tex
index f46124ae2ce82dbc969eda43517a0c4dd334b1b1..c32d39a68499f6b6eed2cb78b610d7f82e6bf5fe 100644
--- a/source/PoissonEquation.tex
+++ b/source/PoissonEquation.tex
@@ -1,10 +1,10 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 % sTeX file automatically generated from OMDoc/MMT file, needs to be adapted 
 \begin{modsig}{PoissonEquation}
   \gimport{Charge}
   \gimport{Displacement}
 \end{modsig}
 
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/PoissonParameters.en.tex b/source/PoissonParameters.en.tex
index a93693a1e8e3675c5fac292a0200cfc5542eca1e..135bdcda7116b7e599ddb8d69a7b0fc67a0e6707 100644
--- a/source/PoissonParameters.en.tex
+++ b/source/PoissonParameters.en.tex
@@ -1,3 +1,6 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 \begin{mhmodnl}{PoissonParameters}{en}
   \begin{definition}
     The relative dielelectric permitivity constant denoted by
@@ -9,7 +12,4 @@
   \end{definition}
 \end{mhmodnl}
 
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/PoissonParameters.tex b/source/PoissonParameters.tex
index 853cdb33dbc0c970d90dc759e51578a580668624..5538e7f5a5efabf15b51a7ef16133a5b0615478e 100644
--- a/source/PoissonParameters.tex
+++ b/source/PoissonParameters.tex
@@ -1,3 +1,6 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 % sTeX file automatically generated from OMDoc/MMT file, needs to be adapted 
 \begin{modsig}{PoissonParameters}
   \symdef[name=relative-dielectric-permitivity]{RelativeDielectricPermitivity}{\varepsilon_r}
@@ -7,7 +10,4 @@
   \symtest{DielectricPermitivity}{\DielectricPermitivity}
 \end{modsig}
 
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/Recombination.en.tex b/source/Recombination.en.tex
index c7cf3dc77dab11bf399d90e902779e14427a7979..d0deab7d662b5d866e8190db47a3c1179972d2ec 100644
--- a/source/Recombination.en.tex
+++ b/source/Recombination.en.tex
@@ -1,3 +1,6 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 % sTeX file automatically generated from OMDoc/MMT file, needs to be adapted 
 \begin{mhmodnl}{Recombination}{en}
   \begin{definition}
@@ -9,7 +12,4 @@
   \end{definition}
 \end{mhmodnl}
 
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/Recombination.tex b/source/Recombination.tex
index 19e02a4128368a1610df57b0a0f6a130e507464d..51058b531f461285b99791b7fdf69d795a2aac5f 100644
--- a/source/Recombination.tex
+++ b/source/Recombination.tex
@@ -1,3 +1,6 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 % sTeX file automatically generated from OMDoc/MMT file, needs to be adapted 
 \begin{modsig}{Recombination}
   \gimport{DensityElectrons}
@@ -12,7 +15,4 @@
   \symtest{RecombinationRate}{\RecombinationRate{n}p{\varphi_n}{\varphi_p}}
 \end{modsig}
 
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/SpontaneousRecombination.en.tex b/source/SpontaneousRecombination.en.tex
index 90ad5395ea9df9ac0e5277d7914fbf1615281814..ba14eee29e62790f4ab940ee6eb8c26373f6c4ee 100644
--- a/source/SpontaneousRecombination.en.tex
+++ b/source/SpontaneousRecombination.en.tex
@@ -1,3 +1,6 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 % sTeX file automatically generated from OMDoc/MMT file, needs to be adapted 
 \begin{mhmodnl}{SpontaneousRecombination}{en}
   \begin{definition}
@@ -15,7 +18,4 @@
     article (which as an active document could profit from this definition.)}
 \end{mhmodnl}
 
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/SpontaneousRecombination.tex b/source/SpontaneousRecombination.tex
index 2cec1127b0d7c230cc713a0ac371b382fdaf1f3b..12019fbb1b4ab5856a0eafeca8ed184ed118ed29 100644
--- a/source/SpontaneousRecombination.tex
+++ b/source/SpontaneousRecombination.tex
@@ -1,3 +1,6 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 % sTeX file automatically generated from OMDoc/MMT file, needs to be adapted 
 \begin{modsig}{SpontaneousRecombination}
   \gimport{Recombination}
@@ -6,7 +9,4 @@
   \symtest{SpontaneousRecombinationCoefficient}{\SpontaneousRecombinationCoefficient}
 \end{modsig}
 
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/ThermodynamicEquilibrium.en.tex b/source/ThermodynamicEquilibrium.en.tex
index 5042c5a137d82d46d1e338cbd53e60028c4f6536..b01b45cf3f80c54f2ba92a0c15b5a44f4a7196b3 100644
--- a/source/ThermodynamicEquilibrium.en.tex
+++ b/source/ThermodynamicEquilibrium.en.tex
@@ -1,3 +1,6 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 % sTeX file automatically generated from OMDoc/MMT file, needs to be adapted 
 \begin{mhmodnl}{ThermodynamicEquilibrium}{en}
   \begin{definition}
@@ -11,7 +14,4 @@
   \end{definition}
 \end{mhmodnl}
 
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/ThermodynamicEquilibrium.tex b/source/ThermodynamicEquilibrium.tex
index 0d0cf21271ff482ca07d7fac49b7f1b69416eeca..c5de95492fd85ad77414e07514b597327e02231f 100644
--- a/source/ThermodynamicEquilibrium.tex
+++ b/source/ThermodynamicEquilibrium.tex
@@ -1,3 +1,6 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 % sTeX file automatically generated from OMDoc/MMT file, needs to be adapted 
 \begin{modsig}{ThermodynamicEquilibrium}
   \gimport{Charge}
@@ -9,7 +12,4 @@
   \symtest{EquilibriumPotentialBottom}{\EquilibriumPotentialBottom}
 \end{modsig}
 
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/TwoDimDevice.en.tex b/source/TwoDimDevice.en.tex
index 84b27045608de96277622ad6caa41e52824c560d..7d38de0e2c140a9733058d823eebd28912d121d1 100644
--- a/source/TwoDimDevice.en.tex
+++ b/source/TwoDimDevice.en.tex
@@ -1,3 +1,6 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 \begin{mhmodnl}{TwoDimDevice}{en}
   \begin{definition}
     A \trefi[Device]{device} is called \defi{two-dimensional}, iff all of its
@@ -6,7 +9,4 @@
   \end{definition}
 \end{mhmodnl}
 
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/TwoDimDevice.tex b/source/TwoDimDevice.tex
index 1c5ee022f419a12959b4527904b0dcd0b1ebe6f7..4f0d705b5d5ccf6c7a184448411459a387b78902 100644
--- a/source/TwoDimDevice.tex
+++ b/source/TwoDimDevice.tex
@@ -1,9 +1,9 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 \begin{modsig}{TwoDimDevice}
   \gimport{DeviceGeometry}
   \symi{two-dimensional}
 \end{modsig}
 
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/TwoDimDeviceGeometry.en.tex b/source/TwoDimDeviceGeometry.en.tex
index 7fc383bed0b0f60d11b535c042c02258c1176163..e1faba8b15640fdab59573fd3ccce0a2f533c3a7 100644
--- a/source/TwoDimDeviceGeometry.en.tex
+++ b/source/TwoDimDeviceGeometry.en.tex
@@ -1,3 +1,6 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 \begin{mhmodnl}{TwoDimDeviceGeometry}{en}
   \begin{definition}
     In a \trefi[TwoDimDevice]{two-dimensional} \trefi[Device]{device}, we have
@@ -6,7 +9,4 @@
   \end{definition}
 \end{mhmodnl}
 
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:l
+\end{document}
diff --git a/source/TwoDimDeviceGeometry.tex b/source/TwoDimDeviceGeometry.tex
index aafd94a6578f5df95cc9348d9b77cf85362a3001..a6d5f214081e8fe3a38daca55c377c30389a8151 100644
--- a/source/TwoDimDeviceGeometry.tex
+++ b/source/TwoDimDeviceGeometry.tex
@@ -1,9 +1,9 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 \begin{modsig}{TwoDimDeviceGeometry}
   \gimport{TwoDimDevice}
   \gimport{PDERegularDomain}
 \end{modsig}
 
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/VanRoosbroeck.en.tex b/source/VanRoosbroeck.en.tex
index fc149650b3d18bdf7e0556acaf2f1c6f7bf1c017..fd04a9b9149e6295ddd069dd861e4525ea50481a 100644
--- a/source/VanRoosbroeck.en.tex
+++ b/source/VanRoosbroeck.en.tex
@@ -1,8 +1,8 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 % sTeX file automatically generated from OMDoc/MMT file, needs to be adapted 
 \begin{mhmodnl}{VanRoosbroeck}{en}
 \end{mhmodnl}
 
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}
diff --git a/source/VanRoosbroeck.tex b/source/VanRoosbroeck.tex
index 64ca02c87af7489792b877241dac1c391503a154..7cce3505b34df81d81f82bb13a8b009bc2b953c9 100644
--- a/source/VanRoosbroeck.tex
+++ b/source/VanRoosbroeck.tex
@@ -1,3 +1,6 @@
+\documentclass[mh]{smglom}
+\libinput{preamble}
+\begin{document}
 % sTeX file automatically generated from OMDoc/MMT file, needs to be adapted 
 \begin{modsig}{VanRoosbroeck}
   \gimport{PoissonEquation}
@@ -9,7 +12,4 @@
   \gimport{SpontaneousRecombination}
 \end{modsig}
 
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: t
-%%% End:
+\end{document}