Questions tagged [margins]

in Typography: space (area) around the elements in Machine Learning: a margin classifier may use in analysis of data and recognize of patterns, used for classification

Margins in typography

Margins is area around the content of the elements in a document (usually it has shape rectangular)

example margin in typography

Example margin page setup in LaTeX

\usepackage{geometry}
\geometry{
    a4paper,
    total={210mm,297mm},
    left=20mm,
    right=20mm,
    top=20mm,
    bottom=20mm,
}

Example margin setup in CSS of all elements paragraph

p {
    margin-top: 100px;
    margin-bottom: 100px;
    margin-right: 150px;
    margin-left: 50px;
}

Margins in machine learning

Margin classifier may use in analysis of data and recognize of patterns, used for classification

margin classifier

740 questions
13
votes
1 answer

Set a Margin between two buttons programmatically from a linearlayout

How can i set a margin of 20dp between the button "regler" and "decommender" programmatically. Here is my workings LinearLayout lytmain = new LinearLayout(Mcontex); lytmain.setOrientation(LinearLayout.VERTICAL); …
Dimitri
  • 677
  • 3
  • 19
  • 46
12
votes
2 answers

CSS page headers - how to use print margins?

I can get a header to print on each page, but I'm new to print margins. I thought the @page css would work, but it does not seem to affect page margins. If I set the margins on the body, it works on page one, but subsequent pages start the top…
Ted Scheckler
  • 1,389
  • 4
  • 16
  • 34
12
votes
1 answer

Flexbox margin between boxes

I know margins between flexboxes can be set automatically thanks to the the align-content property, but I need it to be fixed margin set in px. I am looking for something similar to column-gap for multi-columns. Here is what I need to do: Here the…
1213
  • 706
  • 2
  • 8
  • 25
11
votes
4 answers

Does the setMargins method in iText works?

Does the setMargins method in iText work in a conventional manner? I have tried the following: System.out.println(f.exists()); Document document = new Document(PageSize.A4,36,36,36,36); PdfWriter writer = PdfWriter.getInstance(document, new…
jayunit100
  • 17,388
  • 22
  • 92
  • 167
10
votes
1 answer

Margin in MigraDoc

I'm using MigraDoc and PDFsharp and I need to set different margins for each page in my PDF document. Using document.DefaultPageSetup.RightMargin = 20; document.DefaultPageSetup.LeftMargin = 20; I obtain that all the pages in my document will…
Martina
  • 791
  • 1
  • 14
  • 26
10
votes
2 answers

Add margins with grid R package

I don't know how to specify margins for PDF printing with grid R package. I create a grid.arrange() object and I put it in a PDF like this : pdf('test.pdf',11.69,8.27) grid.arrange(textGrob('text1', gp=gpar(cex=4)), ncol=1,…
Ben
  • 185
  • 1
  • 10
10
votes
1 answer

how to remove the gap between subplots and around

I am plotting two subplots (2x1) in one figure. I would like to remove all the spacing between two subplots and remove the xlable and xlabel ticks for the top subplot too. Also, I am trying to remove all the spacing outside the subplot. I try…
user1285419
  • 2,183
  • 7
  • 48
  • 70
9
votes
3 answers

Using RelativeLayout dynamically and setting margins in px, dp, inch, mm

My application is just a modified ImageViewer with the options of zooming and dragging. Containing that modified Imageviewer there is a RelativeLayout (that I want to use as an AbsoluteLayout). Then, new elements can be added to the layout to…
Adam Schmit
  • 201
  • 2
  • 4
  • 9
9
votes
1 answer

Qt remove margins

I am currently using a QMainWindow widget and I would like to remove margins around the widget inside. I success to remove margins for window borders but not for the widgets inside my window. Here is my code, for example : this->mainWidget = new…
Jeffrey Muller
  • 850
  • 1
  • 15
  • 28
8
votes
2 answers

R Two graphs with lines going from one to the other

I want to plot some point in a normal graph and link those points to a map displayed under it. What I would like to have basically is that (here I added manually the links): Somehow I should use segments with pdt=T to write outside the margins, but…
Simon C.
  • 1,058
  • 15
  • 33
8
votes
1 answer

CSS 2.1 spec: 8.3.1 Collapsing margins: cannot properly interpret special case: clarification sought

Section 8.3.1 of the CSS 2.1 spec on collapsing margins states: If the top and bottom margins of an element with clearance are adjoining, its margins collapse with the adjoining margins of following siblings but that resulting margin does not…
John Sonderson
  • 3,238
  • 6
  • 31
  • 45
8
votes
2 answers

Set content margins from stylesheet

I'm struggling to set content margins to zero from QLayout objects in Qt with a stylesheet. I can remove them with QLayout::setContentsMargins(0, 0, 0, 0) but I would prefer to do it from stylesheet.
Ben
  • 966
  • 2
  • 10
  • 24
7
votes
3 answers

CSS margin pushing the body element

I'm setting a margin for a div element, however the body element also gets that margin. Consider this code: