Does anyone know how to fix the Lua syntax highlighting in Kdevelop. The # symbol used to get the length of a table causes the remainder of the line to appear as if it is commented out.
t[#t+1] = "foo"
I don't know anything about Lua so I can't give you specific code, but to fix the highlighting you'd have to edit the KatePart Lua syntax highlighting file, located at $KDEDIR/share/apps/katepart/syntax/lua.xml (on my system $KDEDIR is /usr/kde/3.5). You can find a description of the XML format at http://kate-editor.org/article/writing_a_kate_highlighting_xml_file... they're not the clearest directions but I haven't found anything else equivalent. Thankfully there are plenty of examples included with KDE.
Related
I need help importing a library to Xamarin. I included the library and inserted it into a new folder named BarcodeScanner, and the name of the library is libBarcodeScanner.a.
gcc_flags "-L${ProjectDir} -lBarcodeScanner -force_load ${ProjectDir}/libBarcodeScanner.a”
But it shows an error:
Error: Could not parse additional mtouch arguments: No matching quote found.
What should i do ?
Do i need to create a binding project to use a library like BarcodeScanner ?
Error: Could not parse additional mtouch arguments: No matching quote found.
That does not look like a Xamarin.iOS (mtouch) error message. Those start with a MT prefix followed by 4 numbers, e.g. MT2001. Could it be Xamarin Studio giving you this error ?
What should i do ?
Review the flags: are they identical to what's pasted above ?
No matching quote found. makes is sound there's an extra quote in there. Maybe one of the " is wrong (e.g. a autocorrection giving you a smart quote) ?
Or maybe your project directory (replaced from ${ProjectDir} contains a quote character ?
Also can you edit your question to add which version of Xamarin Studio you're using ?
Do i need to create a binding project to use a library like BarcodeScanner ?
No, but it's the preferred ways to link static libraries. Using a binding project removed the need to add Additional mtouch arguments inside every projects and every build configuration (e.g. Debug, Release...) of your applications.
I will answer my own question, maybe it will help someone. I declared in my MainController that i needed:
using MonoTouch.CoreVideo;
using MonoTouch.CoreMedia;
using MonoTouch.CoreGraphics;
using MonoTouch.CoreFoundation;
And after that i referenced only the static library with:
-gcc_flags "-L${ProjectDir} -lBarcodeScanner -force_load ${ProjectDir}/libBarcodeScanner.a"
#poupou's "maybe" was spot on, but I'll be pedantic and explain exactly.
Look closely at this line I just quoted from your original question. I've marked it down using code (four spaces prefix per line), and broke it into two lines. Nothing else has been changed. Hopefully the error should be obvious now:
- gcc_flags "-L${ProjectDir} -lBarcodeScanner
-force_load ${ProjectDir}/libBarcodeScanner.a”
Essentially, you used different types of double quotes. The first double-quote character above is Unicode 0x0022, which is the regular Quotation Mark. The second double-quote character above is Unicode 0x8221, or Right Double Quotation Mark. It might be that you had copied & pasted all or part of the line above from a web page, rather than typing it in.
For command-line processing, mixing your styles of double quotes simply won't work. You'll need to use balanced regular quotation marks, as you wrote in your own answer just now (but might not have specifically noticed?) FWIW, the right- and left- variants of the quotation mark are usually used for word processing, web pages, etc. where the style aesthetic matters.
Since you didn't use code-markup when quoting that line originally (while I noticed you did, in your recently posted answer) it looks like Stack Overflow "helpfully" tried to render the quotes as similar in style, fooling us into looking elsewhere for the problem, when it was right in front of us.
Anyway, next time you get an error about mismatched quotes, I suggest you carefully check their type. If they look the least bit different, they may not be the right kind of quotes.
When doing many different (obviously) wrong things in A++ syntax I only get "Syntax error" in Description and some number (Err:9999) in Diagnostic ID. This does not help me at all finding out whats wrong so I can fix it. No hint, no nothing!
This is compile time syntax errors that the IDE should just hand to me.
So how can I get more detailed information about what is wrong?
When you doubleclick on a syntax error line in the compiler output window, the code editor window opens and displays the code with the syntax error. The part of the code with the error is marked with a red squiggly underline and the cursor is placed at the start of the syntax error. This should make it easy to find out what is wrong.
In addition to what j.a.estevan suggested, in my experience syntax errors also occur because
you forget the second = symbol in the where part of a select statement
you unintentionally add a second = symbol when assigning the value of a variable
you delete a variable in the classDeclaration of a class/form, but it is still used in one of the methods
a macro is changed/deleted
an object is changed/deleted and the cross references were not up to date or not checked
There is no way of showing more information that this "Syntax error" for that error type. Almost always is a missing semicolon or brackets dispaired.
I have a code block in an org document
#+NAME: result_whatever
#+BEGIN_SRC python :session data :results value :exports none
return(8.1 - 5)
#+END_SRC
which I evaluate inline:
Now, does this work? Let's see: call_result_whatever(). I'd be surprised ...
When exporting to LaTeX, this generates the following:
Now, does this work? Let's see: \texttt{3.1}. I'd be surprised \ldots{}
However, I don't want the results to be displayed in monospace. I want it to be formatted in "normal" upright font, without any special markup.
How can I achieve this?
You should be able to get it work using the optional header arguments which can be added to call_function().
I don't have LaTeX installed on this system so can't fully test the outputs to ensure they come out exactly as desired, I'm using the plain text output to compare instead. However you can use the following syntax as part of your call to modify the results.
Now, does this work? Let's see call_results_whatever()[:results raw].
I'd be surprised ...
Without the [:results raw] the output to Plain Text (Ascii buffer) is Let's see `3.0999999999999996'.. With the added results it becomes Let's see 3.0999999999999996.
For full details of the available results keywords as well as other optional header arguments for the inline blocks please see Evaluation Code Blocks and Results arguments.
this is 5 years later. apparently in org-mode 8.2 or so, a new variable was introduced (documenting in "Evaluating Code Blocks" in the org-mode manual, but this from etc/ORG-NEWS in the source tree):
*** New option: org-babel-inline-result-wrap
If you set this to the following
: (setq org-babel-inline-result-wrap "$%s$")
then inline code snippets will be wrapped into the formatting string.
so, to eliminate \texttt{}
(setq org-babel-inline-result-wrap "%s")
The problem of this type can be solved in two ways:
1: Easy does it:
A plain query-replace on the exported buffer.
Once you're in the LaTeX buffer,
beginning-of-buffer or M-<
query-replace or M-%
enter \texttt as the string that you want to replace
enter nothing as the replacement
continue to replace each match interactively
with y/n or just replace everything with !
2: But I wanna!
The second way is to nag the org-mode mailing list into
implementing a switch or an option for your specific case.
While it's necessary sometimes, it also produces a system
with thousands of switches, which can become unwieldy.
You can try, but I don't recommend.
While it is easy enough to set the language for a given (open) file in Sublime Text, I'm wondering if there is any way that I can tell the editor in advance that anything called "Guardfile" should be highlighted like it's Ruby code. Does anyone know how to do this?
The plugins recommended in the comments by Brian both do the job nicely:
ApplySyntax
SyntaxFromFileName
Update:
I couldn't get SyntaxFromFileName to match any of my regex for some reason. On the other hand, DetectSyntax comes with syntax highlight for the Guardfile built in.
Update2:
DetectSyntax has been renamed to ApplySyntax
Putting the following at the top of said file also works
#!/usr/bin/env ruby
In LaTeX, the \includeonly statement exists to selectively add or exclude sub-documents.
One quirk in the whole process is that when sections are excluded, LaTeX decides to insert a page-break. The article at To have no pagebreak after \include in LaTeX recommends using newclude to avoid this issue. This package defines \include* which provides a work-around by omitting the implied \clearpage.
I am occasionally seeing the behaviour where if I comment out lines of my \includeonly statement the sub-document still gets included. Has anyone else seen this behaviour?
For whatever reason, everything is now working as it should.
Just in case the order of the \usepackage directives is important, in the working version \usepackage{newclude} is the first command after \documentclass{article}.
It's not a bug, it's a feature. Really. Does \input do what you need, rather than \include?