-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plenty of error messages involving xcolor #49
Comments
It looks like the error comes from overwriting the basicstyle property here. |
My understanding is that Just for fun, I selected Matlab as language, and I was able to generate an acceptable output for me with the following commands
Regarding the
then the |
Well, your understanding of For example, if you did it like this
you might be ok with the ≈ symbol, but all other special symbols you use will cause you trouble because you would essentially need to define them all with the \documentclass[11pt,a4paper]{article}
% Code blocks definitions: Julia style
% Using https://github.com/wg030/jlcode
% Download the jlcode.sty from that repository
\usepackage[theme=grayscale-plain]{jlcode}
\begin{document}
\begin{jllisting}
using FaultDetectionTools, DescriptorSystems, Test
# Example 5.4 - Solution of an EFDP
println("Example 5.4")
# define s as an improper transfer function
s = rtf('s');
# define Gu(s), Gd(s), Gf(s)
Gu = [(s+1)/(s-2); (s+2)/(s-3)]; # enter Gu(s)
Gd = [(s-1)/(s+2); 0]; # enter Gd(s)
Gf = [(s+1)/(s-2) 0; (s+2)/(s-3) 1]; # enter Gf(s)
p = 2; mu = 1; md = 1; mf = 2; # set dimensions
# compute a left nullspace basis Q of [Gu Gd; I 0]
Q1 = glnull(dss([Gu Gd;eye(mu,mu+md)]))[1];
# compute Rf1 = Q1[Gf;0]
Rf1 = gir(Q1*dss([Gf;zeros(mu,mf)]));
# check solvability using a random frequency
if minimum(abs.(evalfr(Rf1,rand()))) > 0.01
# compute a stable left coprime factorization [Q1 Rf1]=inv(Q3)*[Q,Rf]
# enforce stability degree -3
Q_Rf, Q3 = glcf([Q1 Rf1];sdeg = -3);
# extract Q and Rf
Q = Q_Rf[:,1:p+mu]; Rf = Q_Rf[:,p+mu+1:end];
scale = evalfr(Rf[1,1],Inf)[1,1]
Q = Q/scale; Rf = Rf/scale;
@test gpole(Q) ≈ [-3] && gpole(Rf) ≈ [-3] && fditspec_(Rf) == Bool[1 1] &&
iszero(Rf - Q*dss([Gf;zeros(mu,mf)]),atol=1.e-7) &&
iszero(Q*dss([Gu Gd;eye(mu,mu+md)]),atol=1.e-7)
# normalize Q and Rf to match example
println(" Q = $(dss2rm(Q,atol=1.e-7))")
println(" Rf = $(dss2rm(Rf,atol=1.e-7))")
else
@info "No solution exists"
end
\end{jllisting}
\end{document} and get a nice smooth output of their code and this is exactly what his package does and is actually supposed to do. |
Thanks for your time and I fully agree with your points. However, for my purposes the output of the above code is not satisfactory and therefore I need more flexibility to modify a selected theme (e.g., I need boldface fonts and dark code text to make the code more visible). Since in the meantime I found an alternative solution which suits my goals, I will close all issues which I opened. |
Well, if the standard themes are not sufficiently satisfying for your needs, then yes, as of now, you would need to make some efforts by modifying the jlcode.sty file yourself if you want to go with this package. I might consider to add a few more new options myself in the future and/or at least give a hint for that kind of error in the manual. Hence I will reopen this issue in order to be reminded of doing so. |
I also have some (168) errors using this .sty: |
Well, that sounds like a similar problem. |
I was not able to run Latex using TexStudio on the following text file without obtaining plenty of error messages involving xcolor. All messages resemble the following one:
Package xcolor Error: Undefined color
jlbase'. ...ultDetectionTools, DescriptorSystems, Test`Here is the contents of the text file:
I tried all three alternative ways to load
jlcode.sty
. The output file looks approximately as expectedI wonder what I am doing wrong.
The text was updated successfully, but these errors were encountered: