ASCII diagram formatting messed up in Nroff - ascii

I am using Nroffeditor to develop a rfc like document and adding a ascii diagram, which I handcrafted. There is a online tool asciiflow.com, which can also be used.
When I paste the ASCII diagram in the NroffEditor, it shows a messed up diagram in the generated .txt file on the right. I am not sure if it does not recognize the new line character properly, but I get the output as shown below.
This is what I paste in .nroff file.
This is what I get in the generated .txt file.
Can someone pls help why this is happening?

I figured the solution, and we need to enclose the ASCII diagram within following two control sequences.
.nf
< Paste your ASCII diagram >
.fi

Related

How can I colour my code?

A student in another class coloured their code in their word document, I asked my teacher if he knew how and he suggested he coloured it all by hand... I'm very sure he didn't colour hundreds of lines of code by hand.
I've also seen many websites that colour the code snippets to help with readability - including StackOverflow!
Here's a print screen of the code contained in the word document.
as you can see they're not print-screens as not only can I highlight the text, word has underlined what it thinks are errors in spelling / grammar.
When you copy-paste into a Word document, it (by default) retains the formatting of the text copied into it. IDEs (e.g., Visual Studio, Eclipse, IntelliJ, etc.) usually perform syntax highlighting (i.e., color different elements of the code differently in order to highlight their purpose) for you. If you copy and paste from the IDE you've used to create the code, it will probably retain this formatting.

Multiple margins in Atom Editor?

Using Atom Editor, I can change the position of the vertical margin from
File > Settings > Preferred Line Length
Is there a way to add multiple margins?
You can if you install the omni-ruler plugin.
I'm amazed as how dificult is for everyone to understand the problem.
Being a "stack overflow" user, you would expect to find many user with experience on the problem of working with [fixed-width-fields] text files.
is not a text file with a long line.
is data contained in those lines, that need to be make easier for human eye to check.
that being said, the besto solution so far fo me is:
https://www.ultraedit.com/support/tutorials-power-tips/ultraedit/column-markers.html

Arabic/Persian label Matlab figure

Matlab cannot display Arabic/Persian labels of the figure. Also I cannot see my installed fonts and I don't want to add the labels by another program. How can I fix this problem?
What you're looking for is a way to display unicode characters in axes labels.
It seems that this problem was encountered before, but there's no simple solution for it. See workarounds here and here.
One important thing though - do not edit .m files containing unicode\utf-8 characters (such as Arabic, Farsi, Hebrew, Chinese, etc...) in MATLAB, because it messes up the characters upon saving. Use an external editor (like Notepad++) to edit and save the files (as UTF-8 without BOM), and only run in MATLAB.

How to Highlight Text in PDF with commandline (windows)?

I'm looking for a way to highlight words (e.g."some words [0-9]") or better the whole line with the given words in it, in some onesided PDFs.
It will be part of a Batch-process on Windows, so i need a command line way to do this. I've looked at Ghostscript, but can not see how it is to be used.
hope i didnt made something wrong - i looked into other questions, mainly Add comments to PDF files automagically with regular expressions but this helped me not really, also english is not my native language - as you maybe have noticed already.
Thanks in advance
Ghostscript can't do this. Generalized text tools also can't because (1) most PDF's have the text commands in compressed blocks, and (2) text often is not 'encoded' in any standard way. Sometimes the font provides a ToUnicode map, but often not even that and (3) what looks like text may not even be text -- it may just be bitmapped images.
A tool like 'mutool clean -d' and "expand" a PDF so that (1) is solved -- text commands can be found in the PDF, but you still may have things like:
(!"##$) Tj
instead of Hello because of (2). And then there's the other way kerned text is done in PDF, even if standard encoding is used:
[(H) 120 (e) 80 (l) 95 (l) 95 (o)] TJ
It might be possible, but very difficult, and would require programming, and still would not address (3) (that would require OCR of the bitmapped text).

Diff visualization algorithm

Is there any description of a diff/patch format visualization algorithm? (or maybe it is too trivial to be described)
The Rietveld code review tool has a lot of comments explaining its operation in its source code. Take particular notice of intra_regiion_diff.py and engine.py.
What diff tools produce as data is pretty basic: "this line changed that way".
"Visualizing" that normally consists of showing the original code and the modified code side by side, with the "this line changed" indicated by marking the display text somehow. Basically this means scrollable text windows with painted stripes of text. Fancy versions will paint lines between the changed line in one window, and it corresponding line in another.

Resources