When I draw a rectangle, the bounding box covers also the stroke, unlike Illustrator that keeps it on the vector path.
How to deal with this problem? See attachment for a better understanding.
When I draw a rectangle, the bounding box covers also the stroke, unlike Illustrator that keeps it on the vector path.
How to deal with this problem? See attachment for a better understanding.
Based upon @GerardFalla's answer, Adobe may have improved snapping behavior in more recent versions. I'm still using CS6 most of the time, because I dislike subscription software, and I didn't bother launching CC2017/2018 to test specifically for this answer. This answer is based pretty much on CS6 as I see the behavior.
You can alter the stroke alignment in InDesign via the Stroke Panel.
It appears as though you have the stroke set to align to inside. If you need it centered on the path, like Illustrator, simply click the left-most stroke alignment option in the Stroke Panel.
And you can also enable Smart Guides to align things a bit better if needed.
Edit After the comment:
My understanding is you need 2 rectangles to essentially use the same stroke, centered on their paths respectively. So when overlapped it appears like 1 stroke.
InDesign uses the "preview bounds" for strokes. As far as I'm aware, there's no option to change that like there is in Illustrator. So, you have to compensate for the preview of the strokes.
I don't think you can do this in "1 step", but...
You can alter the stroke alignment on multiple rectangles at the same time without changing other stroke attributes.
This whole discussion is off-track - let's get back to brass tacks:
You need to draw out, with snapping, multiple rectangles in InDesign which snap such that the strokes all perfectly line up.
IT DOES THAT NOW.
The bounding box at the outer edge of stroke is a non-issue.
Why?
Because InDesign automatically snaps also to the inner stroke boundary - exactly for this reason - to align strokes.
So to directly respond to your specific request: I know of no way to alter this behaviour - however, it's not necessary - cos it already works to accomplish your task as-is, out of the box.
I just had this issue and was looking all over the internet for it. I know it's been a few years since it was asked, but since I came across this issue and the solution, I figured it's best to answer.
The problem lies within the preferences options of Illustrator. Under Preferences >> General, there's a box labeled "Use Preview Bounds" that will take the bounding box to the outside of the stroke instead of exactly on the vector edge. Super annoying, (I find this feature) super useless, but I believe this is the answer you're looking for.
Answer Source: https://community.adobe.com/t5/illustrator-discussions/bounding-boxes-and-strokes/td-p/10833829
Re:InDesign bounding box - stroke issue
I was just beginning to explore Indesign, coming from illustrator, to do a multi-page report. I was drawing a few outlined boxes and wanted them aligned. Then i noticed this glaring difference. GerardFalla(from the comments) managed to aligned them because they snap to the inner boundaries, somehow I could not get it to work. I had snapping on, smart guides and what not.
My solution for the time being is to use the tiny "double arrow/reverse colour" icon next to fill/stroke icon. By clicking on it, it turns my objects to have fill and no stroke or reverse. Now, Filled objects will aligned better. then i click that tiny icon to reverse the fill/stroke and set my stroke weight accordingly.