Hi, I'm trying to customize some formating for a table using odfWeave. I'm having some trouble getting the formatting to work. I've defined the following format defns: origStyleDefs <- getStyleDefs() StyleDefs=origStyleDefs StyleDefs$ArialLeftBold$parentStyleName='' StyleDefs$ArialLeftBold$type='Paragraph' StyleDefs$ArialLeftBold$textAlign='left' StyleDefs$ArialLeftBold$fontName='Arial' StyleDefs$ArialLeftBold$fontSize='12pt' StyleDefs$ArialLeftBold$fontType='bold' StyleDefs$ArialLeftBold$fontColor='#000000' StyleDefs$ArialNormalRight$parentStyleName='' StyleDefs$ArialNormalRight$type='Paragraph' StyleDefs$ArialNormalRight$textAlign='end' StyleDefs$ArialNormalRight$fontName='Arial' StyleDefs$ArialNormalRight$fontSize='12pt' StyleDefs$ArialNormalRight$fontType='italic' StyleDefs$ArialNormalRight$fontColor='#000000' #StyleDefs$ArialItalic = StyleDefs$ArialNormal #StyleDefs$ArialItalic$fontType='italic' setStyleDefs(StyleDefs) The ArialNormalRight definition isn't working, though the ArialLeftBold is. Could someone help? Looking at the code, odfWeave uses functions readXML and addStyleDefs, which I cannot find. How should I go about finding these? Abhijit Dasgupta, Ph.D. Assistant Professor | Division of Biostatistics Department of Pharmacology and Experimental Therapeutics | Thomas Jefferson University 1015 Chestnut St | Suite M100 | Philadelphia, PA 19107 Ph: (215) 503-9201 | Fax: (215) 503-3804
Hi, "Doesn't work" is kind of vague... what is or isnt' happening? But in this case, I think it might be easy: On 12/22/06, Abhijit Dasgupta <Abhijit.Dasgupta at mail.jci.tju.edu> wrote:> Hi,> StyleDefs$ArialNormalRight$textAlign='end'I think this should be 'right' rather than 'end. The ODF XML specification is available online, but you can also make a toy example in OpenOffice and then look at its XML if you want to find out what a particular format code is. http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=office For example, make a small table in OpenOffice with one of the cells aligned right, and save it. Find the file, and unzip it into its components. The XML code for your applied formatting will be in content.xml. If you used styles instead of direct formatting, some kinds of styles go in styles.xml and some in content.xml. The same is true for styles applied through odfWeave. Sarah -- Sarah Goslee http://www.functionaldiversity.org