Seite 1 von 2

Probleme mit Code Highlighting

Verfasst: Fr 7. Dez 2012, 14:40
von Martin__
Ich habe versucht mit dem Programm Highlight mir praktisch Code formatieren zulassen das geht auch, aber nur solange ich nur eins davon habe :( siehe beispiel wenn man das ausgekommentiert reinnimmt geht es nicht mehr :( hat wer vll eine idee?
\\documentclass{article}
\usepackage{color}
\usepackage{alltt}
\usepackage[T1]{fontenc}
\usepackage{ucs}
\usepackage[utf8x]{inputenc}

\newcommand{\hlstd}[1]{\textcolor[rgb]{0.2,0,0.4}{#1}}
\newcommand{\hlnum}[1]{\textcolor[rgb]{0.2,0.73,0.02}{#1}}
\newcommand{\hlesc}[1]{\textcolor[rgb]{0.65,0.09,0.38}{#1}}
\newcommand{\hlstr}[1]{\textcolor[rgb]{0.09,0.38,0.65}{#1}}
\newcommand{\hlpps}[1]{\textcolor[rgb]{0.4,0.2,0}{#1}}
\newcommand{\hlslc}[1]{\textcolor[rgb]{0,0.4,0.2}{#1}}
\newcommand{\hlcom}[1]{\textcolor[rgb]{0,0.4,0.2}{#1}}
\newcommand{\hlppc}[1]{\textcolor[rgb]{0.33,0.45,0.69}{#1}}
\newcommand{\hlopt}[1]{\textcolor[rgb]{0.33,0.33,0.33}{#1}}
\newcommand{\hlipl}[1]{\textcolor[rgb]{0.65,0.09,0.38}{#1}}
\newcommand{\hllin}[1]{\textcolor[rgb]{0.6,0.6,0.6}{#1}}
\newcommand{\hlkwa}[1]{\textcolor[rgb]{1,0.19,0.19}{#1}}
\newcommand{\hlkwb}[1]{\textcolor[rgb]{0.96,0.55,0.14}{#1}}
\newcommand{\hlkwc}[1]{\textcolor[rgb]{0,0,1}{#1}}
\newcommand{\hlkwd}[1]{\textcolor[rgb]{0.82,0.11,0.93}{#1}}
\definecolor{bgcolor}{rgb}{1,1,1}

\title{Source file}
\begin{document}
\pagecolor{bgcolor}
\noindent
\ttfamily
\hlstd{}\hllin{\ 1\ }\hlkwa{model\ }\hlstd{Gleichrichter\textunderscore Mehrphasig\\
\hllin{\ 2\ }}\hlstd{\ \ }\hlstd{}\hlkwa{parameter\ }\hlstd{Integer\ m}\hlopt{(}\hlstd{}\hlkwa{final\ }\hlstd{min}\hlopt{=}\hlstd{}\hlnum{1}\hlstd{}\hlopt{)\ =\ }\hlstd{}\hlnum{3\ }\hlstd{}\hlstr{"number\ of\ phases"}\hlstd{}\hlopt{;}\\
\hllin{\ 3\ }\hlstd{}\hlstd{\ \ }\hlstd{}\hlkwa{parameter\ }\hlstd{Modelica.SIunits.Resistance\ Ron}\hlopt{{[}}\hlstd{m}\hlopt{{]}(}\hlstd{}\hlkwa{final\ }\hlstd{min}\hlopt{=}\hlstd{zeros}\hlopt{(}\hlstd{m}\hlopt{),\ }\hlstd{start\ }\hlopt{=\ }\hlstd{fill}\hlopt{(}\hlstd{}\hlnum{1}\hlstd{.E}\hlopt{{-}}\hlstd{}\hlnum{5}\hlstd{}\hlopt{,\ }\hlstd{m}\hlopt{))\ }\\
\hllin{\ 4\ }\hlstd{}\hlstd{\ \ \ \ }\hlstd{}\hlstr{"Closed\ diode\ resistance"}\hlstd{}\hlopt{;}\\
\hllin{\ 5\ }\hlstd{}\hlstd{\ \ }\hlstd{}\hlkwa{parameter\ }\hlstd{Modelica.SIunits.Conductance\ Goff}\hlopt{{[}}\hlstd{m}\hlopt{{]}(}\hlstd{}\hlkwa{final\ }\hlstd{min}\hlopt{=}\hlstd{zeros}\hlopt{(}\hlstd{m}\hlopt{),\ }\hlstd{start\ }\hlopt{=\ }\hlstd{fill}\hlopt{(}\hlstd{}\hlnum{1}\hlstd{.E}\hlopt{{-}}\hlstd{}\hlnum{5}\hlstd{}\hlopt{,\ }\hlstd{m}\hlopt{))\ }\\
\hllin{\ 6\ }\hlstd{}\hlstd{\ \ \ \ }\hlstd{}\hlstr{"Opened\ diode\ conductance"}\hlstd{}\hlopt{;}\\
\hllin{\ 7\ }\hlstd{}\hlstd{\ \ }\hlstd{}\hlkwa{parameter\ }\hlstd{Modelica.SIunits.Voltage\ Vknee}\hlopt{{[}}\hlstd{m}\hlopt{{]}(}\hlstd{}\hlkwa{final\ }\hlstd{min}\hlopt{=}\hlstd{zeros}\hlopt{(}\hlstd{m}\hlopt{),\ }\hlstd{start\ }\hlopt{=\ }\hlstd{zeros}\hlopt{(}\hlstd{m}\hlopt{))\ }\\
\hllin{\ 8\ }\hlstd{}\hlstd{\ \ \ \ }\hlstd{}\hlstr{"Treshold\ voltage"}\hlstd{}\hlopt{;}\\
\hllin{\ 9\ }\hlstd{}\hlstd{\ \ }\hlstd{Modelica.Electrical.MultiPhase.Ideal.IdealDiode\ idealDiode}\hlopt{(}\hlstd{m}\hlopt{=}\hlstd{m}\hlopt{,}\\
\hllin{10\ }\hlstd{}\hlstd{\ \ \ \ }\hlstd{Ron}\hlopt{=}\hlstd{Ron}\hlopt{,}\\
\hllin{11\ }\hlstd{}\hlstd{\ \ \ \ }\hlstd{Goff}\hlopt{=}\hlstd{Goff}\hlopt{,}\\
\hllin{12\ }\hlstd{}\hlstd{\ \ \ \ }\hlstd{Vknee}\hlopt{=}\hlstd{Vknee}\hlopt{)\ }\hlstd{}\hlkwa{annotation\ }\hlstd{}\hlopt{(}\hlstd{Placement}\hlopt{(}\hlstd{transformation}\hlopt{(}\\
\hllin{13\ }\hlstd{}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{extent}\hlopt{=\{\{{-}}\hlstd{}\hlnum{10}\hlstd{}\hlopt{,{-}}\hlstd{}\hlnum{10}\hlstd{}\hlopt{\},\{}\hlstd{}\hlnum{10}\hlstd{}\hlopt{,}\hlstd{}\hlnum{10}\hlstd{}\hlopt{\}\},}\\
\hllin{14\ }\hlstd{}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{rotation}\hlopt{=}\hlstd{}\hlnum{90}\hlstd{}\hlopt{,}\\
\hllin{15\ }\hlstd{}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{origin}\hlopt{=\{}\hlstd{}\hlnum{38}\hlstd{}\hlopt{,}\hlstd{}\hlnum{14}\hlstd{}\hlopt{\})));}\\
\hllin{16\ }\hlstd{}\hlstd{\ \ }\hlstd{Modelica.Electrical.MultiPhase.Ideal.IdealDiode\ idealDiode1}\hlopt{(}\\
\hllin{17\ }\hlstd{}\hlstd{\ \ \ \ }\hlstd{m}\hlopt{=}\hlstd{m}\hlopt{,}\\
\hllin{18\ }\hlstd{}\hlstd{\ \ \ \ }\hlstd{Ron}\hlopt{=}\hlstd{Ron}\hlopt{,}\\
\hllin{19\ }\hlstd{}\hlstd{\ \ \ \ }\hlstd{Goff}\hlopt{=}\hlstd{Goff}\hlopt{,}\\
\hllin{20\ }\hlstd{}\hlstd{\ \ \ \ }\hlstd{Vknee}\hlopt{=}\hlstd{Vknee}\hlopt{)}\hlstd{\ \ \ \ }\hlopt{}\hlstd{}\hlkwa{annotation\ }\hlstd{}\hlopt{(}\hlstd{Placement}\hlopt{(}\hlstd{transformation}\hlopt{(}\\
\hllin{21\ }\hlstd{}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{extent}\hlopt{=\{\{{-}}\hlstd{}\hlnum{10}\hlstd{}\hlopt{,{-}}\hlstd{}\hlnum{10}\hlstd{}\hlopt{\},\{}\hlstd{}\hlnum{10}\hlstd{}\hlopt{,}\hlstd{}\hlnum{10}\hlstd{}\hlopt{\}\},}\\
\hllin{22\ }\hlstd{}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{rotation}\hlopt{=}\hlstd{}\hlnum{90}\hlstd{}\hlopt{,}\\
\hllin{23\ }\hlstd{}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{origin}\hlopt{=\{}\hlstd{}\hlnum{38}\hlstd{}\hlopt{,{-}}\hlstd{}\hlnum{20}\hlstd{}\hlopt{\})));}\\
\hllin{24\ }\hlstd{}\hlstd{\ \ }\hlstd{Modelica.Electrical.MultiPhase.Basic.Star\ star}\hlopt{(}\hlstd{m}\hlopt{=}\hlstd{m}\hlopt{)\ }\\
\hllin{25\ }\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\hlstd{}\hlkwa{annotation\ }\hlstd{}\hlopt{(}\hlstd{Placement}\hlopt{(}\\
\hllin{26\ }\hlstd{}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{transformation}\hlopt{(}\\
\hllin{27\ }\hlstd{}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{extent}\hlopt{=\{\{{-}}\hlstd{}\hlnum{10}\hlstd{}\hlopt{,{-}}\hlstd{}\hlnum{10}\hlstd{}\hlopt{\},\{}\hlstd{}\hlnum{10}\hlstd{}\hlopt{,}\hlstd{}\hlnum{10}\hlstd{}\hlopt{\}\},}\\
\hllin{28\ }\hlstd{}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{rotation}\hlopt{=}\hlstd{}\hlnum{90}\hlstd{}\hlopt{,}\\
\hllin{29\ }\hlstd{}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{origin}\hlopt{=\{}\hlstd{}\hlnum{38}\hlstd{}\hlopt{,}\hlstd{}\hlnum{38}\hlstd{}\hlopt{\})));}\\
\hllin{30\ }\hlstd{}\hlstd{\ \ }\hlstd{Modelica.Electrical.MultiPhase.Basic.Star\ star1}\hlopt{(}\hlstd{m}\hlopt{=}\hlstd{m}\hlopt{)\ }\\
\hllin{31\ }\hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\hlstd{}\hlkwa{annotation\ }\hlstd{}\hlopt{(}\hlstd{Placement}\hlopt{(}\\
\hllin{32\ }\hlstd{}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{transformation}\hlopt{(}\\
\hllin{33\ }\hlstd{}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{extent}\hlopt{=\{\{{-}}\hlstd{}\hlnum{10}\hlstd{}\hlopt{,{-}}\hlstd{}\hlnum{10}\hlstd{}\hlopt{\},\{}\hlstd{}\hlnum{10}\hlstd{}\hlopt{,}\hlstd{}\hlnum{10}\hlstd{}\hlopt{\}\},}\\
\hllin{34\ }\hlstd{}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{rotation}\hlopt{=}\hlstd{}\hlnum{270}\hlstd{}\hlopt{,}\\
\hllin{35\ }\hlstd{}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{origin}\hlopt{=\{}\hlstd{}\hlnum{38}\hlstd{}\hlopt{,{-}}\hlstd{}\hlnum{44}\hlstd{}\hlopt{\})));}\\
\hllin{36\ }\hlstd{}\hlstd{\ \ }\hlstd{Modelica.Electrical.MultiPhase.Interfaces.PositivePlug\ positivePlug\ \\
\hllin{37\ }}\hlstd{\ \ \ \ }\hlstd{}\hlkwa{annotation\ }\hlstd{}\hlopt{(}\hlstd{Placement}\hlopt{(}\hlstd{transformation}\hlopt{(}\hlstd{extent}\hlopt{=\{\{{-}}\hlstd{}\hlnum{30}\hlstd{}\hlopt{,{-}}\hlstd{}\hlnum{10}\hlstd{}\hlopt{\},\{{-}}\hlstd{}\hlnum{10}\hlstd{}\hlopt{,}\hlstd{}\hlnum{10}\hlstd{}\hlopt{\}\})));}\\
\hllin{38\ }\hlstd{}\hlstd{\ \ }\hlstd{Modelica.Electrical.Analog.Interfaces.PositivePin\ pin\textunderscore p\ \\
\hllin{39\ }}\hlstd{\ \ \ \ }\hlstd{}\hlkwa{annotation\ }\hlstd{}\hlopt{(}\hlstd{Placement}\hlopt{(}\hlstd{transformation}\hlopt{(}\hlstd{extent}\hlopt{=\{\{}\hlstd{}\hlnum{88}\hlstd{}\hlopt{,}\hlstd{}\hlnum{42}\hlstd{}\hlopt{\},\{}\hlstd{}\hlnum{108}\hlstd{}\hlopt{,}\hlstd{}\hlnum{62}\hlstd{}\hlopt{\}\})));}\\
\hllin{40\ }\hlstd{}\hlstd{\ \ }\hlstd{Modelica.Electrical.Analog.Interfaces.NegativePin\ pin\textunderscore n\ \\
\hllin{41\ }}\hlstd{\ \ \ \ }\hlstd{}\hlkwa{annotation\ }\hlstd{}\hlopt{(}\hlstd{Placement}\hlopt{(}\hlstd{transformation}\hlopt{(}\hlstd{extent}\hlopt{=\{\{}\hlstd{}\hlnum{88}\hlstd{}\hlopt{,{-}}\hlstd{}\hlnum{70}\hlstd{}\hlopt{\},\{}\hlstd{}\hlnum{108}\hlstd{}\hlopt{,{-}}\hlstd{}\hlnum{50}\hlstd{}\hlopt{\}\})));}\\
\hllin{42\ }\hlstd{}\hlkwa{equation\ }\\
\hllin{43\ }\hlstd{}\hlstd{\ \ }\hlstd{}\hlkwb{connect}\hlstd{}\hlopt{(}\hlstd{star.plug\textunderscore p}\hlopt{,}\hlstd{idealDiode.\ plug\textunderscore n}\hlopt{)\ }\hlstd{}\hlkwa{annotation\ }\hlstd{}\hlopt{(}\hlstd{Line}\hlopt{(}\\
\hllin{44\ }\hlstd{}\hlstd{\ \ \ \ \ \ }\hlstd{points}\hlopt{=\{\{}\hlstd{}\hlnum{38}\hlstd{}\hlopt{,}\hlstd{}\hlnum{28}\hlstd{}\hlopt{\},\{}\hlstd{}\hlnum{38}\hlstd{}\hlopt{,}\hlstd{}\hlnum{24}\hlstd{}\hlopt{\}\},}\\
\hllin{45\ }\hlstd{}\hlstd{\ \ \ \ \ \ }\hlstd{color}\hlopt{=\{}\hlstd{}\hlnum{0}\hlstd{}\hlopt{,}\hlstd{}\hlnum{0}\hlstd{}\hlopt{,}\hlstd{}\hlnum{255}\hlstd{}\hlopt{\},}\\
\hllin{46\ }\hlstd{}\hlstd{\ \ \ \ \ \ }\hlstd{smooth}\hlopt{=}\hlstd{Smooth.None}\hlopt{));}\\
\hllin{47\ }\hlstd{}\hlstd{\ \ }\hlstd{}\hlkwb{connect}\hlstd{}\hlopt{(}\hlstd{idealDiode1.plug\textunderscore p}\hlopt{,}\hlstd{star1.\ plug\textunderscore p}\hlopt{)\ }\hlstd{}\hlkwa{annotation\ }\hlstd{}\hlopt{(}\hlstd{Line}\hlopt{(}\\
\hllin{48\ }\hlstd{}\hlstd{\ \ \ \ \ \ }\hlstd{points}\hlopt{=\{\{}\hlstd{}\hlnum{38}\hlstd{}\hlopt{,{-}}\hlstd{}\hlnum{30}\hlstd{}\hlopt{\},\{}\hlstd{}\hlnum{38}\hlstd{}\hlopt{,{-}}\hlstd{}\hlnum{34}\hlstd{}\hlopt{\}\},}\\
\hllin{49\ }\hlstd{}\hlstd{\ \ \ \ \ \ }\hlstd{color}\hlopt{=\{}\hlstd{}\hlnum{0}\hlstd{}\hlopt{,}\hlstd{}\hlnum{0}\hlstd{}\hlopt{,}\hlstd{}\hlnum{255}\hlstd{}\hlopt{\},}\\
\hllin{50\ }\hlstd{}\hlstd{\ \ \ \ \ \ }\hlstd{smooth}\hlopt{=}\hlstd{Smooth.None}\hlopt{));}\\
\hllin{51\ }\hlstd{}\hlstd{\ \ }\hlstd{}\hlkwa{annotation\ }\hlstd{}\hlopt{(}\hlstd{Diagram}\hlopt{(}\hlstd{graphics}\hlopt{));}\\
\hllin{52\ }\hlstd{}\hlstd{\ \ }\hlstd{}\hlkwb{connect}\hlstd{}\hlopt{(}\hlstd{star1.pin\textunderscore n}\hlopt{,\ }\hlstd{pin\textunderscore n}\hlopt{)\ }\hlstd{}\hlkwa{annotation\ }\hlstd{}\hlopt{(}\hlstd{Line}\hlopt{(}\\
\hllin{53\ }\hlstd{}\hlstd{\ \ \ \ \ \ }\hlstd{points}\hlopt{=\{\{}\hlstd{}\hlnum{38}\hlstd{}\hlopt{,{-}}\hlstd{}\hlnum{54}\hlstd{}\hlopt{\},\{}\hlstd{}\hlnum{38}\hlstd{}\hlopt{,{-}}\hlstd{}\hlnum{60}\hlstd{}\hlopt{\},\{}\hlstd{}\hlnum{98}\hlstd{}\hlopt{,{-}}\hlstd{}\hlnum{60}\hlstd{}\hlopt{\}\},}\\
\hllin{54\ }\hlstd{}\hlstd{\ \ \ \ \ \ }\hlstd{color}\hlopt{=\{}\hlstd{}\hlnum{0}\hlstd{}\hlopt{,}\hlstd{}\hlnum{0}\hlstd{}\hlopt{,}\hlstd{}\hlnum{255}\hlstd{}\hlopt{\},}\\
\hllin{55\ }\hlstd{}\hlstd{\ \ \ \ \ \ }\hlstd{smooth}\hlopt{=}\hlstd{Smooth.None}\hlopt{));}\\
\hllin{56\ }\hlstd{}\hlstd{\ \ }\hlstd{}\hlkwb{connect}\hlstd{}\hlopt{(}\hlstd{star.pin\textunderscore n}\hlopt{,\ }\hlstd{pin\textunderscore p}\hlopt{)\ }\hlstd{}\hlkwa{annotation\ }\hlstd{}\hlopt{(}\hlstd{Line}\hlopt{(}\\
\hllin{57\ }\hlstd{}\hlstd{\ \ \ \ \ \ }\hlstd{points}\hlopt{=\{\{}\hlstd{}\hlnum{38}\hlstd{}\hlopt{,}\hlstd{}\hlnum{48}\hlstd{}\hlopt{\},\{}\hlstd{}\hlnum{38}\hlstd{}\hlopt{,}\hlstd{}\hlnum{52}\hlstd{}\hlopt{\},\{}\hlstd{}\hlnum{98}\hlstd{}\hlopt{,}\hlstd{}\hlnum{52}\hlstd{}\hlopt{\}\},}\\
\hllin{58\ }\hlstd{}\hlstd{\ \ \ \ \ \ }\hlstd{color}\hlopt{=\{}\hlstd{}\hlnum{0}\hlstd{}\hlopt{,}\hlstd{}\hlnum{0}\hlstd{}\hlopt{,}\hlstd{}\hlnum{255}\hlstd{}\hlopt{\},}\\
\hllin{59\ }\hlstd{}\hlstd{\ \ \ \ \ \ }\hlstd{smooth}\hlopt{=}\hlstd{Smooth.None}\hlopt{));}\\
\hllin{60\ }\hlstd{}\hlstd{\ \ }\hlstd{}\hlkwb{connect}\hlstd{}\hlopt{(}\hlstd{idealDiode.plug\textunderscore p}\hlopt{,\ }\hlstd{positivePlug}\hlopt{)\ }\hlstd{}\hlkwa{annotation\ }\hlstd{}\hlopt{(}\hlstd{Line}\hlopt{(}\\
\hllin{61\ }\hlstd{}\hlstd{\ \ \ \ \ \ }\hlstd{points}\hlopt{=\{\{}\hlstd{}\hlnum{38}\hlstd{}\hlopt{,}\hlstd{}\hlnum{4}\hlstd{}\hlopt{\},\{}\hlstd{}\hlnum{38}\hlstd{}\hlopt{,}\hlstd{}\hlnum{0}\hlstd{}\hlopt{\},\{{-}}\hlstd{}\hlnum{20}\hlstd{}\hlopt{,}\hlstd{}\hlnum{0}\hlstd{}\hlopt{\}\},}\\
\hllin{62\ }\hlstd{}\hlstd{\ \ \ \ \ \ }\hlstd{color}\hlopt{=\{}\hlstd{}\hlnum{0}\hlstd{}\hlopt{,}\hlstd{}\hlnum{0}\hlstd{}\hlopt{,}\hlstd{}\hlnum{255}\hlstd{}\hlopt{\},}\\
\hllin{63\ }\hlstd{}\hlstd{\ \ \ \ \ \ }\hlstd{smooth}\hlopt{=}\hlstd{Smooth.None}\hlopt{));}\\
\hllin{64\ }\hlstd{}\hlstd{\ \ }\hlstd{}\hlkwb{connect}\hlstd{}\hlopt{(}\hlstd{positivePlug}\hlopt{,\ }\hlstd{idealDiode1.plug\textunderscore n}\hlopt{)\ }\hlstd{}\hlkwa{annotation\ }\hlstd{}\hlopt{(}\hlstd{Line}\hlopt{(}\\
\hllin{65\ }\hlstd{}\hlstd{\ \ \ \ \ \ }\hlstd{points}\hlopt{=\{\{{-}}\hlstd{}\hlnum{20}\hlstd{}\hlopt{,}\hlstd{}\hlnum{0}\hlstd{}\hlopt{\},\{}\hlstd{}\hlnum{38}\hlstd{}\hlopt{,}\hlstd{}\hlnum{0}\hlstd{}\hlopt{\},\{}\hlstd{}\hlnum{38}\hlstd{}\hlopt{,{-}}\hlstd{}\hlnum{10}\hlstd{}\hlopt{\}\},}\\
\hllin{66\ }\hlstd{}\hlstd{\ \ \ \ \ \ }\hlstd{color}\hlopt{=\{}\hlstd{}\hlnum{0}\hlstd{}\hlopt{,}\hlstd{}\hlnum{0}\hlstd{}\hlopt{,}\hlstd{}\hlnum{255}\hlstd{}\hlopt{\},}\\
\hllin{67\ }\hlstd{}\hlstd{\ \ \ \ \ \ }\hlstd{smooth}\hlopt{=}\hlstd{Smooth.None}\hlopt{));}\\
\hllin{68\ }\hlstd{}\hlkwa{end\ }\hlstd{Gleichrichter\textunderscore Mehrphasig}\hlopt{;}\hlstd{}\\
\mbox{}
\normalfont
\normalsize

 test test
%\pagecolor{bgcolor}
%\noindent
%\ttfamily
%\hlstd{}\hllin{\ 1\ }\hlkwa{model\ }\hlstd{Controller}\\
%\hllin{\ 2\ }\hlkwa{parameter\ }\hlstd{Real\ m\textunderscore min}\hlopt{=\ }\hlstd{}\hlnum{0.015311427}\hlstd{}\hlopt{;}\\
%\hllin{\ 3\ }\hlstd{}\hlkwa{parameter\ }\hlstd{Real\ n\textunderscore min}\hlopt{=}\hlstd{}\hlnum{11.4338135126}\hlstd{}\hlopt{;}\\
%\hllin{\ 4\ }\hlstd{}\hlkwa{parameter\ }\hlstd{Real\ m\textunderscore max}\hlopt{=}\hlstd{}\hlnum{-0.0031312692}\hlstd{}\hlopt{;}\\
%\hllin{\ 5\ }\hlstd{}\hlkwa{parameter\ }\hlstd{Real\ n\textunderscore max}\hlopt{=}\hlstd{}\hlnum{15.490328292}\hlstd{}\hlopt{;}\\
%\hllin{\ 6\ }\hlstd{}\hlstd{\ \ }\hlstd{Modelica.Blocks.Interfaces.RealInput\ u\ \\
%\hllin{\ 7\ }}\hlstd{\ \ \ \ }\hlstd{}\hlkwa{annotation\ }\hlstd{}\hlopt{(}\hlstd{Placement}\hlopt{(}\hlstd{transformation}\hlopt{(}\hlstd{extent}\hlopt{=\{\{{-}}\hlstd{}\hlnum{110}\hlstd{}\hlopt{,}\hlstd{}\hlnum{10}\hlstd{}\hlopt{\},\{{-}}\hlstd{}\hlnum{70}\hlstd{}\hlopt{,}\hlstd{}\hlnum{50}\hlstd{}\hlopt{\}\})));}\\
%\hllin{\ 8\ }\hlstd{}\hlstd{\ \ }\hlstd{Modelica.Blocks.Interfaces.RealInput\ t\ \\
%\hllin{\ 9\ }}\hlstd{\ \ \ \ }\hlstd{}\hlkwa{annotation\ }\hlstd{}\hlopt{(}\hlstd{Placement}\hlopt{(}\hlstd{transformation}\hlopt{(}\\
%\hllin{10\ }\hlstd{}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{extent}\hlopt{=\{\{{-}}\hlstd{}\hlnum{18}\hlstd{}\hlopt{,{-}}\hlstd{}\hlnum{18}\hlstd{}\hlopt{\},\{}\hlstd{}\hlnum{18}\hlstd{}\hlopt{,}\hlstd{}\hlnum{18}\hlstd{}\hlopt{\}\},}\\
%\hllin{11\ }\hlstd{}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{rotation}\hlopt{=}\hlstd{}\hlnum{270}\hlstd{}\hlopt{,}\\
%\hllin{12\ }\hlstd{}\hlstd{\ \ \ \ \ \ \ \ }\hlstd{origin}\hlopt{=\{}\hlstd{}\hlnum{10}\hlstd{}\hlopt{,}\hlstd{}\hlnum{98}\hlstd{}\hlopt{\})));}\\
%\hllin{13\ }\hlstd{}\hlstd{\ \ }\hlstd{Modelica.Blocks.Interfaces.BooleanOutput\ y\ \\
%\hllin{14\ }}\hlstd{\ \ \ \ }\hlstd{}\hlkwa{annotation\ }\hlstd{}\hlopt{(}\hlstd{Placement}\hlopt{(}\hlstd{transformation}\hlopt{(}\hlstd{extent}\hlopt{=\{\{}\hlstd{}\hlnum{90}\hlstd{}\hlopt{,}\hlstd{}\hlnum{18}\hlstd{}\hlopt{\},\{}\hlstd{}\hlnum{110}\hlstd{}\hlopt{,}\hlstd{}\hlnum{38}\hlstd{}\hlopt{\}\})));}\\
%\hllin{15\ }\hlstd{}\hlkwa{equation\ }\\
%\hllin{16\ }\hlstd{}\hlstd{\ \ }\hlstd{y\ }\hlopt{=(}\hlstd{u\ }\hlopt{$<$\ }\hlstd{m\textunderscore min}\hlopt{{*}}\hlstd{t}\hlopt{+}\hlstd{n\textunderscore min}\hlopt{)\ }\hlstd{}\hlkwa{or\ }\hlstd{}\hlopt{(}\hlstd{}\hlkwb{pre}\hlstd{}\hlopt{(}\hlstd{y}\hlopt{)\ }\hlstd{}\hlkwa{and\ not\ }\hlstd{}\hlopt{(}\hlstd{u\ }\hlopt{$>$\ }\hlstd{m\textunderscore max}\hlopt{{*}}\hlstd{t}\hlopt{+}\hlstd{n\textunderscore max}\hlopt{));}\\
%\hllin{17\ }\hlstd{}\hlstd{\ \ }\hlstd{}\hlkwa{annotation\ }\hlstd{}\hlopt{(}\hlstd{Diagram}\hlopt{(}\hlstd{graphics}\hlopt{));}\\
%\hllin{18\ }\hlstd{}\hlkwa{end\ }\hlstd{Controller}\hlopt{;}\hlstd{}\\
%\mbox{}
%\normalfont
%\normalsize
\end {document}
(* LaTeX generated by highlight 3.12, http://www.andre-simon.de/ *)

Verfasst: Fr 7. Dez 2012, 15:32
von bloodworks
Ach du liebe Schieße. Warum versuchst du nicht einen der üblichen Verdächtigen? So was wie das listings Paket oder minted zusammen mit pygemntize.

Dann hast du deinen Source Code auch im (TeX-)Source Code menschenlesbar.

Von irgendwelchen Insellösungen kann ich nur abraten.

Verfasst: Fr 7. Dez 2012, 15:43
von Martin__
bei listings habe ich immer das Problem das mit den Zeilenumbrüchen nicht hinhaut ich werde mir mal minted ansehen, aber naja lesbar müsste das auch nicht sein, ist nur im Anhang...

Verfasst: Fr 7. Dez 2012, 15:48
von bloodworks
Naja wenn du Probleme mit listings hast warum löst du die nicht einfach (oder lässt dir dabei helfen)?

Jedenfalls ist es ziehmlch dämlich Code ausserhalb von verabtim Umgebungen zu haben, da muss nur ein Steuerzeichen oder ein nicht im Textmode erlaubtes Zeichen auftreten, dann spuckt er dir schon Fehler aus. Und dein Machwerk da oben durchzusuchen würde ja noch gehen, aber wenn mal man richtig viel Code dokumentieren muss, dann wird man da schnell alt.

Verfasst: Fr 7. Dez 2012, 16:52
von Martin__
mhm das minted ist scheinbar unter windoofs nicht so leicht zulaufen zubekommen...
habe easy_install Pygments ausgeführt
dann den Buildbefehl auf folgedendes geändert...
pdflatex -shell-escape -interaction=nonstopmode %.tex|bibtex %|makeindex -s %.ist -t %i.alg -o %.acr %.acn|makeindex -s %.ist -t %.glg -o %.gls %.glo|makeindex -s %.ist -t %i.slg -o %.syi %.syg|pdflatex -shell-escape -interaction=nonstopmode %.tex|pdflatex -shell-escape -interaction=nonstopmode %.tex|"C:/Program Files (x86)/Adobe/Reader 10.0/Reader/AcroRd32.exe" %.pdf
dann bekommen folgenden Fehler
D:\Users\Martin\Dropbox\Simulation_1\Doku\simulation1.aex konnte nicht gefunden werden

Der Befehl "pygmentize" ist entweder falsch geschrieben oder konnte nicht gefunden werden.

Und das war das beste ergebniss als ich noch Code Highlighting für Modelica gesucht habe, ist nicht sonderlich verbreitet wie c und co ;)


was ich zu listing gefunden habe war das hier:
\documentclass[12pt,a4paper,parskip=full-]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[german]{babel}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{makeidx}
\usepackage{graphicx}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\usepackage{nomencl}
\usepackage{color} 
\definecolor{bgcolor}{rgb}{0,0,0} 
\definecolor{string}{rgb}{1,0,0} 
\definecolor{darkblue}{rgb}{0,0,.75} 
\definecolor{darkred}{rgb}{.75,0,0} 
\definecolor{darkgreen}{rgb}{0,.75,0} 

\usepackage{latexsym,multicol,pstricks}
\usepackage{listings}
\lstdefinelanguage{modelica}{%
    alsoletter={...},%
    otherkeywords={-, =, +, [, ], (, ), \{, \}, :, *, !},%
    morekeywords=[1]{},% blue Keywords
    morekeywords=[2]{% blue + bold keywords
        annotation,assert,block,class,connector,constant,discrete,%
        else,elseif,elsewhen,end,exit,extends,external,final,flow,for,%
        function,if,in,inner,input,import,loop,model,nondiscrete,outer,%
        output,package,parameter,partial,record,redeclare,replaceable,return,%
        size,terminate,then,type,when,while,algorithm,equation,%
        protected,public,and,false,not,or,true},%
    morekeywords=[3]{% red keywords
        abs,acos,asin,atan,atan2,connect,cos,cosh,cross,der,edge,exp,%
        initial,noEvent,pre,reinit,sample,sign,sin,sinh,tan,tanh,terminal,%
        start,Real,Integer,Boolean,String},%
    comment=[l][\color{darkgreen}]{//}, % comment lines
    morecomment=[s][\color{darkgreen}]{/*}{*/}, % comment blocs
    morestring=[b][\color{darkgreen}]{'}, %
    morestring=[b][\color{darkgreen}]{"},
}[keywords,comments,strings]

\begin{document}
\begin{lstlisting}[language=modelica]
model Controller
parameter Real m_min= 0.015311427;
parameter Real n_min=11.4338135126;
parameter Real m_max=-0.0031312692;
parameter Real n_max=15.490328292;
  Modelica.Blocks.Interfaces.RealInput u 
    annotation (Placement(transformation(extent={{-110,10},{-70,50}})));
  Modelica.Blocks.Interfaces.RealInput t 
    annotation (Placement(transformation(
        extent={{-18,-18},{18,18}},
        rotation=270,
        origin={10,98})));
  Modelica.Blocks.Interfaces.BooleanOutput y 
    annotation (Placement(transformation(extent={{90,18},{110,38}})));
equation 
  y =(u < m_min*t+n_min) or (pre(y) and not (u > m_max*t+n_max));
  annotation (Diagram(graphics));
end Controller;

\end{lstlisting}
\end{document}
Aber sieht nunja nicht gerade toll aus...

Verfasst: Fr 7. Dez 2012, 17:01
von bloodworks
Naja also Betriebssysteme die so grundlegende Dinge wie perl nicht von Anfang an mitbrigen, sollte man ohnehin meiden.

Die Installation und so hatten wir aber letztens schonmal: http://www.golatex.de/syntaxhervorhebun ... ntize.html

(gefunden durch Forensuche;) )

Verfasst: Fr 7. Dez 2012, 17:20
von Martin__
mhm ich muss es leider nutzen *seuftz* da linux nicht mit der Programmkombi läuft die ich brauche also muss ich in dem Fall da durch, also naja ich habe oben noch was zum listing rein gemacht...

und zum minted das was in dem Thread steht habe ich eigentlich alles gemacht
D:\Python27\Scripts>dir
 Verzeichnis von D:\Python27\Scripts

07.12.2012  16:44    <DIR>          .
07.12.2012  16:44    <DIR>          ..
07.12.2012  16:28               348 easy_install-2.7-script.py
07.12.2012  16:28            69.632 easy_install-2.7.exe
07.12.2012  16:28               340 easy_install-script.py
07.12.2012  16:28            69.632 easy_install.exe
07.12.2012  16:44               321 pygmentize-script.py
07.12.2012  16:44            69.632 pygmentize.exe
               6 Datei(en),        209.905 Bytes
               2 Verzeichnis(se), 364.787.052.544 Bytes frei
eigentlich alles da und Pfad gesetzt naja Windoofs halt, ka warum so viele drauf stehen und dafür auch noch bezahlen

Verfasst: Fr 7. Dez 2012, 17:29
von bloodworks
Naja da würde ich aber mal in die Pfad Variablen reinschaun ob das auch wirklich da drinn steht.

Verfasst: Fr 7. Dez 2012, 18:07
von Martin__
ist alles gesetzt :( ich ziehe jetzt wohl das windoofs in ne virtuelle um und gucke ob linux das tut was ich möchte

Verfasst: Fr 7. Dez 2012, 18:18
von bloodworks
Kannst du pygmentize von der Shell (bzw cmd) direkt aufrufen? Wenn ja könnte es auch am Editor liegen.

zB
pygmentize -L lexers
müsste die verfügbaren Sprachen auswerfen.