Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Setting Baseline and Document Grid

Engaged ,
Nov 23, 2011 Nov 23, 2011

I have an idea for an InDesign script which I think would be nice to utilize. I have gathered a lot of the recommended stuff to read how to make such scripts but it will take a lot of time for me to get to the point of making this script. I am now at the point of just passing the Hello World stage.

In the meantime I wonder if someone with more ability would like to and maybe have some fun solving this.

So far I have found in the documents a sniplet that works as the end of the script but it has to get some additional info to work in the way I want. Here is the script, taken from one of Adobe's JavaScript tutorials:

var myDocument = app.activeDocument;

//Set the document measurement units to points.

myDocument.viewPreferences.horizontalMeasurementUnits = MeasurementUnits.points;

myDocument.viewPreferences.verticalMeasurementUnits = MeasurementUnits.points;

//Set up grid preferences.

with(myDocument.gridPreferences){

baselineStart = 0;

baselineDivision = 11.225;

baselineShown = true;

horizontalGridlineDivision = 11.232;

horizontalGridSubdivision = 1

verticalGridlineDivision = 11.225;

verticalGridSubdivision = 1

documentGridShown = true;

}

I put in different numbers from what was in that example and that is exactly what I need the script to do.

What needs to before this part is excecuted is:

1. The script gets the document size, W and H

2. The script opens up a dialog box where the user put in the font leading (L) he wants to use for the baselineDivision. Let's say 11.2pt. Click OK.

     I think baselineStart and vertical and horizontalGridlineSubdivision should be as they are here.

3. The script now calculates:

     H/L=R. Rounds off the digits of the result (R) to a whole number and calculates: H/R=VGD (verticalGridlineDivision, same as is used for baselineDivision)

     W/L=R. Rounds off the digits of the result (R) to a whole number and calculates: W/R=HGD (horizontalGridlineDivision)

     and puts the results into the script above which then is excecuted and sets both Baseline Grid and Horizontal and Vertical values for the Document grid.

4. An added bonus would be a display window that would display the number of gridlinedivisions W and H.

The point of all this is to set up a Baseline Grid that is evenly distributed all over he page, not leaving half line at the bottom and such. At the same time it calculates Document Grid the same way and it is made up of squares that are almost 1:1 Less than .1% away.

The last display window would help to calculate columns and rows in a grid but this is also a starting point into another script.

Any help to a newcomer welcomed.

TOPICS
Scripting
4.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Deleted User
May 15, 2017 May 15, 2017

Hi Sigurdur, we’ve recently released Fitbaseline to the public​: it’s an InDesign script we’ve developed and use to distribute the baseline grid over the document height, plus some extra’s. You might be interested to check it out: fitbaseline.com

Translate
Guest
May 15, 2017 May 15, 2017

Hi Sigurdur, we’ve recently released Fitbaseline to the public​: it’s an InDesign script we’ve developed and use to distribute the baseline grid over the document height, plus some extra’s. You might be interested to check it out: fitbaseline.com

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
May 15, 2017 May 15, 2017

Thanks for replying. fitbaseline.com is nice. This is part of what I was searching for.

I posted this question in 2011. Sometimes in between I made a calculator for this. Not only for the baseline, but for splitting the whole page into units, either as squares or proportional. Check it out

font.is » Grid Systems

EasyGridCalculatorSquare

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 15, 2017 May 15, 2017

Thank you, that’s good to hear. I will put Easy Grid Calculator into practice, experiment a bit and let you know what I think. It’s an interesting and extensive approach.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
May 15, 2017 May 15, 2017

Nice. Just to let you know that when you use the tables, the "Change L/R Margins by " tells how many units you have to add or subtract from the margins to get columns or rows be an even number.

Take care.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 15, 2017 May 15, 2017

Okay, I understand, thanks!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 05, 2019 Feb 05, 2019

Hi Sigurdur we do have a plugin to evenly distribute the baseline to the page, it does even more it is a complete tool to create layout grids. You can find it at www.layoutgridcalculator.com/plug-in/. There is another plugin by Designers Bookshop called Grid Calculator Pro which does essentially the same thing. But the difference is that www.layoutgridcalculator.com/plug-in/ is more than a calculator, it's a tool that contains interesting features like the Chromatic Scale selector and so on. It works in a way that it will help you create beautiful and harmonious layouts. It has a very user-friendly user interface. Alternatively you can us the free online version  www.layoutgridcalculator.com

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 19, 2019 Feb 19, 2019

Thank you Jean. I have already pre-ordered your plug-in. Excited to try it out.

I already have the Fitbaseline tool, some scipts I have collected too and TGE Grid Calculator. On top of that I have made my own calculations tables online found here:

https://font.is/grid-systems/

https://font.is/EasyGridCalculatorProportional/EasyGridCalculatorProportional.htm

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 19, 2019 Feb 19, 2019

Oh, great thanks!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 20, 2019 Feb 20, 2019
LATEST

Hi jeanloudes ,

also see into the script Set Up Baseline Grid 3.0 by Roland Dreger:

Grundlinienraster einrichten per Skript — Roland Dreger, Grafikdesign

Set Up Baseline Grid 3.0 on Vimeo

Regards,
Uwe

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines