Here I got a text in libreoffice, third line has a mathematical formula which has added a lot of horizontal space above and below its line (third line). how can reduce the horizontal space in this line?
I just found the answer, it's just enough to set a fixed line space, not single or double or proportional.
Just right click on the paragraph and then select paragraph from menu and in idents and spacing tab, Line spacing > Fixed and then set a number for line height.
Related
Having global-linum-mode on creates extra space on the left hand.
How do I get rid of this extra space and just show the line numbers?
Picture:
The extra space that appears on the left side of the buffer when global-linum-mode is enabled is caused by the default linum-format setting, which adds a certain amount of padding to the line numbers to make sure they align properly.
To get rid of the extra space and just show the line numbers without any padding, you can customize the linum-format variable. This variable determines the format of the line numbers in global-linum-mode, and you can set it to a format string that doesn't include any padding.
(custom-set-variables
'(linum-format "%d"))
when width is sufficient to hold all characters
when characters exceed width
i have used set_line_wrap(True).There are two labels in each row as shown in picture, right label in each row has set_line_wrap(True), why is the label in the second row not starting from the beginning? when characters exceeds, i expect it to start from same position where it started before when characters were not exceeding.
Code:
descriptionLabel=Gtk.Label(description)
descriptionLabel.set_line_wrap(True)
Try setting halign to Gtk.AlignSTART and xalign to 0. This should ensure that both the label as a whole and each individual line starts at the very left of the available space.
I would love to have some space between the line numbers and the first intendation/code in the VS Code editor window:
I just want to indent the code in the editor without actually adding whitespace in the code.
I tried "editor.glyphMargin", but this will only increase the space on the left of the line numbers, not between the line numbers and the code.
I'm also aware of the "Centered Layout" view, but this also decreases the width of e. g. the tabs for the file selection.
Is there a setting I'm missing or do I need a plugin/custom CSS?
You can try this --
"editor.lineDecorationsWidth": 25,
This increases the space on the right side of the numbers. I haven't seen anything that increases the padding on the other side of the gutter nearest your code.
Opinion --
Ideally, there would be a editor.padding.left like there is a editor.padding.top, but I haven't seen this yet.
Currently, I am using
document.add( Chunk.NEWLINE );
after each paragraph to generate space between two paragraphs. What is the way to generate a spacing of any height I specify?
The space between two lines of the same Paragraph is called the leading. See Changing text line spacing
If you want to introduce extra spacing before or after a Paragraph, you can use the setSpacingBefore() or setSpacingAfter() method. See itext spacingBefore property applied to Paragraph causes new page
For instance:
Paragraph paragraph1 = new Paragraph("First paragraph");
paragraph1.setSpacingAfter(72f);
document.add(paragraph1);
Paragraph paragraph2 = new Paragraph("Second paragraph");
document.add(paragraph2);
This puts 72 user units of extra white space between paragraph1 and paragraph2. One user unit corresponds with one point, so by choosing 72, we've added an inch of white space.
In the Crystal Reports editor that comes with Visual Studio (2008) is it possible to align text to the center of a text box rather than to the top?
I can't find the option anywhere and a Google search is not encouraging but I just can't bring myself to believe that they would not include such an obvious feature.
There is no vertical alignment for crystal reports that I could find. A potential work-around is programming line breaks.
I can't find an option to vertically align text within a label, but you can vertically align labels within a section. Use the horizontal guidelines on the left margin to adjust the alignment. You may need to right-click the guideline and un-check "Snap to Grid" to get more precise positioning.
You can achieve this with strings, as you will see a paragraph tab instead of a number tab when you enter the FORMAT FIELD menu. To make your number a string you should format it as a formula field thusly:
chr(13) + chr(10) + totext(mynumber,0)
Then in the FORMAT FIELD menu select - Line spacing: multiple of: 0.2
You may need to experiment with the 0.2 value until you find your number (i.e. string prefixed with a carriage return) nicely centered in the middle of your box.
Cheers,
Chilly
Vertical alignment with programming line breaks. Algorithm for the one cell:
Count the number of characters in data (iTextLen).
Find the number of text lines in cell (iLineNum). Calculated empirically.
Find the row length in characters (iLineLen). Calculated empirically.
Calculate count the number of halfbreaks by formula (iLineNum — 1) — (iTextLen / iLineLen).
#formula in crystal syntax:
Local NumberVar iLineNum:= 5;
Local NumberVar iLineLen:= 30;
Local NumberVar iTextLen:= Length({DataSource});
Local StringVar sRet:= '';
Local NumberVar i;
Local NumberVar iLinesNum:= Truncate(iLineNum - 1) - Truncate(iTextLen / iLineLen);
For i:= 1 to iLinesNum Do ( sRet:= sRet + chr(13) );
sRet
Add formula to the top and bottom of data. Text objects will look like this:{#formula}{DataSource}{#formula}
Font size of #formula must be halved of font size {DataSource}. For example, if the font size of {DataSource} equal to 20, the #formula should be equal to 10:
Algorithm works better with monospaced typeface, but with proportional typeface works in most cases.
Algorithm for multiple cells is differ only that iLineNum will be the maximum number of characters in data of all cells.
in crystal report 10 the label >> right click >> format Text >> Common >> text rotation . choose 90 degree the text will have a vertical alignment
same in a field or any object you add to the report
hope that i help you
note the answer (Format text > tab Paragraph, Horizontal alignment: Centered) is a wrong