Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/PreTeXtBook/pretext into …
Browse files Browse the repository at this point in the history
…previews
  • Loading branch information
oscarlevin committed Jun 16, 2024
2 parents 6dc64e2 + 47f2e27 commit 5cac359
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 19 deletions.
2 changes: 1 addition & 1 deletion doc/guide/author/overview.xml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
<title>Images</title>
<idx>image</idx>

<p>You can include an image via the <tag>image</tag><idx>image</idx> tag, using the <attr>source</attr> attribute to provide a filename, likely prefixed by a relative path from the top-level of the appropriate directory. Read <xref ref="processing-directory-management"/> for details on how to set these directories correctly. If you are starting a new project, using the <pretext />-CLI (with the command <c>pretext new book</c>, for example), then most of the setup portion is done for you and the top-level directory for images that are created external to the project is called <c>assests</c>, and it is a sibling of the <c>source</c> directory. It is your responsibility to locate that file properly relative to this directory, and that the file format is compatible. So, for example, suppose your source contained <c>&lt;image source="images/butterflies.jpg"/&gt;</c>. Then you would want to have a directory named <c>images</c> below wherever you set the <attr>external</attr> top-level directory, and you would place the <c>butterflies.jpg</c> file inside of the <c>images</c> directory.</p>
<p>You can include an image via the <tag>image</tag><idx>image</idx> tag, using the <attr>source</attr> attribute to provide a filename, likely prefixed by a relative path from the top-level of the appropriate directory. Read <xref ref="processing-directory-management"/> for details on how to set these directories correctly. If you are starting a new project, using the <pretext />-CLI (with the command <c>pretext new book</c>, for example), then most of the setup portion is done for you and the top-level directory for images that are created external to the project is called <c>assets</c>, and it is a sibling of the <c>source</c> directory. It is your responsibility to locate that file properly relative to this directory, and that the file format is compatible. So, for example, suppose your source contained <c>&lt;image source="images/butterflies.jpg"/&gt;</c>. Then you would want to have a directory named <c>images</c> below wherever you set the <attr>external</attr> top-level directory, and you would place the <c>butterflies.jpg</c> file inside of the <c>images</c> directory.</p>

<p>The <attr>width</attr> attribute can be used to control the size of the image. Widths are expressed as a percentage of the available width, such as <c>width="60%"</c>. Instead of a width, you can also specify margins and the width will be deduced.</p>

Expand Down
9 changes: 2 additions & 7 deletions doc/guide/publisher/instructor-version.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,12 @@
<section>
<title>Notes and Commentary</title>

<p>The <tag>commentary</tag> element is designed primarily for the purpose of adding material to a document to make an enhanced version. It is similar in many ways to a <tag>paragraphs</tag> in that it can be placed within any division and must be titled. The main difference is that it is not displayed by default, so you must set a processing switch to enable its appearance. In the project manifest inside your desired target, add the following.
<p>The <tag>commentary</tag> element is designed primarily for the purpose of adding material to a document to make an enhanced version (see <xref ref="publisher-versions"/>). It is similar in many ways to a <tag>paragraphs</tag> in that it can be placed within any division and must be titled.
</p>
<pre>
<![CDATA[
<stringparam key="commentary" value="yes"/>
]]>
</pre>

<p>
Other distinctions are:<ul>
<li>Since it is elective, you need to be careful about cross-references to and from a <tag>commentary</tag>. It is highly likely that you will want to make cross-references <em>within</em> a <tag>commentary</tag> <em>pointing to</em> other portions of your text, and this is always a good idea. You will want to avoid making cross-references <em>to</em> a <tag>commentary</tag> from other parts of the text, with the exception of a cross-reference that originates <em>within</em> some <tag>commentary</tag>.</li>
<li>Since it is often elective, you need to be careful about cross-references to and from a <tag>commentary</tag>. It is highly likely that you will want to make cross-references <em>within</em> a <tag>commentary</tag> <em>pointing to</em> other portions of your text, and this is always a good idea. You will want to avoid making cross-references <em>to</em> a <tag>commentary</tag> from other parts of the text, with the exception of a cross-reference that originates <em>within</em> some <tag>commentary</tag>.</li>
<li>Numbered items are prohibited within a <tag>commentary</tag>, such as a <tag>figure</tag> or a <tag>theorem</tag>. Doing so would disrupt consecutive numbering in different versions, with or without, <tag>commentary</tag> included. Numbered equations are not prohibited in the schema, but should definitely be avoided anyway.</li>
</ul></p>
</section>
Expand Down
23 changes: 17 additions & 6 deletions doc/guide/publisher/webwork.xml
Original file line number Diff line number Diff line change
Expand Up @@ -125,16 +125,27 @@
</p>
<pre>
#### Replace essay boxes with a message
my $essay_message = 'If you were logged into a WeBWorK course '
. 'and this problem were assigned to you, '
. 'you would be able to submit an essay answer '
. 'that would be graded later by a human being.';

sub essay_box {
my $out = MODES(
TeX => '',
Latex2HTML => '',
HTML => qq!&lt;P>
If you were logged into a WeBWorK course
and this problem were assigned to you,
you would be able to submit an essay answer
that would be graded later by a human being.
&lt;/P>!,
HTML => qq!&lt;p>$essay_message&lt;/p>!,
PTX => '',
);
$out;
};

sub explanation_box {
return if ($envir{waiveExplanations});
my $out = MODES(
TeX => '',
Latex2HTML => '',
HTML => qq!&lt;p>$essay_message&lt;/p>!,
PTX => '',
);
$out;
Expand Down
10 changes: 5 additions & 5 deletions xsl/localizations/cs-CZ.xml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
<!-- COMPUTATION-LIKE blocks -->
<localization string-id='computation'>Výpočet</localization>
<localization string-id='technology'>Technologie</localization>
<!-- <localization string-id='data'>Data</localization> -->
<localization string-id='data'>Data</localization>
<!-- ASIDE-LIKE blocks -->
<localization string-id='aside'>Poznámka stranou</localization>
<localization string-id='biographical'>Biografická poznámka</localization>
Expand Down Expand Up @@ -155,7 +155,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
<!-- A regular paragraph, not the old sectioning structure -->
<localization string-id='p'>Odstavec</localization>
<localization string-id='blockquote'>Citát</localization>
<!-- <localization string-id='pre'>Code Block</localization> -->
<localization string-id='pre'>Blok kódu</localization>
<!-- Literate programming, a chunk of computer code -->
<localization string-id='fragment'>Fragment</localization>
<!-- Parts of an exercise and its solution -->
Expand Down Expand Up @@ -222,8 +222,8 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
<localization string-id='feedback'>Odezva</localization>
<localization string-id='authored'>Napsáno v PreTeXt</localization>
<!-- Search Results display/dialog -->
<!-- <localization string-id='search-results-heading'>Search Results</localization> -->
<!-- <localization string-id='no-search-results'>No results</localization> -->
<localization string-id='search-results-heading'>Výsledky hledání</localization>
<localization string-id='no-search-results'>Žádné výsledky</localization>
<!-- Parts of memos and letters -->
<localization string-id='to'>Komu</localization>
<localization string-id='from'>Od</localization>
Expand Down Expand Up @@ -262,5 +262,5 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
<localization string-id='reset'>Reset</localization>
<localization string-id='array'>pole</localization>
<localization string-id='print'>Tisk</localization>
<!-- <localization string-id='close'>Close</localization> -->
<localization string-id='close'>Zavřít</localization>
</locale>

0 comments on commit 5cac359

Please sign in to comment.