Author Topic: Macro for Aligning?  (Read 369 times)

January 03, 2019, 08:02:43 AM
Read 369 times

Agrajag

  • Full Member

  • Offline
  • ****

  • 56
Is there a way to set up some sort of macro so that an object I have selected can be instantly centered (both horizontally and vertically) to the Page?

Thanks...
  • Windows 10

January 03, 2019, 01:24:28 PM
Reply #1

phiscribe

  • Jr. Member

  • Offline
  • ***

  • 43
Don't know about a macro, but there are keyboard shortcuts built in.

https://www.dropbox.com/s/m1x77ugammy0fdz/align.svg?dl=0

Ctrl+Alt+T followed by Ctlr+Alt+H should do it if in Align and Distribute you have it set to Page, (persistent setting.)  Ctrl+Keypad5 is shorter.  Num lock needs to be on.  It would be nice to have one more verb in Inkscape that centered to Page, regardless of the setting in AnD.  In CorelDraw it is the P key.
« Last Edit: January 03, 2019, 04:21:15 PM by phiscribe »
  • Latest Stable
  • Win 8.1

January 03, 2019, 01:26:10 PM
Reply #2

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
If 'Page' is selected in the align and distribute dialog, you can use a keyboard shortcut for it (see Edit > Preferences > User interface > Keyboard shortcuts : Context > center on both axes (similar in English).

If you can live with the page size being adapted to your object's size, use Ctrl+Shift+R - the object will be centered in the page, then, too.

If those don't suit you, you can write an extension and assign a keyboard shortcut to it.

January 03, 2019, 06:55:22 PM
Reply #3

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
It sounds like you want to avoid dragging something.  But just for the record, there is a snapping option to center on the page.

I guess most people like to use key shortcuts.  But also just for the record, these are the buttons in Align and Distribute dialog, to center something.  Horizontal  :ava:  Vertical  :aha:  And as already mentioned, you have to choose Page from the Relative to: dropdown menu.

Or depending on your workflow, it might work to use Document Properties > Page tab > Page size > Custom size > Resize page to contents.  So that if you have all the contents on your page placed relative to each other already, resizing the page to the contents can make it all centered as well.  If I need something centered on the page, this is usually my solution.  (And don't forget you can use the margins feature (of resize to contents) as well, to help, if needed.)
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann