I would like to know if it is possible to highlight a cross-reference by editing an RStudio theme. Right now, I am able to do this for my references by adding the following to an rstheme (credit to Diego Trindade's answer here):
.ace_list, .ace_markup.ace_list, .ace_storage {color: #66db80;}
This highlights anything in my text that looks:
#article_referenced
I would like to do the same thing but for cross-references that call a code chunk label:
\#ref(fig:chunk-label)
But I am not sure if this is possible. The reference from RStudio only mentions the most common things that I can change, but nothing related to this. If anyone knows how to do this or any documentation I could go to for a more complete reference I would really appreciate it.
Related
I found several screenshots of R code like I show below, on Twitter and sometimes on Facebook. I wonder how people do it, because it can use also in Powerpoint or Beamer presentations. The code in the following screenshots are irrelevant for this question, I'm only wandering how to prepare or stylised those.
Thanks.
These are usually generated via third-party services such as Carbon. It's pretty straight-forward and you can customize all kinds of things like background color and code highlighting.
Feel free to check out their About section and their GitHub.
I'm aware of the different abilities to highlight based on filetype, but what I'm looking for is something similar to how in a typical text editor you can highlight a line (not just change the color text).
Is this possible to do in the Atom editor? If so, how do you do it? Is there a plugin for this?
The reason I want to do this is for organizational purposes, and sometimes the files I am working in our custom files that are not necessarily code but documentation (usually both are together in the same file), and the documentation part is where I want to add these highlights.
The only Atom package I know of that has a somewhat similar functionality is the bookmarks package.
It is an Atom core package, so you most likely have it installed already.
It might not be exactly what you were looking for, since it only allows setting bookmarks on lines of your open files.
As soon as you close a file, the bookmarks are lost.
But while working on several opened files, it can be very useful to quickly navigate through these bookmarks.
The reason why no package like you asked for exists, probably is that it would be really hard or at least impractical to implement.
Imagine you set dozends of highlights on a file which is under version control (git, svn, etc.) and then pull in a newer version of this file where several lines were added, removed, changed, shifted ...
To still be able to show the highlights on the correct lines, the information of such highlights would need to be under the same version control. Essentially you would need to store this highlight on the line itself, which would mean everybody had the same highlights, which is probably not what you want. Because if you wanted that, you could just format your documentation with markdown or similar in the first place ;)
Is there a way to disable syntax highlighting in Atom.io?
I have searched a bit and ended up creating my own syntax package (https://atom.io/themes/no-syntax-highlighting-syntax), but maybe there is a better way.
NB: I just want to disable syntax highlighting (ideally keeping only comments and code in a different color), but I still want the other language-related features of Atom.io working. Like language completions, language snippets, language closure/bloc detections, auto-indent, etc.
(Some people argues against syntax highlighting, stating it might be actually harmful to developer productivity. I wanted to try that. Ie. http://www.linusakesson.net/programming/syntaxhighlighting/ and https://www.robertmelton.com/2016/03/21/syntax-highlighting-off/)
You can use Ctrl+Shift+L (or press button bottom right) to select proper language. In your case it would be Plain Text.
Second option is install package https://atom.io/packages/file-types and add in config.cson:
'file-types':
'YOURS EXTENSION': 'text.plain'
Haven't found a better solution yet.
If you are trying to do the same thing as I was - disabling syntax highlighting in Atom.io while keeping comments differentiated, language completions, language snippets, language closure/bloc detections and auto-indent - I would just recommend to install the theme I've created: https://atom.io/themes/no-syntax-highlighting-syntax
Set the file syntax to plain text. You can do this with control alt L or something like that.
Does anyone know of a way to prevent Sublime Text 3 converting sass variables on pressing tab?
For example, I might type $variable-name and then press tab, intending to insert the : and space, which would be the normal CSS behaviour. Within doc type sass, I get 1variable-name:; instead.
It's rather annoying to have to correct every time, and I'm sure others get irritated with the same. I have the Sass and Emmet packages installed.
Many thanks. Your help is much appreciated.
Too long for a comment...
So I did a little digging last night, and from what I can tell this behavior is hard-coded into Sublime. The command that's executed when Tab is pressed right after a variable is expand_abbreviation_by_tab. Many times, Sublime commands are implemented in .py files, and can so be edited to suit your needs. Unfortunately, I was unable to find any mention of this command anywhere, leading me to believe that it's hard-coded. I suppose a workaround would be to enter a space before hitting Tab, if your end goal is to have the colons : aligned with each other. Another option would be to use the Alignment plugin, available through Package Control. It's very configurable, and I highly recommend it.
I've been using footnotes in markdown pages as mentioned in this post on DaringFireball, but I can't seem to figure out how to get them styled the way I want. Adding .footnotes {} to my style sheet allows me to style the footnote text, but I'm missing two things:
In Gruber's post, his footnote's backlink is given a style "a.footnoteBackLink," but my page simply produces "a href="link" rev="footnote". I don't know how to call this in CSS and I have no idea how I'd change it so that my markdown page outputs any differently. My backlink goes to a separate line, and I'd like to have it on the same line. Perhaps this is an issue with the markdown engine; I'm using Maruku (I think), and I could probably figure out how to change it if I knew which one I should use instead.
No matter what I put in the footnote brackets, the page outputs numbered footnotes. How can I tell it to use asterisks or other symbols? Most pages with footnotes will have only one or two, and symbols are generally correct when there are less than seven footnotes, so I'd like to do things proper.
I probably shouldn't even say this, but I've been teaching myself web development for the past couple of months and I absolutely could not have done it without SO. This is the first time I haven't found my answer here, so it's my first time asking. I love you don't get mad at me please.
There is a great variety of conversion tools out there. Each may have a different way of handling this. I found remarkable a good choice for your issue. It adds the class "footnote-item" to each footnote.
Check the live demo and inspect the HTML Output.