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

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.

Related

Vertically centered line in text with custom length

I am trying to create a vertically centered line inside normal text. I also want to control length and width of the line as the dash or "---" are to thin and/or short.
I want something like the math-command \rule{length}{width}, which is centered like a dash and not floored.
Example (not created with Latex)
Simply put, \rule can be raised just by specifying how high you want it.
\rule[0.5ex]{1in}{0.4pt}
raises a \rule{1in}{0.4pt} 0.5ex above the baseline.

Is it possible to simulate a erase action without having to create an extra shape in KonvaJS?

I am following this guide which contains a brush and eraser functionality. The guide's code sets the "globalCompositeOperation" to "destination-out" and basically ends up creating another line that will cover whatever you have drawn before with the brush.
This would work pretty well in some cases, but if I made my "destination-out" lines not-draggable and the "source-over" lines draggable, then if I drag the "source-over" lines around the canvas these lines would still be intact and it would not look like as if they were erased.
In a better attempt to explain my problem, I provide you this example: If I were to create two parallel lines, line1(x1,y1) and line2(x2,y2), and then I decide to draw a "destination-out" line in the middle of both, is there a way I can keep that "erased" part in the middle of line1 and line2 if I were to move one of the lines away from the "destination-out" line?
I'm sure it is not like this, but is it possible to change certain points inside the line as "destination-out" while the rest of the points are "source-over" If not, how can we simulate this action without having to create a long static extra "destination-out" line?

paracol and footnote placing in Latex

For my current project I need two text lined up in two column. The idea is that one column shows the original language and the second column its translation, neatly lined up line by line. The package paracol does what I want except for one thing: footnote placement.
If one of the columns has a footnote and the other hasn't, the lines of the original and the translation do not stay together. The footnote disrupts the lining up of lines.
This is an example in which you can see that "some other text that should be next to the line in the left column" is not lined up with the lines of the original. All because of the footnote.
\documentclass[twoside,a4paper,11pt]{book}
\usepackage{paracol}
\usepackage{lipsum}
\begin{document}
\begin{paracol}{2}
\lipsum[1-2]
\switchcolumn
\lipsum[1-2]
\switchcolumn
text with footnote\footnote{the footnote}
and some other text
\switchcolumn
the translation without footnote
some other text that should be next to the line in the left column
\end{paracol}
\end{document}
As you can see, the footnote disrupts the alignment of lines. How to remedy this?
I found the solution to my own problem by adding the following line after loading the paracol package:
\footnotelayout{p}
This ensures that footnotes are layed out for the whole page instead of the default of per column.
(Since I also added footmisc with the perpage parameter, I also had to delete the perpage parameter and add this:
\usepackage{everypage}
\AddEverypageHook{\setcounter{footnote}{0}} % resets footnote counter on every page
)

Alignment of UILabel and word wrapping with right-to-left language

I have a view that has an image, and to the left it is a long block of text that may take up multiple lines. In English, the first line might be full, and on the second line it may only take up half of the left side of the screen. When using Arabic, should the text be aligned towards the right side, where the first line is full, but the second line takes up half of the line and is aligned with the right?
I am using Auto Layout. Is there something, like the hugging settings, that I want to adjust?

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.

Resources