Copy link to clipboard
Copied
In Illustrator CC, is it possible to nest Character Styles within a Paragraph Style like in InDesign?
I'd like to format a "Monogram" text block so it retains its format when the text is replaced by pasting from the clipboard.
Copy link to clipboard
Copied
no, you cannot do what you are asking. why don't you work in indesign for the text and have the illustration placed in the layout and linked? it will give you the set up you are looking for.
Copy link to clipboard
Copied
Thanks, Jonathan. This is for a production process. All our templates are in AI. Moving between AI and INDD is not practical for the specific tasks we're performing. I'm sure there's a scripting solution.
My solution was to create a Character Style for the center character (assigned with an AI Action). Since AI Actions do not recognize typing I used a third-party macro tool (Keyboard Maestro) to do the rest.
Copy link to clipboard
Copied
thats cool.. nice.
Copy link to clipboard
Copied
i added this to my bookmarks since this is a good solution.
Copy link to clipboard
Copied
Jonathan, I've since eliminated the Styles, in favor of a simple AI Action. It's simpler to implement.
Copy link to clipboard
Copied
can you share that action?
Copy link to clipboard
Copied
All the action does is reset the point size and baseline shift. The action is run within a Keyboard Maestro macro (required because AI Actions won't record keystrokes). it is the next best thing to scripting. Here's a screen image of the macro as it is built in Keyboard Maestro. This allow us to use variables in addition to actions.
Copy link to clipboard
Copied
Followup: Because Character Styles cannot be made "Persistent" as "Brush Libraries" can, I updated the Character settings in the Action itself. Still have to use Keyboard Maestro since typing is not "Actionable". Works.
Copy link to clipboard
Copied
If you put in a feature request on User Voice, please post the link here so we can vote!
Copy link to clipboard
Copied
Good idea. I just feel like Adobe is too focused on whisbang features to spend time adding "InDesign" features in AI. And I haven't seen a meaningful update to Actions in ions.
Copy link to clipboard
Copied
How about
var aDoc = app.activeDocument;
var aSel = app.selection;
var smallStyle = aDoc.characterStyles["Small Cap"];
var largeStyle = aDoc.characterStyles["Large Cap"];
smallStyle.applyTo(aSel[0].textRange);
largeStyle.applyTo(aSel[0].textRange.characters[1]);
required: a selected text frame with 3 characters and your characters styles Small Cap and Large Cap should be present in the document
If this is a little bit useful for you
Have fun
Copy link to clipboard
Copied
Thank, pixxxel! I'm so envious of people who can script. It's a skill I just have not acquired… yet.
My little workaround works for now, but I'll try to learn from what you've shared here.
Because we have an extensive library of templates that don't contain Character Styles, I think an Action is easier to deploy.
BTW, I'm also dependant on Keyboard Maestro to make it work (great for us scripting-challenged users).
Copy link to clipboard
Copied
rcraighead schrieb
… we have an extensive library of templates that don't contain Character Styles, I think an Action is easier to deploy …
You don't need Character Styles. (But it is easier to handle with them).
Do you have an example file and a detailed description for me before and after. Little things are also important (if necessary, PM me)
Copy link to clipboard
Copied
we need this feature as well.
we are saving INDD files as PDFs to place in AI but it would be much easier to layout the type within AI and avoid the ID altogether.
so where is the User Voice and I'll recommend so we can all vote on it.
Thanks,
Mark
Copy link to clipboard
Copied
marks55678522 wrote
so where is the User Voice and I'll recommend so we can all vote on it.
Here:
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Voted!
Copy link to clipboard
Copied
I would really just like every type setting from ID in Illustrator, but I think that's unlikely.
Copy link to clipboard
Copied
I keep asking them to do that as a feature request, this and inline graphics
Copy link to clipboard
Copied
I stumbled on to this old post and thought I'd share a script we now use for creating a Monogram. It assumes there is "Placeolder text" in the target file. Come a long way since posting the original question. Scripting is my new passion thanks in large part to the people on this forum.
function setMonograms(whichPIN, theLayer, mFrame, monoText, maxMono) {
//Macro: Enter Layout Text
var aDoc = app.activeDocument;
//"whichPIN" is either 1 or 2. If it is 1 "whichPIN" is reset to null
//to match the naming convention in the OneUp Template Layer names
if (whichPIN == 1) {
whichPIN = "";
}
var targetFrame;
try {
var aLayer = aDoc.layers[theLayer];
//If there any characters in "monoText" variable
if (monoText.length > 0) {
aLayer.visible = true;
//Define target monogram text placeholder text frame as "targetFrame"
targetFrame = aDoc.textFrames[mFrame + whichPIN];
targetFrame.hidden = false;
//Fill "targetFrame" with "monogram text"
targetFrame.contents = monoText;
//Re-size center character to defined size (maxMono)
setMidLetter();
function setMidLetter() {
myLetter = targetFrame.textRange.characters[1].characterAttributes;
// myLetter.size = maxMono;
myLetter.size = maxMono;
myLetter.baselineShift = 0;
redraw();
}
} else {
//If there's no monogram remove the monogram placeholder
targetFrame.remove();
}
} catch (e) {}
}