Search Results

Search found 242 results on 10 pages for 'paragraphs'.

Page 2/10 | < Previous Page | 1 2 3 4 5 6 7 8 9 10  | Next Page >

  • RichEdit, winapi - paragraph aligment

    - by bartek
    Hi, I would like to have a line aligned in such way, that some first words are aligned left and some last words are aligned right, but all are in the same line: | text 1 text2 | | Lorem ipsum dolor sit amet | Is that possibile? How can I do that?

    Read the article

  • Is there a way to get a reference to all the paragraphs or headings in a web page in JavaScript?

    - by mattbd
    I'm writing a simple Greasemonkey script to strip out all the images, headings and paragraphs from a web page (it's because someone wants to use images of several popular websites with the images and text removed in a presentation about branding of websites). I've figured out how to do so with images by using a for loop and the document.images array like this: var i = 0; var imglngth = document.images.length; for(i=0;i<imglngth;i++) { document.images[i].style.display="none"; } However, I don't believe there's an object representing paragraphs or headers. Any suggestions as to how I could implement this?

    Read the article

  • How to convert paragraph into html paragraphs quickly using Auto hot key in one shot?

    - by metal gear solid
    How to convert paragraph into html paragraphs quickly using Auto hot key in one shot. for example: Before xxxxx xxxxxx xxxxxxx xxxxxx xxxxxx xxxxxxxx xxxxxx x xxxx xx xxxx xxxx xxxxxxxxxxx x xxxxxxxx x x xxxxxxxxxxxxxx xxxx xxx xxxx xxxxxx xxxxx xxxxxx xxxxxxx xxxxxx xxxxxx xxxxxxxx xxxxxx x xxxx xx xxxx xxxx xxxxxxxxxxx x xxxxxxxx x x xxxxxxxxxxxxxx xxxx xxx xxxx xxxxxx xxxxx xxxxxx xxxxxxx xxxxxx xxxxxx xxxxxxxx xxxxxx x xxxx xx xxxx xxxx xxxxxxxxxxx x xxxxxxxx x x xxxxxxxxxxxxxx xxxx xxx xxxx xxxxxx After <p>xxxxx xxxxxx xxxxxxx xxxxxx xxxxxx xxxxxxxx xxxxxx x xxxx xx xxxx xxxx xxxxxxxxxxx x xxxxxxxx x x xxxxxxxxxxxxxx xxxx xxx xxxx xxxxxx</p> <p>xxxxx xxxxxx xxxxxxx xxxxxx xxxxxx xxxxxxxx xxxxxx x xxxx xx xxxx xxxx xxxxxxxxxxx x xxxxxxxx x x xxxxxxxxxxxxxx xxxx xxx xxxx xxxxxx</p> <p>xxxxx xxxxxx xxxxxxx xxxxxx xxxxxx xxxxxxxx xxxxxx x xxxx xx xxxx xxxx xxxxxxxxxxx x xxxxxxxx x x xxxxxxxxxxxxxx xxxx xxx xxxx xxxxxx</p>

    Read the article

  • In an Android TextView, is it possible to insert paragraphs?

    - by johnrock
    Below is an example of the type of problem that I have. I have data in a pojo that I need to display in a textview... the data has pseudo code that denotes each paragraph with [p] I would like to somehow parse the [p]'s into paragraphs when they are displayed in the textview. Can this be done? Is there something I can substitute for the [p] that will make a new paragraph in the textview? Question question = new Question(); question.setText("Here is the first paragraph.[p] And this should be the second."); TextView view = (TextView) findViewById(R.id.qtext); view.setText(question.getParsedText());

    Read the article

  • HTML: How to create a DIV with only vertical scroll-bar to show long paragraphs on a webpage?

    - by Awan
    I want to show terms and condition note on my website. I dont want to use text field and also dont want to use my whole page. I just want to display my text in selected area and want to use only vertical scroll-bar to go down and read all text. Currently I am using this code: <div style="width:10;height:10;overflow:scroll" > text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text </div> It is not fixing the width and height and spread until the all text appears. Second it is showing horizontal scroll-bar and I don't want to show it. Any Idea ? Thanks

    Read the article

  • Minimizing use of paper

    - by Abody97
    I've recently faced this problem in a dynamic programming curriculum, and I honestly have no idea about how to determine the appropriate state. You're given N (1 <= N <= 70) paragraphs and M (1 <= M <= N) figures. Each paragraph i requires PL_i (1 <= PL_i <= 100) lines and references at most one figure. Each figure is referenced exactly once (i.e., no two paragraphs can reference the same figure, and for each figure there's a paragraph that references it.) Each figure requires PF_i (1 <= PF_i <= 100) lines. The task is to distribute those figures and paragraphs on paper in the order they're given, where one paper fits for L lines at most. No paragraph or figure is too large to fit on one paper. If a paragraph x placed on paper x_p references a figure y then y must be placed on either the paper x_p - 1 or x_p or x_p + 1. We have to find the minimum number of lines (and thus pages) to allocate in order to distribute all the figures and paragraphs. Any help would be extremely appreciated. Thanks in advance!

    Read the article

  • String parsing help

    - by Click Upvote
    I have a string like the following: $string = " <paragraph>apples are red...</paragraph> <paragraph>john is a boy..</paragraph> <paragraph>this is dummy text......</paragraph> "; I would like to split this string into an array contanining the text found between the <paragraph></paragraph> tags. E.g something like this: $string = " <paragraph>apples are red...</paragraph> <paragraph>john is a boy..</paragraph> <paragraph>this is dummy text......</paragraph> "; $paragraphs = splitParagraphs($string); /* $paragraphs now contains: $paragraphs[0] = apples are red... $paragraphs[1] = john is a boy... $paragraphs[1] = this is dummy text... */ Any ideas? P.S it should be case insensitive, <paragraph>, <PARAGRAPH>, <Paragraph> should all be treated the same way.

    Read the article

  • Are there arrays in Latex(not asking for the way to typeset them but to use for programing)

    - by drasto
    Are there arrays in Latex ? I don't mean the way to typeset arrays. I mean arrays as the data structure in latex/tex as a "programming language". I need to store a number of vbox-es or hbox-es in array. Or it may by something like "an array of macros". More details: I have an environment that should typeset songs. I need to store some songs paragraphs given as arguments to my macro \songparagraph(so I will not typeset them, just store those paragraphs). As I don't know how many paragraphs can by in one particular song I need an array for this... When the environment is closed all the paragraphs will be typeset - but they will be first measured and the best placement for each paragraph will be computed(for example, some paragraphs can be put one aside other in two columns to make the song look more compact and save some space). Any ides would be welcome. Please if you know about that there are some arrays in latex post a link to some basic documentation, tutorial or just state basic commands.

    Read the article

  • Does LaTeX have an array data structure?

    - by drasto
    Are there arrays in LaTeX? I don't mean the way to typeset arrays. I mean arrays as the data structure in LaTeX/TeX as a "programming language". I need to store a number of vbox-es or hbox-es in an array. It may be something like "an array of macros". More details: I have an environment that should typeset songs. I need to store some songs' paragraphs given as arguments to my macro \songparagraph (so I will not typeset them, just store those paragraphs). As I don't know how many paragraphs can be in one particular song I need an array for this. When the environment is closed, all the paragraphs will be typeset - but they will be first measured and the best placement for each paragraph will be computed (for example, some paragraphs can be put one aside the other in two columns to make the song look more compact and save some space). Any ideas would be welcome. Please, if you know about arrays in LaTeX, post a link to some basic documentation, tutorial or just state basic commands.

    Read the article

  • Parsing HTML with XPath and PHP

    - by Peter
    Is there a way (using XPath and PHP) to do the following (WITHOUT external XSLT files)? Remove all tables and their contents Remove everything after the first h1 tag Keep only paragraphs (INCLUDING their inner HTML (links, lists, etc)) I received an XSLT answer here, but I'm looking for XPATH queries that don't require external files. Currently, I've got the HTML in question loaded into a SimpleXmlElement via: $doc = @DOMDocument::loadHTML($xml); $data = simplexml_import_dom($doc); Now I need help with: $data = $data->xpath('??????'); Been working with this one for several days to no avail. I really appreciate the help. Edit: I don't particularly care what's inside the paragraphs, as I can use strip_tags to eliminate what I don't want. All I need to do is to isolate the paragraphs from the rest of the source. I suppose a more specific, accurate requirement would be this: Return only paragraphs (and their html contents) that aren't contained in tables, and only before the first h1 tag

    Read the article

  • Inserting a ContentControl after another ContentControl

    - by Markus Roth
    In our VSTO Word 2010 Addin, we are trying to insert a RichTextControl after a given other ContentControl. We have tried this: public ContentControl AddContentControl(WdContentControlType type, int position) { Paragraph paragraphBefore = null; if (position == 0) { if (WordDocument.Paragraphs.Count == 0) { WordDocument.Paragraphs.Add(); } paragraphBefore = WordDocument.Paragraphs.First; } else { paragraphBefore = Controls.ElementAt(position - 1).Range.Paragraphs.Last; } object start = paragraphBefore.Range.End; object end = paragraphBefore.Range.End + 1; paragraphBefore.Range.InsertParagraphAfter(); Range rangeToUse = WordDocument.Range(ref start, ref end); ContentControl newControl = _ContentControl = _WordDocument.ContentControls.Add(type, rangeToInsert); Controls.Insert(position, newControl); OnNewContentControl(newControl, position); return newControl.ContentControl; } which works fine, unless the control that is before the one we want to insert has an empty paragraph at the end. If that is the case, the new ContentControl is inserted within the last control. How can we avoid this?

    Read the article

  • How would you go about parsing markdown?

    - by John Leidegren
    You can find the syntax here. The thing is, the source that follows with the download is written in perl. Which I have no intentions of honoring. It is riddled with regex and it relies on MD5 hashes to escape certain characters. Something is just wrong about that! I'm about to hard code a parser for markdown and I'm wonder if someone had some experience with this? Edit: If you don't have anything meaningful to say about the actual parsing of markdown, spare me the time. (This might sound harsh, but yes, I'm looking for insight, not a solution i.e. third-party library). To help a bit with the answers, regex are meant to identify patterns! NOT to parse an entire grammar. That people consider doing so is foobar. If you think about markdown, it's fundamentally based around the concept of paragraphs. As such, a reasonable approach might be to split the input into paragraphs. There are many kinds of paragraphs e.g. heading, text, list, blockquote, code. The challenge is thus to identify these paragraphs and in what context they occur. I'll be back with a solution, once I find it's worthy to be shared.

    Read the article

  • What is wrong with the JavaScript event handling in this example? (Using click() and hover() jQuery

    - by Bungle
    I'm working on a sort of proof-of-concept for a project that approximates Firebug's inspector tool. For more details, please see this related question. Here is the example page. I've only tested it in Firefox: http://troy.onespot.com/static/highlight.html The idea is that, when you're mousing over any element that can contain text, it should "highlight" with a light gray background to indicate the boundaries of that element. When you then click on the element, it should alert() a CSS selector that matches it. This is somewhat working in the example linked above. However, there's one fundamental problem. When mousing over from the top of the page to the bottom, it will pick up the paragraphs, <h1> element, etc. But, it doesn't get the <div>s that encompass those paragraphs. However, for example, if you "sneak up" on the <div> that contains the two paragraphs "The area was settled..." and "Austin was selected..." from the left - tracing down the left edge of the page and entering the <div> just between the two paragraphs (see this screenshot) - then it is picked up. I assume this has something to do with the fact that I haven't attached an event handler to the <body> element (where you're entering the <div> from if you enter from the left), but I have attached handlers to the <p>s (where you're entering from if you come from the top or bottom). There are also other issues with mousing in and out elements - background colors that "stick" and the like - that I think are also related. As indicated in the related question posted above, I suspect there is something about event bubbling that I don't understand that is causing unexpected behavior. Can anyone spot what's wrong with my code? Thanks in advance for any help!

    Read the article

  • How would I make this faster? Parsing Word/sorting by heading [on hold]

    - by Doof12
    Currently it takes about 3 minutes to run through a single 53 page word document. Hopefully you all have some advice about speeding up the process. Code: import win32com.client as win32 from glob import glob import io import re from collections import namedtuple from collections import defaultdict import pprint raw_files = glob('*.docx') word = win32.gencache.EnsureDispatch('Word.Application') word.Visible = False oFile = io.open("rawsort.txt", "w+", encoding = "utf-8")#text dump doccat= list() for f in raw_files: word.Documents.Open(f) doc = word.ActiveDocument #whichever document is active at the time doc.ConvertNumbersToText() print doc.Paragraphs.Count for x in xrange(1, doc.Paragraphs.Count+1):#for loop to print through paragraphs oText = doc.Paragraphs(x) if not oText.Range.Tables.Count >0 : results = re.match('(?P<number>(([1-3]*[A-D]*[0-9]*)(.[1-3]*[0-9])+))', oText.Range.Text) stylematch = re.match('Heading \d', oText.Style.NameLocal) if results!= None and oText.Style != None and stylematch != None: doccat.append((oText.Style.NameLocal, oText.Range.Text[:len(results.group('number'))],oText.Range.Text[len(results.group('number')):])) style = oText.Style.NameLocal else: if oText.Range.Font.Bold == True : doccat.append(style, oText) oFile.write(unicode(doccat)) oFile.close() The for Paragraph loop obviously takes the most amount of time. Is there some way of identifying and appending it without going through every Paragraph?

    Read the article

  • Unicode paragraph end/line break breaking space / non breaking space aware text editor

    - by martinr
    I want one of those to write my blog articles with. I'm tired of manually converting breaks from rough notes to either paragraphs or line breaks for release as HTML, and tired of converting spaces to breaking or non-breaking ones. There are standard Unicode code points for the difference - what editor lets me use almost plain ASCII text but with builtin support and understanding for Unicode paragraph and non-breaking space characters? And ideally will let me save straight to either plain text UTF8 or to a file of plain HTML paragraphs?

    Read the article

  • Unicode paragraph end/line break breaking space / non breaking space aware text editor

    - by martinr
    I want one of those to write my blog articles with. I'm tired of manually converting breaks from rough notes to either paragraphs or line breaks for release as HTML, and tired of converting spaces to breaking or non-breaking ones. There are standard Unicode code points for the difference - what editor lets me use almost plain ASCII text but with builtin support and understanding for Unicode paragraph and non-breaking space characters? And ideally will let me save straight to either plain text UTF8 or to a file of plain HTML paragraphs?

    Read the article

  • HTMLencode HTMLdecode

    - by elenor
    I have a text area and I want to store the text entered by user in database with html formatting like paragraph break, numbered list. I am using HTMLencode and HTMLdecode for this. Sample of my code is like this: string str1 = Server.HtmlEncode(TextBox1.Text); Response.Write(Server.HtmlDecode(str1)); If user entered text with 2 paragraphs, str1 shows characters \r\n\r\n between paragraphs. but when it writes it to screen, just append 2nd paragraph with 1st. While I'm decoding it, why doesn't it print 2 paragraphs?

    Read the article

  • UITableViewCell repeating problem

    - by cannyboy
    I have a UItableview with cells. Some cells have uilabels and some have uibuttons. The UIbuttons are created whenever the first character in an array is "^". However, the uibuttons repeat when i scroll down (appearing over the uilabel).. and then multiply over the uilabels when I scroll up. Any clues why? My voluminous code is below: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { const NSInteger LABEL_TAG = 1001; UILabel *label; UIButton *linkButton; //NSString *linkString; static NSString *CellIdentifier; UITableViewCell *cell; CellIdentifier = @"TableCell"; cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; label = [[UILabel alloc] initWithFrame:CGRectZero]; [cell.contentView addSubview:label]; [label setLineBreakMode:UILineBreakModeWordWrap]; [label setMinimumFontSize:FONT_SIZE]; [label setNumberOfLines:0]; //[label setBackgroundColor:[UIColor redColor]]; [label setTag:LABEL_TAG]; NSString *firstChar = [[paragraphs objectAtIndex:indexPath.row] substringToIndex:1]; NSLog(@"firstChar %@", firstChar); NSLog(@"before comparison"); if ([firstChar isEqualToString:@"^"]) { // not called NSLog(@"BUTTON"); //[label setFont:[UIFont boldSystemFontOfSize:FONT_SIZE]]; linkButton = [UIButton buttonWithType:UIButtonTypeCustom]; linkButton.frame = CGRectMake(CELL_CONTENT_MARGIN, CELL_CONTENT_MARGIN, 280, 30); [cell.contentView addSubview:linkButton]; NSString *myString = [paragraphs objectAtIndex:indexPath.row]; NSArray *myArray = [myString componentsSeparatedByCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@"*"]]; NSString *noHash = [myArray objectAtIndex:1]; [linkButton setBackgroundImage:[UIImage imageNamed:@"linkButton.png"] forState:UIControlStateNormal]; linkButton.adjustsImageWhenHighlighted = YES; [linkButton setTitle:noHash forState:UIControlStateNormal]; linkButton.titleLabel.font = [UIFont systemFontOfSize:FONT_SIZE]; [linkButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; [linkButton setTag:indexPath.row]; [linkButton addTarget:self action:@selector(openSafari:) forControlEvents:UIControlEventTouchUpInside]; //size = [noAsterisks sizeWithFont:[UIFont boldSystemFontOfSize:FONT_SIZE] constrainedToSize:constraint lineBreakMode:UILineBreakModeWordWrap]; [label setBackgroundColor:[UIColor clearColor]]; [label setText:@""]; } cell.selectionStyle = UITableViewCellSelectionStyleNone; } else { label = (UILabel *)[cell viewWithTag:LABEL_TAG]; NSString *firstChar = [[paragraphs objectAtIndex:indexPath.row] substringToIndex:1]; NSLog(@"firstChar %@", firstChar); NSLog(@"before comparison"); if ([firstChar isEqualToString:@"^"]) { NSLog(@"cell not nil, reusing linkButton"); linkButton = (UIButton *)[cell viewWithTag:indexPath.row]; } } if (!label) label = (UILabel*)[cell viewWithTag:LABEL_TAG]; NSString *textString = [paragraphs objectAtIndex:indexPath.row]; NSString *noAsterisks = [textString stringByReplacingOccurrencesOfString:@"*" withString:@""] ; CGSize constraint = CGSizeMake(CELL_CONTENT_WIDTH - (CELL_CONTENT_MARGIN * 2), 20000.0f); CGSize size; NSString *firstChar = [[paragraphs objectAtIndex:indexPath.row] substringToIndex:1]; //NSLog(@"firstChar %@", firstChar); if ([firstChar isEqualToString:@"^"]) { NSLog(@"BUTTON2"); if (!linkButton) linkButton = (UIButton*)[cell viewWithTag:indexPath.row]; linkButton = [UIButton buttonWithType:UIButtonTypeCustom]; linkButton.frame = CGRectMake(CELL_CONTENT_MARGIN, CELL_CONTENT_MARGIN, 280, 30); [cell.contentView addSubview:linkButton]; NSString *myString = [paragraphs objectAtIndex:indexPath.row]; NSArray *myArray = [myString componentsSeparatedByCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@"*"]]; NSString *noHash = [myArray objectAtIndex:1]; [linkButton setBackgroundImage:[UIImage imageNamed:@"linkButton.png"] forState:UIControlStateNormal]; linkButton.adjustsImageWhenHighlighted = YES; [linkButton setTitle:noHash forState:UIControlStateNormal]; linkButton.titleLabel.font = [UIFont systemFontOfSize:FONT_SIZE]; [linkButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; [linkButton setTag:indexPath.row]; [linkButton addTarget:self action:@selector(openSafari:) forControlEvents:UIControlEventTouchUpInside]; size = [noAsterisks sizeWithFont:[UIFont boldSystemFontOfSize:FONT_SIZE] constrainedToSize:constraint lineBreakMode:UILineBreakModeWordWrap]; [label setBackgroundColor:[UIColor clearColor]]; [label setText:@""]; } else if ([firstChar isEqualToString:@"*"]) { size = [noAsterisks sizeWithFont:[UIFont boldSystemFontOfSize:FONT_SIZE] constrainedToSize:constraint lineBreakMode:UILineBreakModeWordWrap]; [label setFont:[UIFont boldSystemFontOfSize:FONT_SIZE]]; [label setText:noAsterisks]; NSLog(@"bold"); } else { size = [noAsterisks sizeWithFont:[UIFont systemFontOfSize:FONT_SIZE] constrainedToSize:constraint lineBreakMode:UILineBreakModeWordWrap]; [label setFont:[UIFont systemFontOfSize:FONT_SIZE]]; [label setText:noAsterisks]; } [label setFrame:CGRectMake(CELL_CONTENT_MARGIN, CELL_CONTENT_MARGIN, CELL_CONTENT_WIDTH - (CELL_CONTENT_MARGIN * 2), MAX(size.height, 20.0f))]; cell.selectionStyle = UITableViewCellSelectionStyleNone; cell.accessoryType = UITableViewCellAccessoryNone; return cell; }

    Read the article

  • CSS class equivalent for LaTeX

    - by Ryan Scott Bardsley
    I am trying to figure out if there is a way to apply the CSS methodology to the LaTeX template I am building. What I would like to do is to have a set of classes that apply a specific style treatment to the bracketed words. For example: If I have three paragraphs of text, I want to have all of the paragraphs have [0.5cm] of spacing after the last line without having to add \\[0.5cm] after each paragraph. Is there a LaTeX equivalent of defining the treatment for all paragraphs in the preamble so that it cascades throughout my document? The equivalent of: <style> p {padding-bottom:0.5cm} </style> I want to be able to specify multiple version of these CSS-like LaTeX classes throughout my document, so I don't need a specific solution. I need help understanding how to add custom labels/names/classes to the preamble and an example of how to use them in the document itself. Thanks! Ryan

    Read the article

  • apply CSS style to particular elements dynamically

    - by WHITECOLOR
    I have a div with paragraphs inside: <div> <p>...</p> <p>...</p> </div> I want dynamically to apply a certain style to paragraphs inside this div. Is it possible to do that without handling each paragraph element, but just attach somehow style to div element and all inside paragraphs would be affected? Maybe with jquery. It sounds for me like dynamical change of the stylesheet, is it possbile? Thanks.

    Read the article

  • how to developing "document plagiarism checker" website in asp.net?

    - by user1637402
    i know this website write-check his functionality is uploading a file(PDF,Doc) and check percentage of redundancy between the file uploaded and a lot of websites ,books,researches and after user upload file and result shows that result show redundancy percentage and highlight on copied paragraphs . that paragraphs were repeated in website references when user hover on these highlights the source or references appear to the user to make sure the source he copied from this is explain simply for website functionality can any one help me in analysis for asp.net website has the same functionality and how check between uploaded file and archived files

    Read the article

  • how to align floats in IE6

    - by rei
    Good day! I am having problems displaying floated paragraphs and images in IE6. There was no problem displaying those in Opera and Firefox,though. I have three divs inside a container. Each div has its own paragraph and image either floated to the left or right. In order for me to achieve a desired layout, I set negative margins on most of the paragraphs and images. Here is how I aligned the floats: ----- CSS code for the first div ----- .row1 { float:left; width:790px; height:460px; margin:5px 0 0 40px; } .pic1 { float:right; height:460px; width:382px; margin:-100px -50px 0 -60px; } h2, p { font-family:Arial, Helvetica, sans-serif; } .row1 p { font-size:12px; text-indent:20px; font-weight:bold; text-align:justify; margin:-10px -25px 0 0; position:relative; } ----------- code for the 2nd div ------------- .row2 { float:left; width:790px; height:234px; margin:-185px 0 0 28px; position:relative; } .row2 p { float:right; font-size:12px; font-weight:bold; text-align:justify; text-indent:20px; margin:-195px 258px 0 175px; position:relative; } .pic2 { float:left; } --------- code for the 3rd div --------------- .row3 { float:left; width:790px; height:203px; margin:-10px 0 0 40px; position:relative; } .row3 p { float:left; font-size:12px; font-weight:bold; text-indent:20px; text-align:justify; margin:-180px 265px 0 10px; position:relative; } .pic3 { float:right; } ///////// The paragraphs seem to be far away from the images when viewed in IE6. Some paragraphs are overlapping with other images. I hope you can help me with this one. Thanks, Rei

    Read the article

  • Bullet indents in PowerPoint 2007 compatibility mode via .NET interop issue

    - by L. Shaydariv
    Hello. I've got a really difficult bug and I can't see the fix. The subject drives me insane for real for a long time. Let's consider the following scenario: 1) There is a PowerPoint 2003 presentation. It contains the only slide and the only shape, but the shape contains a text frame including a bulleted list with a random textual representation structure. 2) There is a requirement to get bullet indents for every bulletted paragraph using PowerPoint 2007. I can satisfy the requirement opening the presentation in the compatibility mode and applying the following VBA script: With ActivePresentation Dim sl As Slide: Set sl = .Slides(1) Dim sh As Shape: Set sh = sl.Shapes(1) Dim i As Integer For i = 1 To sh.TextFrame.TextRange.Paragraphs.Count Dim para As TextRange: Set para = sh.TextFrame.TextRange.Paragraphs(i, 1) Debug.Print para.Text; para.indentLevel, sh.TextFrame.Ruler.Levels(para.indentLevel).FirstMargin Next i End With that produces the following output: A 1 0 B 1 0 C 2 24 D 3 60 E 5 132 Obviously, everything is perfect indeed: it has shown the proper list item text, list item level and its bullet indent. But I can't see the way of how I can reach the same result using C#. Let's add a COM-reference to Microsoft.Office.Interop.PowerPoint 2.9.0.0 (taken from MSPPT.OLB, MS Office 12): // presentation = ...("presentation.ppt")... // a PowerPoint 2003 presentation Slide slide = presentation.Slides[1]; Shape shape = slide.Shapes[1]; for (int i = 1; i<=shape.TextFrame.TextRange.Paragraphs(-1, -1).Count; i++) { TextRange paragraph = shape.TextFrame.TextRange.Paragraphs(i, 1); Console.WriteLine("{0} {1} {2}", paragraph.Text, paragraph.IndentLevel, shape.TextFrame.Ruler.Levels[paragraph.IndentLevel].FirstMargin); } Oh, man... What's it? I've got problems here. First, the paragraph.Text value is trimmed until the '\r' character is found (however paragraph.Text[0] really returns the first character O_o). But it's ok, I can shut my eyes to this. But... But, second, I can't understand why the first margins are always zero and it does not matter which level they belong to. They are always zero in the compatibility mode... It's hard to believe it... :) So is there any way to fix it or just to find a workaround? I'd like to accept any help regarding to the solution of the subject. I can't even find any article related to the issue. :( Probably you have ever been face to face with it... Or is it just a bug with no fix and must it be reported to Microsoft? Thanks you.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10  | Next Page >