HN 日本語サマリー

← 一覧へ戻る
その他

PowerPointファイルの中身とは?

What's in a PowerPoint File? (editide.com)

85 pointsby danielochoa062045 コメント

要約

PowerPointファイル(.pptx)は、スライド、テキストボックス、画像、図形などのコンテンツを格納するZIPアーカイブです。内部では、これらの要素とそのプロパティ(フォントサイズ、位置、色など)がXMLファイルとして構造化されています。この構造は、テキストファイルとフォルダで構成された手動のファイル整理システムをデジタル化したものと考えることができます。

全文翻訳

PowerPointプレゼンテーションはスライドの集まりです。各スライドは、テキストボックス、図形、画像、表、グラフを備えたキャンバスです。アニメーション、SmartArt、ビデオのような派手なものもありますが、プロフェッショナルなスライドの90%にはそれらは必要ありません。PowerPointファイルは、それらのコンテンツをコンピュータが読み取れるように保存する場所です。グラフのタイトルに入力したテキスト、グラフデータを含む埋め込みExcelファイル、会社のロゴを含む.pngファイル、そして画面にレンダリングされる方法を決定するプロパティなどが含まれます。タイトルのフォントサイズ、データラベルのフォントカラー、表の行の高さ、グラフにグリッド線が表示されるかどうかなどです。この情報をどのように保存しますか?テキストファイルにすべて書き留めることを試すことができます。各要素とそのプロパティをリストアップします。これは簡単な例です:「Hello world!」というテキストボックスが1つある空白のスライドです。Notepadを開いて、次のような.txtファイルを作成できます。Slide 1 - Width = 13.33 inches - Height = 7.5 inches - Background = white - Text Box 1 - Text = "Hello world!" - Font family = Arial - Font size = 18 - Font color = black - Position = 5.9 inches from the left edge, 3.5 inches from the top edge もう1つの簡単なスライドを追加したとしましょう。このテキストを.txtファイルに追加します。Slide 2 - Width = 13.33 inches - Height = 7.5 inches - Background = white - Text Box 1 - Text = "This is a circle" - Font family = Arial - Font size = 18 - Font color = black - Position = 5.9 inches from the left edge, 2 inches from the top edge - Shape 1 - Shape type = circle - Fill = red - Height = 2 inches - Width = 2 inches - Position = 5.7 inches from the left edge, 2.75 inches from the top edge これを見て、「うーん、変更されないものを繰り返しているな。すべてのスライドが同じ幅、高さで、同じフォントを使うだろう。整理しよう。」と思います。Presentation - Slide width = 13.33 inches - Slide height = 7.5 inches - Background = white - Font color = black - Font family = Arial - Font size = 18 Slide 1 - Text Box 1 - Text = "Hello world!" - Position = 5.9 inches from the left edge, 3.5 inches from the top edge Slide 2 - Text Box 1 - Text = "This is a circle" - Position = 5.9 inches from the left edge, 2 inches from the top edge - Shape 1 - Shape type = circle - Fill = red - Height = 2 inches - Width = 2 inches - Position = 5.7 inches from the left edge, 2.75 inches from the top edge より良くなりました。しかし、通常の30ページのデッキを持つと、このファイルは非常に大きくなるため、より小さなファイルに分割し、フォルダにグループ化することにします。presentation/ ├── presentation_properties.txt └── slides/ ├── slide1.txt └── slide2.txt Charts and pictures これまでのスライドにはテキストと図形しかありませんでした。会社のロゴはどうでしょうか?すでにフォルダを使っているので、picturesフォルダを追加して、.pngや.jpgファイルをそこに保存します。presentation/ ├── presentation_properties.txt ├── slides/ │ ├── slide1.txt │ └── slide2.txt └── pictures/ └── logo.png そして、スライドでは、単に画像ファイルを参照し、サイズと位置を指定します。このセットアップの良い点は、同じロゴを複数のスライドで使用しても、各画像のコピーを保存する必要がないことです。Slide 3 - Picture - Source = logo.png - Height = 7.5 inches - Width = 7.5 inches - Position = 2.92 inches from the left edge, 0 inches from the top edge 同じ概念をグラフにも使用できます。Excelファイルは数値データを保存するのに便利なので、車輪の再発明をせずに、各グラフに.xlsxファイルを割り当てます。presentation/ ├── presentation_properties.txt ├── slides/ │ ├── slide1.txt │ ├── slide2.txt │ └── slide3.txt ├── pictures/ │ └── logo.png ├── excel/ │ └── book1.xlsx └── charts/ └── chart1.txt Slide 4 - Chart - Source = book1.xlsx - Height = 6 inches - Width = 9 inches - Position = 2.17 inches from the left edge, 0.75 inches from the top edge - Title = Chart Title - Show gridlines = true - Axis max = 6 - Axis units = 1 . . . - Series 3 fill = gray 上記の3つのドットは多くの仕事をしている。グラフには多くのプロパティがあります。データラベルの1文字を太字にしたり、水平軸線を太くしたりできます。複数のグラフを含むスライドがある可能性が高いため、精神的な健康のために、グラフを独自のファイルに移動し、画像ファイルやExcelファイルで使用したのと同じファイル参照戦略を使用することにします。グラフのプロパティを独自のchart1.txtファイルに移動し、slide4.txtファイルを次のように簡略化します。Slide 4 - Chart - Source = chart1.txt - Height = 6 inches - Width = 9 inches - Position = 2.17 inches from the left edge, 0.75 inches from the top edge 最終的なフォルダは次のようになります。presentation/ ├── presentation_properties.txt ├── slides/ │ ├── slide1.txt │ ├── slide2.txt │ ├── slide3.txt │ └── slide4.txt ├── pictures/ │ └── logo.png ├── excel/ │ └── book1.xlsx └── charts/ └── chart1.txt おめでとうございます!.pptxファイルの基本的なアーキテクチャを再現しました。内部では、.pptxファイルは多くの個別のファイルを含むZIPパッケージです。そして、私たちの非公式な.txt形式の代わりに、構造化されたXMLテキストを使用します。PowerPointファイルの1つを.pptxから.zipにリネームして、自分で確認してみてください。そして、slidesフォルダの中には:レイアウトやマスターについては触れませんでしたが、フォルダをリネームすれば、"excel"を"embeddings"に、"pictures"を"media"にリネームすれば、きれいにマッピングされます。XMLは単純なテキストとどう違うのでしょうか?実際に、簡単な「Hello world!」の例を保持するslide1.xmlからの抜粋を解凍してみましょう。<p:cSld> <p:spTree> <p:sp> <p:nvSpPr> <p:cNvPr id="5" name="TextBox 4"> <a:extLst>...</a:extLst> </p:cNvPr> <p:cNvSpPr txBox="1"/> </p:nvSpPr> <p:spPr> <a:xfrm> <a:off x="5359675" y="3244334"/> <a:ext cx="1472650" cy="369332"/> </a:xfrm> <a:prstGeom prst="rect"> <a:avLst/> </a:prstGeom> <a:noFill/> </p:spPr> <p:txBody> <a:bodyPr wrap="square" rtlCol="0"> <a:spAutoFit/> </a:bodyPr> <a:lstStyle/> <a:p> <a:pPr algn="ctr"/> <a:r> <a:rPr lang="en-US" dirty="0"/> <a:t>Hello world!</a:t> </a:r> </a:p> </p:txBody> </p:sp> </p:spTree> </p:cSld> 解読不能な機械的なノイズです。略語を実際の単語に置き換えると、少し良くなります。<CommonSlideData> <ShapeTree> <Shape> <NonVisualShapeProperties> <NonVisualDrawingProperties id="5" name="TextBox 4"> <ExtensionList>...</ExtensionList> </NonVisualDrawingProperties> <NonVisualShapeDrawingProperties isTextBox="1"/> </NonVisualShapeProperties> <ShapeProperties> <Transform> <Offset x="5359675" y="3244334"/> <Extents width="1472650" height="369332"/> </Transform> <PresetGeometry shape="rectangle"> <AdjustValues/> </PresetGeometry> <NoFill/> </ShapeProperties> <TextBody> <BodyProperties wrap="square" rightToLeftColumns="0"> <ShapeAutoFit/> </BodyProperties> <ListStyle/> <Paragraph> <ParagraphProperties alignment="center"/> <Run> <RunProperties language="en-US" dirty="0"/> <Text>Hello world!</Text> </Run> </Paragraph> </TextBody> </Shape> </ShapeTree> </CommonSlideData> XMLの足場と重要度の低い属性を削除すると、次のようになります。Slide - Shapes - TextBox 4 - X coordinate: 5,359,675 - Y coordinate: 3,244,334 - Height: 369,332 - Width: 1,472,650 - Preset Geometry: rectangle - No fill - Text: Hello world! 位置とサイズの数値はインチではなく、EMU(English Metric Unit)と呼ばれる単位です。浮動小数点数を避け、整数で処理するために巨大になっています。元の.txtファイルに近いですね!フォントサイズ18とArialフォントは欠落していますが、これは予想通りです。フォントとフォントサイズはpresentation_properties.txtに書き込んで、各テキストボックスでの繰り返しを避けていました。実際の.pptxファイルでは、テーマフォントファミリーはthemeフォルダのtheme1.xmlに格納されることがあります。<a:fontScheme name="Office"> <a:majorFont> <a:latin typeface="Arial"/> </a:majorFont> <a:minorFont> <a:latin typeface="Arial"/> </a:minorFont> </a:fontScheme> 基本的に.pptxファイルは、プリセットされたXMLファイルのコレクションです。