- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13
          /docs/reference/html/の翻訳
          #300
        
          New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Merged
      
      
    
  
     Merged
                    Changes from 6 commits
      Commits
    
    
            Show all changes
          
          
            20 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      00b72f3
              
                `/docs/reference/html/`の翻訳
              
              
                gomazarashi 4ada65d
              
                翻訳完了
              
              
                gomazarashi e4086ba
              
                表現を修正
              
              
                gomazarashi 70dadc9
              
                不要な空白を削除
              
              
                gomazarashi b2aec59
              
                抜けている訳を追加
              
              
                gomazarashi ce7907a
              
                誤解を招く訳を修正
              
              
                gomazarashi c204ded
              
                オプション引数に関する訳を修正
              
              
                gomazarashi 32d4de4
              
                アクセシビリティに関する訳を修正
              
              
                gomazarashi 96fe9f7
              
                要素の想定用途に関する訳を自然なものに変更
              
              
                gomazarashi 5d04b19
              
                オプションの指定に関する訳を修正
              
              
                gomazarashi 2f6dcbb
              
                オプションの指定に関する訳を修正
              
              
                gomazarashi 73350dd
              
                ポート番号に関する訳を修正
              
              
                gomazarashi 764a9c5
              
                `--no-serve`オプションに関する訳を修正
              
              
                gomazarashi 5fd0888
              
                HTML固有の機能に関する訳を修正
              
              
                gomazarashi 1cef440
              
                `--no-reload`オプションに関する訳を修正
              
              
                gomazarashi 3a2ac88
              
                フラグメント出力に関する訳を自然なものに変更
              
              
                gomazarashi e540cbc
              
                HTMLファイルに関する表現を変更
              
              
                gomazarashi a3bf6a5
              
                「環境変数」を補完
              
              
                gomazarashi a68d2d4
              
                オプションに関する訳を修正
              
              
                gomazarashi ccc2cb2
              
                設定に関する訳語を修正
              
              
                gomazarashi File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -1,61 +1,61 @@ | ||
