Skip to content

Commit 22b04be

Browse files
wiobberxronosufWim3000
authored
update links test; also make handout and publish to ximera.osu.edu (#10)
* Fixed localization.tex to only load a second language if babel was loaded. * Added as complete the tests that are for hardcoded and/or depreciated. Also reorganized them to their own folders to keep down clutter. Still remains to comment out the documentclass and verify preambles are commented. * review/update test for links * review/update test for links * remove old copy of links.tex * also make handout * update link.tex (add \href and \hyperref) * update README * Publish main also to ximera.osu.edu * update Readme_testing --------- Co-authored-by: Xronos Team <[email protected]> Co-authored-by: Wim Obbels <[email protected]>
1 parent 75ee3ac commit 22b04be

File tree

11 files changed

+175
-39
lines changed

11 files changed

+175
-39
lines changed

.github/workflows/serve-ximera.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@ jobs:
4848
GPG_KEY: ${{ secrets.GPG_KEY }}
4949
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
5050
XIMERA_URL: ${{ vars.XIMERA_URL }}
51-
XIMERA_NAME: ${{ vars.XIMERA_NAME }}${{ github.ref_name }}
51+
XIMERA_NAME: ${{ vars.XIMERA_NAME }}*${{ github.ref_name }}
5252
XOURSES: "." # "./testXourses"
5353
XM_COMPILE_SEQUENCE: "pdf,handout.pdf,html"
5454
run: |
5555
ls -alrt
5656
chmod +x xmScripts/xmlatex # Overleaf sync might reset it :-()
57-
./xmScripts/xmlatex veryclean
57+
# ./xmScripts/xmlatex veryclean
5858
./xmScripts/xmlatex ghaction $XOURSES
5959
echo "✅ Published to $XIMERA_URL$XIMERA_NAME " >> $GITHUB_STEP_SUMMARY
6060
@@ -85,16 +85,25 @@ jobs:
8585
.git/**
8686
key: ximeraSERVE-${{ github.ref_name }}-${{ github.sha }}
8787

88-
- name: Serve
88+
- name: Serve to XIMERA_URL
8989
env:
9090
GPG_KEY: ${{ secrets.GPG_KEY }}
9191
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
9292
XIMERA_URL: ${{ vars.XIMERA_URL }}
9393
XIMERA_NAME: ${{ vars.XIMERA_NAME }}
9494
run: |
95-
chmod +x xmScripts/xmlatex # Overleaf sync might reset it :-()
9695
./xmScripts/xmlatex name
97-
./xmScripts/xmlatex serve -f # NOTE: -f should not be needed ...
96+
./xmScripts/xmlatex serve
97+
echo "✅ Published to $XIMERA_URL$XIMERA_NAME " >> $GITHUB_STEP_SUMMARY
98+
- name: Serve to ximera.osu.edu
99+
env:
100+
GPG_KEY: ${{ secrets.GPG_KEY }}
101+
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
102+
XIMERA_URL: "https://ximera.osu.edu/"
103+
XIMERA_NAME: ${{ vars.XIMERA_NAME }}
104+
run: |
105+
./xmScripts/xmlatex name
106+
./xmScripts/xmlatex serve
98107
echo "✅ Published to $XIMERA_URL$XIMERA_NAME " >> $GITHUB_STEP_SUMMARY
99108
100109

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ This repo contains basic examples of Ximera constructs that can be used as
22
* demo
33
* tests
44

5+
The main branch is published [here](https://set-p-dsb-zomercursus-latest.cloud-ext.icts.kuleuven.be/ximeraexamples/coreXimeraFeatures/environments/theoremEnvironments).
56

7+
Note you can always get the TeX-code by appending .tex to the URL of an activity.
68

79

10+
A more detailed description of how to use this repo for testing is in the [README_testing](README_testing.md)
11+

README_testing.md

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
A possible testing session...
2+
3+
Note: if you just want to *test* or *try* something, and do not plan to make any changes, all forking and making-new-branches can be skipped.
4+
5+
* Fork, clone and checkout your copy of ximeraExamples
6+
```
7+
~/git/ximera/ximeraExamples$ git pull
8+
Already up to date.
9+
```
10+
* Create a new branch for your new development/test (optional)
11+
* The new branch is only needed if you foresee to make new test, or adapt existing ones
12+
```
13+
~/git/ximera/ximeraExamples$ git checkout -b test-link
14+
Switched to a new branch 'test-link'
15+
```
16+
17+
* Setup the to be tested/changed ximeraLatex version:
18+
* if testing a dockerimage, update config.txt(local PC) or docker_compose.yml (in Codespace)
19+
* if you need to try a fix to the contents of the dockerimage, use can use 'xmlatex copySettingsLocal' to create a .ximera_local with the ximealatex contents from the current image.
20+
* if testing an existing ximeraLatex branch (perhaps on a clone somewhere) : check it out in .ximera_local
21+
* if making new changes to ximeraLatex: fork, clone, and checkout a new branch
22+
23+
```
24+
~/git/ximera/ximeraExamples$ git clone https://github.com/bartsnapp/ximeraLatexFrameDev.git .ximera_local
25+
Cloning into '.ximera_local'...
26+
remote: Enumerating objects: 4273, done.
27+
remote: Counting objects: 100% (284/284), done.
28+
remote: Compressing objects: 100% (92/92), done.
29+
remote: Total 4273 (delta 208), reused 193 (delta 192), pack-reused 3989 (from 3)
30+
Receiving objects: 100% (4273/4273), 6.12 MiB | 4.84 MiB/s, done.
31+
Resolving deltas: 100% (2753/2753), done.
32+
```
33+
* Use, update or create a relevant test
34+
* you can use the VSCode 'PDF' or 'HTML' buttons, or the xmlatex script (see infra)
35+
* not the 'USING .ximera_local from local repo' line in the output when you made a .ximera_local
36+
* the .log file wiyll contain detailed info about which files where actually used/included
37+
```
38+
~/git/ximera/ximeraExamples$ xmlatex ghaction testXourses.TODO/linkTest.tex
39+
Restarting myself in docker (from image ghcr.io/ximeraproject/ximeralatex:v2.7.0)
40+
Starting /usr/local/bin/xmlatex ghaction testXourses.TODO/linkTest.tex (on host docker-desktop, i.e. inside a docker container)
41+
USING .ximera_local from local repo
42+
Starting Github-action build (name; bake/frost/serve)
43+
[INFO ] main : Set compile_sequence=pdf,html (and output_formats=pdf,html)
44+
[INFO ] main : Processing argument 1: testXourses.TODO/linkTest.tex
45+
[INFO ] files: Marked source tex NO_COMPILATION for examples.TODO/links/links.tex
46+
[INFO ] files: Marked source tex NEEDS_COMPILATIONS for testXourses.TODO/linkTest.tex
47+
[STATUS ] main : 1 file needs compiling: testXourses.TODO/linkTest.tex
48+
[STATUS ] main : Start bake
49+
[INFO ] bake : Added 2 compile commands for file 1/1: testXourses.TODO/linkTest.tex
50+
[STATUS ] bake : There are 2 commands to run for 1 files
51+
[STATUS ] bake : Command 1/2 (1) starting for pdf of testXourses.TODO/linkTest.tex (pdf|testXourses.TODO/linkTest.tex)
52+
[STATUS ] bake : Command 2/2 (2) starting for html of testXourses.TODO/linkTest.tex (html|testXourses.TODO/linkTest.tex)
53+
[STATUS ] bake : Command 2/2 (2) returns OK after 7.5 seconds (0 failed) for html of testXourses.TODO/linkTest.tex
54+
[INFO ] bake : Command html|testXourses.TODO/linkTest.tex scheduled for RETRY (was job 2 (2))
55+
[STATUS ] bake : Command 2r/2 (2) starting for html of testXourses.TODO/linkTest.tex (html|testXourses.TODO/linkTest.tex)
56+
[INFO ] bake : Moving /code/testXourses.TODO/linkTest.pdf to ximera-downloads/with-answers/testXourses.TODO/linkTest.pdf
57+
[STATUS ] bake : Command 1/2 (1) returns OK after 10.0 seconds (0 failed) for pdf of testXourses.TODO/linkTest.tex
58+
[INFO ] html : No parts found, adding one, as this is needed in (some versions of) the ximeraServer
59+
[INFO ] html : Adapted html being saved as testXourses.TODO/linkTest.html (/code/testXourses.TODO/linkTest.html)
60+
[STATUS ] bake : Command 2r/2 (2) returns OK after 5.0 seconds (0 failed) for html of testXourses.TODO/linkTest.tex
61+
[STATUS ] bake : Finished compiling 1 files in 13.6 seconds
62+
[STATUS ] main : Bake succeeded: Baked 1 files, no errors found
63+
[INFO ] main : Mmm, file testXourses.TODO/linkTest.tex still needs compilation.
64+
[INFO ] main : Still 1 files to be compiled after bake.
65+
[STATUS ] main : Start frost
66+
[WARNING] frost: There are 2 uncommitted files; should serve only to localhost
67+
[WARNING] frost: There are 1 file to be compiled; should serve only to localhost
68+
[INFO ] frost: Adding XOURSE testXourses.TODO/linkTest.tex (Master link Test Xourse)
69+
[INFO ] frost: Found publications/0333286ab0e4c1ceb1046418afcc88032080ff59 (tree:e58298d99203d801017d707c551651ab53fdce1f tag:0333286ab0e4c1ceb1046418afcc88032080ff59)
70+
[STATUS ] frost: Creating tag publications/a40cd692e6e6af56fd0ce8fc37f7db318d567d35 for a40cd692e6e6af56fd0ce8fc37f7db318d567d35
71+
[STATUS ] main : Frost succeeded: Created publications/a40cd692e6e6af56fd0ce8fc37f7db318d567d35
72+
[STATUS ] main : Start serve
73+
[INFO ] frost: Publishing to localhost: http://localhost:2000/ximeraexamples.git
74+
[STATUS ] frost: Forced serving (git push -f ximera publications/a40cd692e6e6af56fd0ce8fc37f7db318d567d35)
75+
[STATUS ] frost: Forced serving (git push -f ximera a40cd692e6e6af56fd0ce8fc37f7db318d567d35:refs/heads/master)
76+
[STATUS ] main : Serve succeeded: Published publications/a40cd692e6e6af56fd0ce8fc37f7db318d567d35to http://localhost:2000/ximeraexamples
77+
```
78+
* Verify the output
79+
80+
* If yoy make useful changes in .ximera_local : commit and push, make a pull request for ximeraLatex
81+
* If you make useful changes in ximeraExamples: commit and push, make a pull request for ximeraExamples
82+
* when in doubt, or when this procedure does not work as advertized: contact ximera-project!
83+
84+
85+
86+
87+
88+

coreXimeraFeatures.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ \part{Other topics}
3939

4040
% \sectionstyle
4141
\activity{./examples.TODO/hidingText/hidingText}
42-
\activity{./examples.TODO/links/links}
42+
\activity{link/link}
4343

4444
%% chapters and sections
4545
%\activity{graphicsAndVideos/graphicsAndVideos}

examples.TODO/links/links.tex

Lines changed: 0 additions & 20 deletions
This file was deleted.

link/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Screenshot of output:
2+
3+
![screenshot expected output](../xmPictures/screenshot_links.png)
4+
5+
6+
7+

link/link.tex

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
\documentclass{ximera}
2+
3+
\title{Links}
4+
5+
\author{Bart Snapp and Wim Obbels}
6+
7+
\begin{document}
8+
\begin{abstract}
9+
Examples of links.
10+
\end{abstract}
11+
\maketitle
12+
13+
\section*{Basic Usage}\label{sec:link:basicUsage}
14+
15+
With \verb|\link{url}| you make a hyperlink: \link{http://ximera.osu.edu}.
16+
17+
With \verb|\link[text]{url}| you display 'text', and not the url: \link[ximera]{http://ximera.osu.edu}.
18+
19+
20+
21+
Notes:
22+
\begin{itemize}
23+
\item \label{link_spaces} Note the spaces in and after a \link[link to ximera]{http://ximera.osu.edu} in a sentence.
24+
\item \label{link_bold} You might want a bold \textbf{\link[link to ximera]{http://ximera.osu.edu}}, or a link with a bold 'ximera' in it: \link[link to \textbf{ximera}]{http://ximera.osu.edu}.
25+
\item \label{link_footnote} The PDF puts links in footnotes\footnote{This is just a normal footnote} at the bottom of the page.
26+
\end{itemize}
27+
28+
Alternatives:
29+
30+
With \verb|\url{url}| you make a hyperlink: \url{http://ximera.osu.edu}.
31+
32+
With \verb|\href{url}{text}| you display 'text', and not the url: \href{http://ximera.osu.edu}{ximera}.
33+
34+
With \verb|\hypertarget{label}{text}| you can create a target to link to: \hypertarget{ht_bold}{this text is important enough to be linked to}.
35+
36+
With \verb|\hyperlink{label}{text}| you can (NOT???) link to a label: see also \hyperlink{ht_bold}{the previous sentence}.
37+
38+
With \verb|\hyperlink{label}{text}| you can also link to a normal \verb|label|: see the item about \hyperlink{link_bold}{bold in links}, or the section with \hyperref[sec:link:intendedOutcome]{outcomes}.
39+
40+
\section*{Intended Outcome of Test}\label{sec:link:intendedOutcome}
41+
42+
TODO
43+
44+
45+
% Compiled at \today\ at \currenttime %% needs datetime
46+
47+
48+
\end{document}

testXourses.TODO/linkTest.tex

Lines changed: 0 additions & 12 deletions
This file was deleted.

testXourses/linkTest.tex

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
\documentclass{xourse}
2+
3+
\title{Test link}
4+
5+
6+
\begin{document}
7+
\maketitle
8+
9+
\activity{../link/link}
10+
11+
12+
\end{document}

xmPictures/screenshot_links.png

27.8 KB
Loading

0 commit comments

Comments
 (0)