Spacemacs yellow line - highlight

I am a novice when use Spacemacs. when edit c++ files. there are yellow highlight lines. so I want to disable the yellow highlight and what does the yellow hightlight means?

The yellow highlights are whitespace. If you do not want whitespace to show you can add (setq show-trailing-whitespace nil) to the dotspacemacs/user-config section in your .spacemacs (open with SPC f e d and reload with SPC f e R).
I prefer to keep the whitespace highlighting enabled and remove trailing whitespace automatically. This can be done by changing the variable dotspacemacs-whitespace-cleanup in dotspacemacs/init to 'all, 'trailing or 'changed.

Related

Alignment in flextable correct in Rstudio viewer, incorrect in Word

I am trying to left align some columns in a few of my tables. Most of the time this works no problem, but other times, the columns selected with:
ft <-align(ft, j=1:2, align = "left", part = "body")
ft <-align(ft, j=4:6, align = "left", part = "body")
look correct in the Rstudio viewer. I used a loop to make 39 tables and want to add them to a word document using officer
However, when printed to a word doc using:
doc <- read_docx() %>%
body_add_flextable(tab0)
body_add_break(doc, pos="after")
for (i in 1:38) {
body_add_flextable(doc,get(paste0("tab", i)), align = "left")
body_add_break(doc, pos="after")
}
print(doc,target=documentname)
it center aligns the columns (only changes those that were left aligned). When I click on the text, it says that they are left aligned, but then I center and re-left align and that fixes the issue. I have only noticed the issue which character variables
I tried triming whitespace with
trimws() before I make the flextable with no luck.
I tried other alignments and the issue only seems to occur with left alignment.
I don't believe my code to be wrong, since it works for my other tables. Therefore, I think trying to make reproducible code would be a waste of time.
Therefore, I'm assuming the text itself is causing the issue? Does anyone know what could be wrong with the character variables themselves? Or any other ideas?
Fixed it...
Somewhere within my flextable manipulation this leading white space was added.
So trimming white space before didn't do anything. Had to trim right before naming my table (within a loop). Here is the loop I used to correct it.
for (j in 1: length(ft[["body"]][["content"]][["content"]][["data"]])){
ft[["body"]][["content"]][["content"]][["data"]][[j]][["txt"]] <- trimws(ft[["body"]][["content"]][["content"]][["data"]][[j]][["txt"]])
}

Tikz: Align Drop Line to left of box when single line of text is present in node

I am playing with the example from Tikz located here. When I change the text from "Defining nodes and arrow styles" to "Defining nodes" the line dropping to the children of this node shifts to the right.
Is there a way to make the line always be set to the left of the box surrounding "Defining node" like when there are two lines of text?
The trick to making sure the trailing lines were always to one side of the next level, in this case forcing the line to shift to the left of the "Defining node" block, is simply a switch from
c1.195
to
c1.west
in the \foreach statements seen in the example of the original post.

Align UITextView Right and Left.

I have UITextView, which is left aligned.
When last word does not fit on current line it goes to next line leaving spaces on end of line.
which does not give good look and feel.
So, what I want that if words of particular line feels the spaces left at end.
i.e. Spaces between two words can dynamically varies.
Here I am giving example of Scenario:
The width of text view,never put off until (here tomorrow does not fit,so it goes to next line leaving spaces).
Tomorrow what you can avoid all together.
So, problem is it does look good.
What I want is:
The width of text view never put off, until (varying spaces shown by)
tomorrow -what -you -can
avoid --all -- together.
Thanks in Advance.
There is no setting for justified aligment for text you only have center, left and right. If you want justified aligment where every line has the same amount of characters or something like that you can format the text entered to have carriage returns after x amount of characters or words, or something like that.

Non-breaking space between lines

How could I join two HAML lines with a non-breaking space (& nbsp;) and no actual space, e.g.:
= 'foo'
%a(href='http://example.com') bar
I tried using the succeed helper, but a space is still generated between them. I want to remove the space.
How did you use succeed? Where did the space end up?
Did you combine it with the whitespace removal chars ("<" and ">") or try them on their own?
= succeed ' '.html_safe do
= 'foo'
%a(href='http://example.com')> bar
This produces:
foo <a href='http://example.com'>bar</a>
Is that literally what you want? It is "two lines joined by a non-breaking space with no actual space."
(IMO, HAML is meh for inline content, and just no fun. Nice for layout.)

How to set tab stops after whitespaces in LaTeX?

I'm trying to set tab stops in LaTeX in the tabbing environment. My problem is that I want to set a tab stop after a number of whitespaces. The problem is that LaTeX of course ignores multiple whitespaces, and it seems to only support setting tab stops after actual text.
What I would like to be able to do is format the arrows below so that they line up together.
A -> B
CD -> A
BDD -> F
The problem is that the extra spaces after the characters on the left of the arrows are ignored for the purposes of setting the tab stop. What is the solution?
The tabbing environment allows to set tab stops and position text accordingly; it may be used to simulate simple tables.
\= in the first line sets a tab stop, \> advances to the next tab stop in the second line and below.
Please note that tabbing does not expand tab stops, so you need to ensure they are placed wide enough from each other. For example, I put some nonbreakable spaces after A in the first line:
\begin{tabbing}
A~~~~ \= $\to$ \= B \\
CD \> $\to$ \> A \\
BDD \> $\to$ \> F \\
\end{tabbing}
The result looks like
Using tables (e.g. tabular) is often easier, but tabbing allows to redefine tab points later, so it may be used to simulate indented text, like source code.
See also: LaTeX: tabbing.
If you want this in math mode, put \usepackage{amsmath} in your preamble, and try
\begin{align*}
A &\to B \\
CD &\to A
\end{align*}
The ampersands are invisible, and are aligned with each other, so the arrows will line up.
This can also be done in text mode as a table (without needing the amsmath package):
\begin{tabular}{r #{$\to$} l}
A & B \\
CD & A
\end{tabular}
With the # expression in the column specification, the columns will be separated by whatever symbol you like -- in this case, the arrow -- thus aligning that symbol between rows.
Use {\hskip 4em} to specify whitespace four font-width spaces wide, or what have you. There are a number of prespecified whitespace characters in Latex, such as \qquad for \hskip2em.
\hskip whitespace specified in this way is inflexible, that is, Tex will not change the amount of whitespace, but you can use something like {\hskip 3em plus 1em minus 1em} for space that tries to be 3ems long, but can stretch or shorten to between 2ems and 4ems.
If you want to use tabbing (instead of e.g. tabular), you can use kill to make a "template" line that sets the stops. See http://latex.computersci.org/Reference/TableEnvironments.

Resources