forked from typst/typst
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from summer-breeze123/main
第一次更新公告&Text部分翻译
- Loading branch information
Showing
31 changed files
with
3,728 additions
and
3,718 deletions.
There are no files selected for viewing
This file contains 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,69 +1,69 @@ | ||
route: /docs/reference/text/emph/ | ||
title: Emphasis | ||
description: Documentation for the `emph` function. | ||
part: null | ||
outline: | ||
- id: summary | ||
name: Summary | ||
children: [] | ||
- id: example | ||
name: Example | ||
children: [] | ||
- id: syntax | ||
name: Syntax | ||
children: [] | ||
- id: parameters | ||
name: Parameters | ||
children: | ||
- id: parameters-body | ||
name: body | ||
children: [] | ||
body: | ||
kind: func | ||
content: | ||
path: | ||
- emph | ||
display: Emphasis | ||
keywords: null | ||
oneliner: Emphasizes content by setting it in italics. | ||
element: true | ||
details: |- | ||
<p>Emphasizes content by setting it in italics.</p> | ||
<ul> | ||
<li>If the current <a href="/docs/reference/text/text/#parameters-style">text style</a> is <code><span class="typ-str">"normal"</span></code>, | ||
this turns it into <code><span class="typ-str">"italic"</span></code>.</li> | ||
<li>If it is already <code><span class="typ-str">"italic"</span></code> or <code><span class="typ-str">"oblique"</span></code>, | ||
it turns it back to <code><span class="typ-str">"normal"</span></code>.</li> | ||
</ul> | ||
<h2 id="example">Example</h2> | ||
<div class="previewed-code"><pre><code>This is <span class="typ-emph">_emphasized._</span> <span class="typ-escape">\</span> | ||
This is <span class="typ-func">#</span><span class="typ-func">emph</span><span class="typ-punct">[</span>too.<span class="typ-punct">]</span> | ||
<span class="typ-key">#</span><span class="typ-key">show</span> <span class="typ-func">emph</span><span class="typ-punct">:</span> it <span class="typ-op">=></span> <span class="typ-punct">{</span> | ||
<span class="typ-func">text</span><span class="typ-punct">(</span>blue<span class="typ-punct">,</span> it<span class="typ-punct">.</span>body<span class="typ-punct">)</span> | ||
<span class="typ-punct">}</span> | ||
This is <span class="typ-emph">_emphasized_</span> differently. | ||
</code></pre><div class="preview"><img src="/assets/docs/e994151e9b1baafdc57d2fb5046ee42b.png" alt="Preview" width="480" height="190"/></div></div> | ||
<h2 id="syntax">Syntax</h2> | ||
<p>This function also has dedicated syntax: To emphasize content, simply | ||
enclose it in underscores (<code>_</code>). Note that this only works at word | ||
boundaries. To emphasize part of a word, you have to use the function.</p> | ||
params: | ||
- name: body | ||
details: <p>The content to emphasize.</p> | ||
example: null | ||
types: | ||
- content | ||
strings: [] | ||
default: null | ||
positional: true | ||
named: false | ||
required: true | ||
variadic: false | ||
settable: false | ||
returns: | ||
- content | ||
methods: [] | ||
scope: [] | ||
children: [] | ||
route: /docs/reference/text/emph/ | ||
title: Emphasis | ||
description: Documentation for the `emph` function. | ||
part: null | ||
outline: | ||
- id: summary | ||
name: Summary | ||
children: [] | ||
- id: example | ||
name: Example | ||
children: [] | ||
- id: syntax | ||
name: Syntax | ||
children: [] | ||
- id: parameters | ||
name: Parameters | ||
children: | ||
- id: parameters-body | ||
name: body | ||
children: [] | ||
body: | ||
kind: func | ||
content: | ||
path: | ||
- emph | ||
display: Emphasis | ||
keywords: null | ||
oneliner: Emphasizes content by setting it in italics. | ||
element: true | ||
details: |- | ||
<p>Emphasizes content by setting it in italics.</p> | ||
<ul> | ||
<li>If the current <a href="/docs/reference/text/text/#parameters-style">text style</a> is <code><span class="typ-str">"normal"</span></code>, | ||
this turns it into <code><span class="typ-str">"italic"</span></code>.</li> | ||
<li>If it is already <code><span class="typ-str">"italic"</span></code> or <code><span class="typ-str">"oblique"</span></code>, | ||
it turns it back to <code><span class="typ-str">"normal"</span></code>.</li> | ||
</ul> | ||
<h2 id="example">Example</h2> | ||
<div class="previewed-code"><pre><code>This is <span class="typ-emph">_emphasized._</span> <span class="typ-escape">\</span> | ||
This is <span class="typ-func">#</span><span class="typ-func">emph</span><span class="typ-punct">[</span>too.<span class="typ-punct">]</span> | ||
<span class="typ-key">#</span><span class="typ-key">show</span> <span class="typ-func">emph</span><span class="typ-punct">:</span> it <span class="typ-op">=></span> <span class="typ-punct">{</span> | ||
<span class="typ-func">text</span><span class="typ-punct">(</span>blue<span class="typ-punct">,</span> it<span class="typ-punct">.</span>body<span class="typ-punct">)</span> | ||
<span class="typ-punct">}</span> | ||
This is <span class="typ-emph">_emphasized_</span> differently. | ||
</code></pre><div class="preview"><img src="/assets/docs/e994151e9b1baafdc57d2fb5046ee42b.png" alt="Preview" width="480" height="190"/></div></div> | ||
<h2 id="syntax">Syntax</h2> | ||
<p>This function also has dedicated syntax: To emphasize content, simply | ||
enclose it in underscores (<code>_</code>). Note that this only works at word | ||
boundaries. To emphasize part of a word, you have to use the function.</p> | ||
params: | ||
- name: body | ||
details: <p>The content to emphasize.</p> | ||
example: null | ||
types: | ||
- content | ||
strings: [] | ||
default: null | ||
positional: true | ||
named: false | ||
required: true | ||
variadic: false | ||
settable: false | ||
returns: | ||
- content | ||
methods: [] | ||
scope: [] | ||
children: [] |
This file contains 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
This file contains 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,71 +1,71 @@ | ||
route: /docs/reference/text/linebreak/ | ||
title: Line Break | ||
description: Documentation for the `linebreak` function. | ||
part: null | ||
outline: | ||
- id: summary | ||
name: Summary | ||
children: [] | ||
- id: example | ||
name: Example | ||
children: [] | ||
- id: syntax | ||
name: Syntax | ||
children: [] | ||
- id: parameters | ||
name: Parameters | ||
children: | ||
- id: parameters-justify | ||
name: justify | ||
children: [] | ||
body: | ||
kind: func | ||
content: | ||
path: | ||
- linebreak | ||
display: Line Break | ||
keywords: null | ||
oneliner: Inserts a line break. | ||
element: true | ||
details: |- | ||
<p>Inserts a line break.</p> | ||
<p>Advances the paragraph to the next line. A single trailing line break at the | ||
end of a paragraph is ignored, but more than one creates additional empty | ||
lines.</p> | ||
<h2 id="example">Example</h2> | ||
<div class="previewed-code"><pre><code><span class="typ-strong">*Date:*</span> 26.12.2022 <span class="typ-escape">\</span> | ||
<span class="typ-strong">*Topic:*</span> Infrastructure Test <span class="typ-escape">\</span> | ||
<span class="typ-strong">*Severity:*</span> High <span class="typ-escape">\</span> | ||
</code></pre><div class="preview"><img src="/assets/docs/2df1c0e733c1628030900158678b67c9.png" alt="Preview" width="480" height="190"/></div></div> | ||
<h2 id="syntax">Syntax</h2> | ||
<p>This function also has dedicated syntax: To insert a line break, simply write | ||
a backslash followed by whitespace. This always creates an unjustified | ||
break.</p> | ||
params: | ||
- name: justify | ||
details: |- | ||
<p>Whether to justify the line before the break.</p> | ||
<p>This is useful if you found a better line break opportunity in your | ||
justified text than Typst did.</p> | ||
example: |- | ||
<div class="previewed-code"><pre><code><span class="typ-key">#</span><span class="typ-key">set</span> <span class="typ-func">par</span><span class="typ-punct">(</span>justify<span class="typ-punct">:</span> <span class="typ-key">true</span><span class="typ-punct">)</span> | ||
<span class="typ-key">#</span><span class="typ-key">let</span> jb <span class="typ-op">=</span> <span class="typ-func">linebreak</span><span class="typ-punct">(</span>justify<span class="typ-punct">:</span> <span class="typ-key">true</span><span class="typ-punct">)</span> | ||
I have manually tuned the <span class="typ-pol">#</span><span class="typ-pol">jb</span> | ||
line breaks in this paragraph <span class="typ-pol">#</span><span class="typ-pol">jb</span> | ||
for an <span class="typ-emph">_interesting_</span> result. <span class="typ-pol">#</span><span class="typ-pol">jb</span> | ||
</code></pre><div class="preview"><img src="/assets/docs/71d5dafb28147bb22ac8ddaa28f4f93a.png" alt="Preview" width="480" height="190"/></div></div> | ||
types: | ||
- boolean | ||
strings: [] | ||
default: <code><span class="typ-key">false</span></code> | ||
positional: false | ||
named: true | ||
required: false | ||
variadic: false | ||
settable: true | ||
returns: | ||
- content | ||
methods: [] | ||
scope: [] | ||
children: [] | ||
route: /docs/reference/text/linebreak/ | ||
title: Line Break | ||
description: Documentation for the `linebreak` function. | ||
part: null | ||
outline: | ||
- id: summary | ||
name: Summary | ||
children: [] | ||
- id: example | ||
name: Example | ||
children: [] | ||
- id: syntax | ||
name: Syntax | ||
children: [] | ||
- id: parameters | ||
name: Parameters | ||
children: | ||
- id: parameters-justify | ||
name: justify | ||
children: [] | ||
body: | ||
kind: func | ||
content: | ||
path: | ||
- linebreak | ||
display: Line Break | ||
keywords: null | ||
oneliner: Inserts a line break. | ||
element: true | ||
details: |- | ||
<p>Inserts a line break.</p> | ||
<p>Advances the paragraph to the next line. A single trailing line break at the | ||
end of a paragraph is ignored, but more than one creates additional empty | ||
lines.</p> | ||
<h2 id="example">Example</h2> | ||
<div class="previewed-code"><pre><code><span class="typ-strong">*Date:*</span> 26.12.2022 <span class="typ-escape">\</span> | ||
<span class="typ-strong">*Topic:*</span> Infrastructure Test <span class="typ-escape">\</span> | ||
<span class="typ-strong">*Severity:*</span> High <span class="typ-escape">\</span> | ||
</code></pre><div class="preview"><img src="/assets/docs/2df1c0e733c1628030900158678b67c9.png" alt="Preview" width="480" height="190"/></div></div> | ||
<h2 id="syntax">Syntax</h2> | ||
<p>This function also has dedicated syntax: To insert a line break, simply write | ||
a backslash followed by whitespace. This always creates an unjustified | ||
break.</p> | ||
params: | ||
- name: justify | ||
details: |- | ||
<p>Whether to justify the line before the break.</p> | ||
<p>This is useful if you found a better line break opportunity in your | ||
justified text than Typst did.</p> | ||
example: |- | ||
<div class="previewed-code"><pre><code><span class="typ-key">#</span><span class="typ-key">set</span> <span class="typ-func">par</span><span class="typ-punct">(</span>justify<span class="typ-punct">:</span> <span class="typ-key">true</span><span class="typ-punct">)</span> | ||
<span class="typ-key">#</span><span class="typ-key">let</span> jb <span class="typ-op">=</span> <span class="typ-func">linebreak</span><span class="typ-punct">(</span>justify<span class="typ-punct">:</span> <span class="typ-key">true</span><span class="typ-punct">)</span> | ||
I have manually tuned the <span class="typ-pol">#</span><span class="typ-pol">jb</span> | ||
line breaks in this paragraph <span class="typ-pol">#</span><span class="typ-pol">jb</span> | ||
for an <span class="typ-emph">_interesting_</span> result. <span class="typ-pol">#</span><span class="typ-pol">jb</span> | ||
</code></pre><div class="preview"><img src="/assets/docs/71d5dafb28147bb22ac8ddaa28f4f93a.png" alt="Preview" width="480" height="190"/></div></div> | ||
types: | ||
- boolean | ||
strings: [] | ||
default: <code><span class="typ-key">false</span></code> | ||
positional: false | ||
named: true | ||
required: false | ||
variadic: false | ||
settable: true | ||
returns: | ||
- content | ||
methods: [] | ||
scope: [] | ||
children: [] |
Oops, something went wrong.