| <div class="info-box"> | ||
|  | ||
| Typst's HTML export is currently under active development. The feature is still | ||
| very incomplete and only available for experimentation behind a feature flag. Do | ||
| not use this feature for production use cases. In the CLI, you can experiment | ||
| with HTML export by passing `--features html` or setting the `TYPST_FEATURES` | ||
| environment variables to `html`. In the web app, HTML export is not available at | ||
| this time. Visit the [tracking issue](https://github.com/typst/typst/issues/5512) | ||
| to follow progress on HTML export and learn more about planned features. | ||
| TypstのHTMLエクスポートは現在積極的に開発が行われています。 | ||
| この機能はまだ非常に不完全であり、機能フラグを有効にした場合に、実験目的でのみ利用可能です。 | ||
| 本番環境における利用ではこの機能を使用しないでください。 | ||
| CLIでは`--features html`を付けるか環境変数`TYPST_FEATURES`に`html`を設定することでHTMLエクスポートを試すことができます。 | ||
| Webアプリでは、現時点でHTMLエクスポートは利用できません。 | ||
| HTMLエクスポートに関する進捗を追跡し、計画されている機能について詳しく知るには、 | ||
| [tracking issue](https://github.com/typst/typst/issues/5512)を参照してください。 | ||
| </div> | ||
|  | ||
| HTML files describe a document structurally. The aim of Typst's HTML export is | ||
| to capture the structure of an input document and produce semantically rich HTML | ||
| that retains this structure. The resulting HTML should be accessible, | ||
| human-readable, and editable by hand and downstream tools. | ||
|  | ||
| PDF, PNG, and SVG export, in contrast, all produce _visual_ representations of a | ||
| fully-laid out document. This divergence in the formats' intents means that | ||
| Typst cannot simply produce perfect HTML for your existing Typst documents. It | ||
| cannot always know what the best semantic HTML representation of your content | ||
| is. | ||
|  | ||
| Instead, it gives _you_ full control: You can check the current export format | ||
| through the [`target`]($target) function and when it is set to HTML, generate [raw HTML | ||
| elements]($html.elem). The primary intended use of these elements is in | ||
| templates and show rules. This way, the document's contents can be fully | ||
| agnostic to the export target and content can be shared between PDF and HTML | ||
| export. | ||
|  | ||
| Currently, Typst will always output a single HTML file. Support for outputting | ||
| directories with multiple HTML documents and assets, as well as support for | ||
| outputting fragments that can be integrated into other HTML documents is | ||
| planned. | ||
|  | ||
| Typst currently does not output CSS style sheets, instead focussing on emitting | ||
| semantic markup. You can of course write your own CSS styles and still benefit | ||
| from sharing your _content_ between PDF and HTML. For the future, we plan to | ||
| give you the option of automatically emitting CSS, taking more of your existing | ||
| set rules into account. | ||
|  | ||
| # Exporting as HTML | ||
| ## Command Line | ||
| Pass `--format html` to the `compile` or `watch` subcommand or provide an output | ||
| file name that ends with `.html`. Note that you must also pass `--features html` | ||
| or set `TYPST_FEATURES=html` to enable this experimental export target. | ||
|  | ||
| When using `typst watch`, Typst will spin up a live-reloading HTTP server. You | ||
| can configure it as follows: | ||
|  | ||
| - Pass `--port` to change the port. (Defaults to the first free port in the | ||
| range 3000-3005.) | ||
| - Pass `--no-reload` to disable injection of a live reload script. (The HTML | ||
| that is written to disk isn't affected either way.) | ||
| - Pass `--no-serve` to disable the server altogether. | ||
|  | ||
| ## Web App | ||
| Not currently available. | ||
|  | ||
| # HTML-specific functionality | ||
| Typst exposes HTML-specific functionality in the global `html` module. See below | ||
| for the definitions it contains. | ||
| HTMLファイルは文書を構造的に記述します。 | ||
|         
                  gomazarashi marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||
| TypstのHTMLエクスポートの目的は、入力文書の構造を捉え、 | ||
| この構造を保持する、意味付けが豊かなHTMLを生成することです。 | ||
| 生成されるHTMLは、アクセシブルで、人間が読みやすく、手作業および下流のツールによって編集可能であるべきです。 | ||
|         
                  gomazarashi marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||
|  | ||
| 対照的に、PDF、PNG、SVGエクスポートはすべて、 | ||
| 完全にレイアウト済みの文書の _視覚的_ 表現を生成します。 | ||
| このようなフォーマットの意図の違いにより、 | ||
| Typstは既存のTypst文書に対して完璧なHTMLを単純に生成することはできません。 | ||
| Typstがあなたのコンテンツにとって最適に意味付けされたHTML表現が何であるかを常に知ることはできないためです。 | ||
|  | ||
| 代わりに、Typstは _あなた_ に完全な制御を委ねます。 | ||
| [`target`]($target)関数で現在のエクスポート形式を確認でき、これがHTMLに設定されている場合、 | ||
| [生のHTML要素]($html.elem)を生成できます。 | ||
| これらの要素の主な想定用途はテンプレートとshowルールにあります。 | ||
|         
                  gomazarashi marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||
| このようにすることで、 | ||
| 文書の内容はエクスポート先に依存せず、PDFとHTMLの両方で共有できます。 | ||
|  | ||
| 現時点では、 | ||
| Typstは常に単一のHTMLファイルを出力します。 | ||
| 複数のHTML文書やアセットを含むディレクトリの出力、 | ||
| 他のHTML文書に統合できるフラグメント出力のサポートが予定されています。 | ||
|         
                  gomazarashi marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||
|  | ||
| Typstは現状ではCSSスタイルシートを出力せず、意味付けされたマークアップの生成に重点を置いています。 | ||
| もちろん、独自にCSSスタイルを書くこともでき、 | ||
| そうすればPDFとHTMLの間で _コンテンツ_ を共有する利点をそのまま享受できます。 | ||
| 将来的には、既存のsetルールをより多く考慮に入れた上で、 | ||
| CSSを自動的に出力するオプションを提供する予定です。 | ||
|  | ||
| # HTML形式でのエクスポート | ||
| ## コマンドライン | ||
| `compile`または`watch`サブコマンドに`--format html`を渡すか、`.html`で終わる出力ファイル名を指定します。 | ||
|         
                  gomazarashi marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||
| この実験的なエクスポートターゲットを有効にするには、`--features html`を渡すか、 | ||
|         
                  gomazarashi marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||
| `TYPST_FEATURES=html`を設定する必要があることに注意してください。 | ||
|         
                  gomazarashi marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||
|  | ||
| `typst watch`を使用すると、Typstはライブリロード対応のHTTPサーバーを起動します。 | ||
| 設定は以下のように行うことができます。 | ||
|         
                  gomazarashi marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||
|  | ||
| - `--port`を渡すとポートを変更します。 | ||
|         
                  gomazarashi marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||
| (デフォルトでは3000-3005の範囲で最初に空いているポートが使用されます)。 | ||
|         
                  gomazarashi marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||
| - `--no-reload`を渡すとライブリロードスクリプトの注入が無効になります。 | ||
|         
                  gomazarashi marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||
| (いずれにせよディスクに書き込まれるHTMLには影響しません)。 | ||
|         
                  gomazarashi marked this conversation as resolved.
              Show resolved
            Hide resolved | ||
| - `--no-serve`を渡すとサーバーが完全に無効になります。 | ||
|         
                  gomazarashi marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||
|  | ||
| ## Webアプリ | ||
| 現在利用できません。 | ||
|  | ||
| # HTML固有の機能 | ||
| Typstでは、グローバルな`html`モジュールを通じてHTMLに特化した機能を提供しています。 | ||
|         
                  gomazarashi marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||
| そのモジュールに含まれる定義については、以下を参照してください。 | ||
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.