Modifications after comment from @krono.
authorRené Schwarz <mail@rene-schwarz.com>
Mon, 20 Oct 2014 06:11:59 +0000 (08:11 +0200)
committerRené Schwarz <mail@rene-schwarz.com>
Mon, 20 Oct 2014 06:11:59 +0000 (08:11 +0200)
src/common/configfiles.tex

index fe30d06..d3d9a4e 100644 (file)
     \edef\configfilename{\expandafter\detokenize\expandafter{\configfilen@me}}
     \def\configfilepres{\expandafter\protect\expandafter\path\expandafter{\configfilename}}
     \immediate\write\configfileout{\configfilename}
-    \ifwindows%
-        \lstinputlisting[%
-          linerange={#3},%
-          %autounindent,%
-          frame=single,%
-          caption={[#4\\\configfilepres]%
-              #4\\\mbox{\protect\href{\@configurationbaseurl\configfilename}{%
-                  {\upshape [\configfilepres]}%
-            }}}
-          #1]{\configfilename.}%
-    \else%
-        \lstinputlisting[%
-          linerange={#3},%
-          %autounindent,%
-          frame=single,%
-          caption={[#4\\\configfilepres]%
-              #4\\\mbox{\protect\href{\@configurationbaseurl\configfilename}{%
-                  {\upshape [\configfilepres]}%
-            }}}
-          #1]{\configfilename}%
-    \fi%
+    \ifwindows\def\dummy@ext{.}\else\let\dummy@ext\empty\fi%
+    \lstinputlisting[%
+      linerange={#3},%
+      %autounindent,%
+      frame=single,%
+      caption={[#4\\\configfilepres]%
+          #4\\\mbox{\protect\href{\@configurationbaseurl\configfilename}{%
+              {\upshape [\configfilepres]}%
+        }}}
+      #1]{\configfilename\dummy@ext}%
     \marginpar{\vspace*{-2\baselineskip}\protect\href{\@configurationbaseurl\configfilename}{%
         \includegraphics[height=2\baselineskip]{img/ConfigIcns}}}
   \else%