Class EquationSymbol

EquationSymbol

गणित के Equation में सिंबल को दिखाने वाला एलिमेंट. EquationSymbol कोई अन्य तत्व नहीं हो सकता. दस्तावेज़ की बनावट के बारे में ज़्यादा जानकारी के लिए, Google Docs के दस्तावेज़ को बड़ा करने के लिए गाइड देखें.

तरीके

तरीकारिटर्न टाइपसंक्षिप्त विवरण
copy()EquationSymbolमौजूदा एलिमेंट की अलग की गई, डीप कॉपी दिखाता है.
getAttributes()Objectएलिमेंट के एट्रिब्यूट हासिल करता है.
getCode()Stringसमीकरण चिह्न से जुड़े कोड को हासिल करता है.
getNextSibling()Elementयह एलिमेंट का अगला सिबलिंग एलिमेंट हासिल करता है.
getParent()ContainerElementएलिमेंट के पैरंट एलिमेंट को हासिल करता है.
getPreviousSibling()Elementयह एलिमेंट के पिछले सिबलिंग एलिमेंट को हासिल करता है.
getType()ElementTypeएलिमेंट के ElementType को हासिल करता है.
isAtDocumentEnd()Booleanयह तय करता है कि एलिमेंट, Document के आखिर में है या नहीं.
merge()EquationSymbolयह एलिमेंट को एक ही टाइप के पिछले सिबलिंग के साथ मर्ज करता है.
removeFromParent()EquationSymbolएलिमेंट को इसकी पैरंट जगह से हटाता है.
setAttributes(attributes)EquationSymbolएलिमेंट के एट्रिब्यूट सेट करता है.

विस्तृत दस्तावेज़

copy()

मौजूदा एलिमेंट की अलग की गई, डीप कॉपी दिखाता है.

एलिमेंट में मौजूद सभी चाइल्ड एलिमेंट भी कॉपी कर लिए जाते हैं. नए एलिमेंट में यह मौजूद नहीं है पैरंट.

वापसी का टिकट

EquationSymbol — नई कॉपी.

अनुमति देना

इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या एक से ज़्यादा स्कोप की अनुमति होनी चाहिए:

  • https://www.googleapis.com/auth/documents.currentonly
  • https://www.googleapis.com/auth/documents

getAttributes()

एलिमेंट के एट्रिब्यूट हासिल करता है.

नतीजा एक ऐसा ऑब्जेक्ट होता है जिसमें हर एक मान्य एलिमेंट एट्रिब्यूट के लिए एक प्रॉपर्टी होती है, जहां हर प्रॉपर्टी का नाम, DocumentApp.Attribute की गिनती में मौजूद किसी आइटम से मेल खाता है.

var doc = DocumentApp.getActiveDocument();
var documentTab = doc.getActiveTab().asDocumentTab();
var body = documentTab.getBody();

// Append a styled paragraph.
var par = body.appendParagraph('A bold, italicized paragraph.');
par.setBold(true);
par.setItalic(true);

// Retrieve the paragraph's attributes.
var atts = par.getAttributes();

// Log the paragraph attributes.
for (var att in atts) {
  Logger.log(att + ":" + atts[att]);
}

वापसी का टिकट

Object — एलिमेंट के एट्रिब्यूट.

अनुमति देना

इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या एक से ज़्यादा स्कोप की अनुमति होनी चाहिए:

  • https://www.googleapis.com/auth/documents.currentonly
  • https://www.googleapis.com/auth/documents

getCode()

समीकरण चिह्न से जुड़े कोड को हासिल करता है.

वापसी का टिकट

String — सिंबल कोड

अनुमति देना

इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या एक से ज़्यादा स्कोप की अनुमति होनी चाहिए:

  • https://www.googleapis.com/auth/documents.currentonly
  • https://www.googleapis.com/auth/documents

getNextSibling()

यह एलिमेंट का अगला सिबलिंग एलिमेंट हासिल करता है.

अगले सिबलिंग का वही पैरंट है और वे मौजूदा एलिमेंट को फ़ॉलो करते हैं.

वापसी का टिकट

Element — अगला सिबलिंग एलिमेंट.

अनुमति देना

इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या एक से ज़्यादा स्कोप की अनुमति होनी चाहिए:

  • https://www.googleapis.com/auth/documents.currentonly
  • https://www.googleapis.com/auth/documents

getParent()

एलिमेंट के पैरंट एलिमेंट को हासिल करता है.

पैरंट एलिमेंट में मौजूदा एलिमेंट शामिल है.

वापसी का टिकट

ContainerElement — पैरंट एलिमेंट.

अनुमति देना

इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या एक से ज़्यादा स्कोप की अनुमति होनी चाहिए:

  • https://www.googleapis.com/auth/documents.currentonly
  • https://www.googleapis.com/auth/documents

getPreviousSibling()

यह एलिमेंट के पिछले सिबलिंग एलिमेंट को हासिल करता है.

पिछले सिबलिंग का पैरंट ही है और मौजूदा एलिमेंट से पहले आता है.

वापसी का टिकट

Element — पिछला सिबलिंग एलिमेंट.

अनुमति देना

इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या एक से ज़्यादा स्कोप की अनुमति होनी चाहिए:

  • https://www.googleapis.com/auth/documents.currentonly
  • https://www.googleapis.com/auth/documents

