mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-31 02:04:53 +08:00
15ddf4124c
This change allows users to style images in InDesign bysetting the `object-style` attribute in a pandoc Image, which is mapped to the AppliedObjectStyle attribute in the Rectangle element around an Image element in the resulting ICML.
122 lines
5.0 KiB
Markdown
122 lines
5.0 KiB
Markdown
```
|
|
% pandoc -f markdown -t icml
|
|
{object-style="myStyle"}
|
|
^D
|
|
<ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/Paragraph">
|
|
<CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle">
|
|
<Rectangle Self="uec" StrokeWeight="0" ItemTransform="1 0 0 1 32 -32" AppliedObjectStyle="ObjectStyle/myStyle">
|
|
<Properties>
|
|
<PathGeometry>
|
|
<GeometryPathType PathOpen="false">
|
|
<PathPointArray>
|
|
<PathPointType Anchor="-32 -32" LeftDirection="-32 -32" RightDirection="-32 -32" />
|
|
<PathPointType Anchor="-32 32" LeftDirection="-32 32" RightDirection="-32 32" />
|
|
<PathPointType Anchor="32 32" LeftDirection="32 32" RightDirection="32 32" />
|
|
<PathPointType Anchor="32 -32" LeftDirection="32 -32" RightDirection="32 -32" />
|
|
</PathPointArray>
|
|
</GeometryPathType>
|
|
</PathGeometry>
|
|
</Properties>
|
|
<Image Self="ue6" ItemTransform="1 0 0 1 -32 -32">
|
|
<Properties>
|
|
<Profile type="string">
|
|
$ID/Embedded
|
|
</Profile>
|
|
<GraphicBounds Left="0" Top="0" Right="64" Bottom="64" />
|
|
</Properties>
|
|
<Link Self="ueb" LinkResourceURI="file:command/11498.png" />
|
|
</Image>
|
|
</Rectangle>
|
|
</CharacterStyleRange>
|
|
</ParagraphStyleRange>
|
|
```
|
|
```
|
|
% pandoc -s -f markdown -t icml
|
|
{object-style="myStyle"}
|
|
^D
|
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
<?aid style="50" type="snippet" readerVersion="6.0" featureSet="513" product="8.0(370)" ?>
|
|
<?aid SnippetType="InCopyInterchange"?>
|
|
<Document DOMVersion="8.0" Self="pandoc_doc">
|
|
<RootCharacterStyleGroup Self="pandoc_character_styles">
|
|
<CharacterStyle Self="$ID/NormalCharacterStyle" Name="Default" />
|
|
<CharacterStyle Self="CharacterStyle/" Name="">
|
|
<Properties>
|
|
<BasedOn type="object">$ID/NormalCharacterStyle</BasedOn>
|
|
</Properties>
|
|
</CharacterStyle>
|
|
</RootCharacterStyleGroup>
|
|
<RootParagraphStyleGroup Self="pandoc_paragraph_styles">
|
|
<ParagraphStyle Self="$ID/NormalParagraphStyle" Name="$ID/NormalParagraphStyle"
|
|
SpaceBefore="6" SpaceAfter="6"> <!-- paragraph spacing -->
|
|
<Properties>
|
|
<TabList type="list">
|
|
<ListItem type="record">
|
|
<Alignment type="enumeration">LeftAlign</Alignment>
|
|
<AlignmentCharacter type="string">.</AlignmentCharacter>
|
|
<Leader type="string"></Leader>
|
|
<Position type="unit">10</Position> <!-- first tab stop -->
|
|
</ListItem>
|
|
</TabList>
|
|
</Properties>
|
|
</ParagraphStyle>
|
|
<ParagraphStyle Self="ParagraphStyle/Paragraph" Name="Paragraph" LeftIndent="0">
|
|
<Properties>
|
|
<BasedOn type="object">$ID/NormalParagraphStyle</BasedOn>
|
|
</Properties>
|
|
</ParagraphStyle>
|
|
</RootParagraphStyleGroup>
|
|
<RootTableStyleGroup Self="pandoc_table_styles">
|
|
<TableStyle Self="TableStyle/Table" Name="Table" />
|
|
</RootTableStyleGroup>
|
|
<RootCellStyleGroup Self="pandoc_cell_styles">
|
|
<CellStyle Self="CellStyle/Cell" AppliedParagraphStyle="ParagraphStyle/$ID/[No paragraph style]" Name="Cell" />
|
|
</RootCellStyleGroup>
|
|
<RootObjectStyleGroup Self="pandoc_object_styles">
|
|
<ObjectStyle Self="ObjectStyle/myStyle" Name="myStyle">
|
|
<Properties>
|
|
<BasedOn type="string">$ID/None</BasedOn>
|
|
</Properties>
|
|
</ObjectStyle>
|
|
</RootObjectStyleGroup>
|
|
<Story Self="pandoc_story"
|
|
TrackChanges="false"
|
|
StoryTitle=""
|
|
AppliedTOCStyle="n"
|
|
AppliedNamedGrid="n" >
|
|
<StoryPreference OpticalMarginAlignment="true" OpticalMarginSize="12" />
|
|
|
|
<!-- body needs to be non-indented, otherwise code blocks are indented too far -->
|
|
<ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/Paragraph">
|
|
<CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle">
|
|
<Rectangle Self="uec" StrokeWeight="0" ItemTransform="1 0 0 1 32 -32" AppliedObjectStyle="ObjectStyle/myStyle">
|
|
<Properties>
|
|
<PathGeometry>
|
|
<GeometryPathType PathOpen="false">
|
|
<PathPointArray>
|
|
<PathPointType Anchor="-32 -32" LeftDirection="-32 -32" RightDirection="-32 -32" />
|
|
<PathPointType Anchor="-32 32" LeftDirection="-32 32" RightDirection="-32 32" />
|
|
<PathPointType Anchor="32 32" LeftDirection="32 32" RightDirection="32 32" />
|
|
<PathPointType Anchor="32 -32" LeftDirection="32 -32" RightDirection="32 -32" />
|
|
</PathPointArray>
|
|
</GeometryPathType>
|
|
</PathGeometry>
|
|
</Properties>
|
|
<Image Self="ue6" ItemTransform="1 0 0 1 -32 -32">
|
|
<Properties>
|
|
<Profile type="string">
|
|
$ID/Embedded
|
|
</Profile>
|
|
<GraphicBounds Left="0" Top="0" Right="64" Bottom="64" />
|
|
</Properties>
|
|
<Link Self="ueb" LinkResourceURI="file:command/11498.png" />
|
|
</Image>
|
|
</Rectangle>
|
|
</CharacterStyleRange>
|
|
</ParagraphStyleRange>
|
|
|
|
</Story>
|
|
|
|
</Document>
|
|
```
|