@jutge.org/toolkit 4.2.8 → 4.2.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,16 +14,21 @@
14
14
 
15
15
  \ProblemInformation
16
16
 
17
- \Author: {{author}}
18
-
17
+ \Author\ {{author}}
19
18
  {{#if translator}}
20
- {{language}}: {{translator}}
19
+ \\
20
+ \Translator {{translator}}
21
21
  {{/if}}
22
22
 
23
- \Generation: {{date}}
23
+ \bigskip
24
+
25
+ \Generation {{date}}
26
+
27
+ \bigskip
24
28
 
25
- \subsection*{Draft}
29
+ \copyright\ \emph{Jutge.org}, 2006--{{year}}.
30
+ \\
31
+ \href{https://jutge.org}{https://jutge.org}
26
32
 
27
- Draft generated with \textbf{new-jutge-toolkit}.
28
33
 
29
34
  \end{document}
@@ -0,0 +1,22 @@
1
+
2
+ \documentclass[11pt]{article}
3
+
4
+ \usepackage{jutge}
5
+ \usepackage{{curly jutgeLanguage}}
6
+
7
+ % redefine commands to simplify text output
8
+ \renewcommand{\Sample}{}
9
+ \renewcommand{\Statement}{}
10
+ \renewcommand{\Problem}[1]{}. % hide problem title
11
+ \ProblemId{} % hide problem id
12
+
13
+ % redefine figure commands to avoid troubles with \parpic
14
+ \renewcommand{\FigureL}[2]{\includegraphics[#1]{#2}}
15
+ \renewcommand{\FigureC}[2]{\includegraphics[#1]{#2}}
16
+ \renewcommand{\FigureR}[2]{\includegraphics[#1]{#2}}
17
+
18
+ \begin{document}
19
+
20
+ \DoProblem{{curly language}}
21
+
22
+ \end{document}
@@ -19,16 +19,23 @@
19
19
 
20
20
  \DoProblem{{curly language}}
21
21
 
22
+ \ProblemInformation
22
23
 
23
- \subsection*{\TxtAuthor}
24
- {{author}}
25
-
24
+ \Author\ {{author}}
26
25
  {{#if translator}}
27
- {{language}}: {{translator}}
26
+ \\
27
+ \Translator {{translator}}
28
28
  {{/if}}
29
29
 
30
- \subsection*{Draft}
30
+ \bigskip
31
+
32
+ \Generation {{date}}
33
+
34
+ \bigskip
35
+
36
+ \copyright\ \emph{Jutge.org}, 2006--{{year}}.
37
+ \\
38
+ \href{https://jutge.org}{https://jutge.org}
31
39
 
32
- Draft generated with \textbf{new-jutge-toolkit}.
33
40
 
34
41
  \end{document}
@@ -138,13 +138,38 @@ In this case, it was necessary to use \verb|\lstset{language=C++}| to set the la
138
138
  The former use of at signs (@) and vertical bars (|) to include inline code snippets is deprecated because \textbf{pandoc} does not support it and introduced conflicts with other packages. You will have to replace them with \verb|\lstinline| or with \verb|\verb|| as shown above. Statements with at signs for inline listings can be automatically converted using \texttt{jtk convert transform-at-signs}.
139
139
 
140
140
 
141
+ \paragraph{Hyperlinks.}
142
+
143
+ Hyperlinks can be included in the statement using the \textbf{hyperref} package.
144
+ For example, visit \href{https://jutge.org}{Jutge.org} for more information.
145
+ In the PDF and HTML versions, the link will be clickable, in the Markdown version, the URL will be displayed as required, but the Text version will only show the link text (Why? Can we fix it?).
146
+
147
+ \medskip
148
+ In addition, the \verb|Link| macro is provided to include links to other Jutge.org problems:
149
+ See the Hello World problem \Link{P68688}. Adding the language suffix is not recommended.
150
+
151
+
141
152
  \paragraph{Colors.}
142
153
 
143
- Colors can be used in the statement using the \texttt{color} package.
154
+ Colors can be used in the statement using the \textbf{color} package.
144
155
  For instance, \textcolor{red}{this text is red}, \textcolor{blue}{this text is blue}, and \textcolor{green}{this text is green}.
145
156
  Of course, colors are not supported in the Text and Markdown versions of the statement.
146
157
 
147
158
 
159
+ \paragraph{Columns.}
160
+
161
+ The statement can also include multiple columns using the \textbf{multicol} package.
162
+ Here is an example with two columns:
163
+
164
+ \begin{multicols}{2}
165
+
166
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum
167
+
168
+ \end{multicols}
169
+
170
+ This is shown in the PDF version only, as multiple columns are not supported in HTML, Text, or Markdown.
171
+
172
+
148
173
  \paragraph{PS Tricks.}
149
174
 
150
175
  PS Tricks figures can also be included in the statement but this is discouraged as it is not supported in HTML. Here is a simple example:
@@ -49,6 +49,6 @@
49
49
 
50
50
 
51
51
  \newcommand{\TxtProblemInformation}{Informació del problema}
52
- \newcommand{\TxtAuthor}{Autor}
53
- \newcommand{\TxtTranslator}{Traductor}
54
- \newcommand{\TxtGeneration}{Generació}
52
+ \newcommand{\TxtAuthor}{Autoria:}
53
+ \newcommand{\TxtTranslator}{Traducció:}
54
+ \newcommand{\TxtGeneration}{Generació:}
@@ -4,9 +4,9 @@
4
4
  %\usepackage[ngerman]{babel}
5
5
 
6
6
  \newcommand{\TxtProblemInformation}{Informationen zum Problem}
7
- \newcommand{\TxtAuthor}{Autor}
8
- \newcommand{\TxtTranslator}{Übersetzer}
9
- \newcommand{\TxtGeneration}{Erstellt}
7
+ \newcommand{\TxtAuthor}{Autor:}
8
+ \newcommand{\TxtTranslator}{Übersetzer:}
9
+ \newcommand{\TxtGeneration}{Erstellt:}
10
10
  \newcommand{\TxtInterface}{Interface}
11
11
 
12
12
  \newcommand{\TxtInput}{Eingabe}
@@ -55,6 +55,6 @@
55
55
 
56
56
 
57
57
  \newcommand{\TxtProblemInformation}{Problem information}
58
- \newcommand{\TxtAuthor}{Author}
59
- \newcommand{\TxtTranslator}{Translator}
60
- \newcommand{\TxtGeneration}{Generation}
58
+ \newcommand{\TxtAuthor}{Author:}
59
+ \newcommand{\TxtTranslator}{Translator:}
60
+ \newcommand{\TxtGeneration}{Generation:}
@@ -49,6 +49,6 @@
49
49
 
50
50
 
51
51
  \newcommand{\TxtProblemInformation}{Información del problema}
52
- \newcommand{\TxtAuthor}{Autor}
53
- \newcommand{\TxtTranslator}{Traductor}
54
- \newcommand{\TxtGeneration}{Generación}
52
+ \newcommand{\TxtAuthor}{Autoría:}
53
+ \newcommand{\TxtTranslator}{Traducción:}
54
+ \newcommand{\TxtGeneration}{Generación:}
@@ -52,8 +52,7 @@
52
52
  }
53
53
 
54
54
 
55
- \newcommand{\TxtProblemInformation}{Informació del problema}
56
- \newcommand{\TxtAuthor}{Autor}
57
- \newcommand{\TxtTranslator}{Traductor}
58
- \newcommand{\TxtGeneration}{Generació}
59
-
55
+ \newcommand{\TxtProblemInformation}{Information du problème}
56
+ \newcommand{\TxtAuthor}{Auteur:}
57
+ \newcommand{\TxtTranslator}{Traducteur:}
58
+ \newcommand{\TxtGeneration}{Génération:}
@@ -1,4 +1,27 @@
1
- % \usepackage{html}
1
+ %remove for xelatex
2
+ %\usepackage{mathpazo}
3
+ %\usepackage{helvet}
4
+ %\usepackage{courier}
5
+
6
+ \usepackage{hyperref}
7
+ \usepackage{graphicx}
8
+ \usepackage{moreverb} % for verbatimtabinput
9
+ \usepackage{mdwlist}
10
+ \usepackage{picins}
11
+ \usepackage{pstricks}
12
+ \usepackage{pst-tree}
13
+ \usepackage{graphicx}
14
+ \usepackage{amsmath}
15
+ \usepackage{geometry}
16
+ \usepackage{multicol}
17
+ %\usepackage[utf8]{inputenc} %remove for xelatex
18
+ \usepackage{listings}
19
+ \usepackage{textcomp}
20
+ \usepackage{chessboard}
21
+ \usepackage{tikz}
22
+ %\usepackage{wasysym} % remove because not used
23
+ \usepackage{color}
24
+
2
25
 
3
26
  % added for xelatex
4
27
  \usepackage{fontspec}
@@ -25,29 +48,6 @@
25
48
  ]
26
49
  \setmathfont{texgyrepagella-math.otf}
27
50
 
28
- %remove for xelatex
29
- %\usepackage{mathpazo}
30
- %\usepackage{helvet}
31
- %\usepackage{courier}
32
-
33
- \usepackage{graphicx}
34
- \usepackage{moreverb} % for verbatimtabinput
35
- \usepackage{mdwlist}
36
- \usepackage{picins}
37
- \usepackage{pstricks}
38
- \usepackage{pst-tree}
39
- \usepackage{graphicx}
40
- \usepackage{amsmath}
41
- \usepackage{geometry}
42
- \usepackage{multicol}
43
- %\usepackage[utf8]{inputenc} %remove for xelatex
44
- \usepackage{listings}
45
- \usepackage{textcomp}
46
- \usepackage{chessboard}
47
- \usepackage{tikz}
48
- %\usepackage{wasysym} % remove because not used
49
- \usepackage{color}
50
-
51
51
 
52
52
  \geometry{
53
53
  a4paper,twoside,
@@ -274,9 +274,7 @@
274
274
  \newcommand{\uq}[1]{\texttt{\small #1}}
275
275
 
276
276
 
277
- \providecommand{\Link}[1]{
278
- \texttt{#1} % TODO: hyperlink
279
- }
277
+ \providecommand{\Link}[1]{\href{https://jutge.org/problems/#1}{\textbf{#1}}}
280
278
 
281
279
 
282
280