getType()

एलिमेंट के ElementType को हासिल करता है.

दिए गए एलिमेंट का सटीक टाइप तय करने के लिए, getType() का इस्तेमाल करें.

var doc = DocumentApp.getActiveDocument();
var documentTab = doc.getActiveTab().asDocumentTab();
var body = documentTab.getBody();

// Obtain the first element in the active tab's body.

var firstChild = body.getChild(0);

// Use getType() to determine the element's type.
if (firstChild.getType() == DocumentApp.ElementType.PARAGRAPH) {
  Logger.log('The first element is a paragraph.');
} else {
  Logger.log('The first element is not a paragraph.');
}

वापसी का टिकट

ElementType — एलिमेंट का टाइप.

अनुमति देना

इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या एक से ज़्यादा स्कोप की अनुमति होनी चाहिए:

  • https://www.googleapis.com/auth/documents.currentonly
  • https://www.googleapis.com/auth/documents

isAtDocumentEnd()

यह तय करता है कि एलिमेंट, Document के आखिर में है या नहीं.

वापसी का टिकट

Boolean — टैब के आखिर में एलिमेंट है या नहीं.

अनुमति देना

इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या एक से ज़्यादा स्कोप की अनुमति होनी चाहिए:

  • https://www.googleapis.com/auth/documents.currentonly
  • https://www.googleapis.com/auth/documents

merge()

यह एलिमेंट को एक ही टाइप के पिछले सिबलिंग के साथ मर्ज करता है.

सिर्फ़ एक ही ElementType के एलिमेंट मर्ज किए जा सकते हैं. इसमें मौजूद कोई भी चाइल्ड एलिमेंट मौजूदा एलिमेंट को पिछले सिबलिंग एलिमेंट में ले जाया जाता है.

मौजूदा एलिमेंट को दस्तावेज़ से हटा दिया जाता है.

var doc = DocumentApp.getActiveDocument();
var documentTab = doc.getActiveTab().asDocumentTab();
var body = documentTab.getBody();

// Example 1: Merge paragraphs
// Append two paragraphs to the document's active tab.
var par1 = body.appendParagraph('Paragraph 1.');
var par2 = body.appendParagraph('Paragraph 2.');
// Merge the newly added paragraphs into a single paragraph.
par2.merge();

// Example 2: Merge table cells
// Create a two-dimensional array containing the table's cell contents.
var cells = [
['Row 1, Cell 1', 'Row 1, Cell 2'],
['Row 2, Cell 1', 'Row 2, Cell 2']
];
// Build a table from the array.
var table = body.appendTable(cells);
// Get the first row in the table.
 var row = table.getRow(0);
// Get the two cells in this row.
var cell1 = row.getCell(0);
var cell2 = row.getCell(1);
// Merge the current cell into its preceding sibling element.
var merged = cell2.merge();

वापसी का टिकट

EquationSymbol — मर्ज किया गया एलिमेंट.

अनुमति देना

इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या एक से ज़्यादा स्कोप की अनुमति होनी चाहिए:

  • https://www.googleapis.com/auth/documents.currentonly
  • https://www.googleapis.com/auth/documents

removeFromParent()

एलिमेंट को इसकी पैरंट जगह से हटाता है.

var doc = DocumentApp.getActiveDocument();
var documentTab = doc.getActiveTab().asDocumentTab()
var body = documentTab.getBody();

// Remove all images in the active tab's body.
var imgs = body.getImages();
for (var i = 0; i < imgs.length; i++) {
  imgs[i].removeFromParent();
}

वापसी का टिकट

EquationSymbol — हटाया गया एलिमेंट.

अनुमति देना

इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या एक से ज़्यादा स्कोप की अनुमति होनी चाहिए:

  • https://www.googleapis.com/auth/documents.currentonly
  • https://www.googleapis.com/auth/documents

setAttributes(attributes)

एलिमेंट के एट्रिब्यूट सेट करता है.

बताया गया विशेषता पैरामीटर एक ऐसा ऑब्जेक्ट होना चाहिए, जिसमें हर प्रॉपर्टी का नाम एक आइटम हो DocumentApp.Attribute की गिनती और हर प्रॉपर्टी की वैल्यू, नई वैल्यू होगी लागू किया गया.

var doc = DocumentApp.getActiveDocument();
var documentTab = doc.getActiveTab().asDocumentTab();
var body = documentTab.getBody();

// Define a custom paragraph style.
var style = {};
style[DocumentApp.Attribute.HORIZONTAL_ALIGNMENT] =
    DocumentApp.HorizontalAlignment.RIGHT;
style[DocumentApp.Attribute.FONT_FAMILY] = 'Calibri';
style[DocumentApp.Attribute.FONT_SIZE] = 18;
style[DocumentApp.Attribute.BOLD] = true;

// Append a plain paragraph.
var par = body.appendParagraph('A paragraph with custom style.');

// Apply the custom style.
par.setAttributes(style);

पैरामीटर

नामटाइपब्यौरा
attributesObjectएलिमेंट के एट्रिब्यूट.

वापसी का टिकट

EquationSymbol — मौजूदा एलिमेंट.

अनुमति देना

इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या एक से ज़्यादा स्कोप की अनुमति होनी चाहिए:

  • https://www.googleapis.com/auth/documents.currentonly
  • https://www.googleapis.com/auth/documents