Općenito | Osnovne upute | Format unosa teksta | Dodavanje | Kolekcije | Ovlasti | Ostalo
Opis
Svi tekstovi zadataka, rješenja, poruke i dr. podržavaju matematičke formule, uređeni tekst i slično. Format unosa je uvelike baziran na LaTeX-u, a podržava i osnovan BB code.
LaTeX sam po sebi je složen jezik te je izrazito teško podržati ili oponašati sve njegove mogućnosti. Stoga Školjka ima pojednostavljenu verziju, koja bi ipak trebala biti dovoljna za sve potrebe.
Iako je stari format već funkcionirao, postojalo je nekoliko bitnih nekonzistentnosti s LaTeX-om koje je trebalo popraviti. Osim toga, veća kompatibilnost je preduvjet za automatsko dodavanje zadataka i natjecanja, što će jednog dana biti implementirano.
Osnove
Web stranice su ograničene po pitanju mogućnosti prikazivanja matematičkih formula. Postoje određeni načini vektorskog prikazivanja formula (npr. MathJax), ali smo se ovdje odlučili za prikazivanje formula pomoću malih slika - za svaku formulu se generira jedna slika (PNG formata). Neke druge stvari, poput bold-a, italic-a, underline-a i drugog (centriranja, boje...) se mogu vjerno prikazati kao dio same web stranice, bez generiranja slike.
Podržane LaTeX naredbe
Navodimo naredbe koje su trenutačno (u potpunosti ili djelomično) podržane. Napomena: Za sada nisu podržane starred* verzije naredbi!Basic Commands | |||
---|---|---|---|
\emph | Emphasized text (usually italic). | \emph{Some text here.} | Some text here. |
\textbf | Bold. | \textbf{Some text here.} | Some text here. |
\textit | Italic. | \textit{Some text here.} | Some text here. |
\sout | Strikethrough. | \sout{Some text here.} |
|
\uline | Underline. | \uline{Some text here.} | Some text here. |
\underline | Underline and disable word-wrap. It's recommended to use \uline instead. | \underline{Some text here.} | Some text here. |
\texttt | Monospace font. Visually different when exported to PDF. | \texttt{Some text here.} |
|
\\ | Newline. Possibly incompatible behavior. | a\\b | a |
Advanced Commands | |||
---|---|---|---|
\includegraphics | Show the given image. Partially supported. Incomplete. | ||
\caption | Figure caption. Incomplete. | ||
\centering | Figure centering. Incomplete. | ||
\label | Set figure or equation label. Partially supported. Incomplete. | ||
\ref | Given a label, show a link to the related content. Partially supported. Incomplete. | ||
\url | Link | \url{http://www.example.com/} | |
\href | Link | \href{http://www.example.com/}{Some text here.} | |
\setlength | Set value of the given length command. Currently, only \parindent and \parskip are supported, representing indentation length and paragraph top margin. Note that the first paragraph is not indented. The default values are 1em for \parskip and 0em for \parindent . | \setlength{\parskip}{3em}
\setlength{\parindent}{2em}
First paragraph
Second paragraph | First paragraph Second paragraph |
Other Commands | |||
---|---|---|---|
\fbox | Framed box with disabled word-wrap. Please don't misuse. | \fbox{Some text here.} | Some text here. |
\mbox | Disabled word-wrap. Please don't misuse. | \mbox{Some text here.} | Some text here. |
\TeX | \TeX | ||
\LaTeX | \LaTeX | ||
\textasciicircum | Symbol ^. Partially supported. | \textasciicircum | ^ |
\textasciitilde | Symbol ~. Partially supported. | \textasciitilde | ~ |
\textbackslash | Symbol \. Partially supported. | \textbackslash | \ |
\- | Soft hyphen, shown in HTML as ­. | a\-very\-long\-word | averylongword |
\{ | Symbol {. | \{ | { |
\} | Symbol }. | \} | } |
\% | Symbol %. | \% | % |
\_ | Symbol _. | \_ | _ |
\& | Symbol &. | \& | & |
\$ | Symbol $. | \$ | $ |
\# | Symbol #. | \# | # |
LaTeX Environments | |||
---|---|---|---|
\begin{center}...\end{center} | Centering. | \begin{center}Some text here.\end{center} | Some text here. |
\begin{figure}...\end{figure} | Figure, used for inserting images. | ||
\begin{flushleft}...\end{flushleft} | \begin{flushleft}Some text here.\\Some text here. Some text here.\end{flushleft} | Some text here. | |
\begin{flushright}...\end{flushright} | \begin{flushright}Some text here.\\Some text here. Some text here.\end{flushright} | Some text here. | |
\begin{verbatim}...\end{verbatim} | Pre-formatted text. Visually different when exported to PDF. | \begin{verbatim}a = b + c
= c + b\end{verbatim} | a = b + c = c + b |
\begin{verbatim*}...\end{verbatim*} | Similar to verbatim , where spaces are shown as ␣. Visually different when exported to PDF. | \begin{verbatim*}a = b + c
= c + b\end{verbatim*} | a␣=␣b␣+␣c ␣␣=␣c␣+␣b |
BB Code
Podržane su sljedeće BB code naredbe:
BB code commands | ||||
---|---|---|---|---|
Command | Description | Example | HTML | LaTeX |
[b]...[/b] | Bold. | [b]Some text here.[/b] | Some text here. | \textbf{Some text here.} |
[i]...[/i] | Italic. | [i]Some text here.[/i] | Some text here. | \textit{Some text here.} |
[s]...[/s] | Strikethrough. | [s]Some text here.[/s] |
| \sout{Some text here.} |
[u]...[/u] | Underline. | [u]Some text here.[/u] | Some text here. | \uline{Some text here.} |
[code]...[/code] | Code. | [code]Some text here.[/code] |
| \texttt{Some text here.} |
[hide]...[/hide] | Hidden text. Visually different when exported to PDF. | [hide]Some text here.[/hide] | {\color{gray}Some text here.} | |
[hide=text]...[/hide] | Hidden text. Visually different when exported to PDF. | [hide="Link text"]Some text here.[/hide] | {\color{gray}Link text: Some text here.} | |
[par SKIP INDENT] | Shorthand for \setlength{\parskip}{SKIP} \setlength{\parindent}{INDENT} . Value 0 is treated as 0pt . | [par 1em 0] | \setlength{\parskip}{1em} \setlength{\parindent}{0pt} | |
[pre]...[/pre] | Preformatted text. Simulates LaTeX environment verbatim . | [pre]Some text here.
Some text here.[/pre] | Some text here. Some text here. | \begin{verbatim}Some text here. Some text here.\end{verbatim} |
[quote]...[/quote] | Quotation. | [quote]Some text here.[/quote] | Some text here. | Some text here. |
[img attachment=x width=300px height=300px] | Show the attachment #x, counting from 1. Optionally, specify the width and height. Please don't misuse. Incomplete. | |||
[url]...[/url] | Link. | [url]http://www.google.com/[/url] | \url{http://www.google.com/} | |
[url= | Link. | [url=http://www.google.com/]Google[/url] | \href{http://www.google.com/}{Google} |
Budući da je prioritet da format unosa teksta bude kompatibilan s LaTeX-om, sintaksne ili druge greške BB code naredbi se neće prikazivati, nego se u tom slučaju samo pokaže originalni tekst.
BB code se isključuje koristeći[nobb]
, a uključuje natrag pomoću[/nobb]
.
Stari format
Gore opisani format odgovara trenutačno preporučenom formatu unosa. Ukoliko želite koristiti stari format, dodajte%V0
na početak teksta.
Napomena: Ovaj format se više ne održava i vrlo vjerojatno neće biti mijenjan. Format je dostupan iz dva razloga - zbog postojećeg sadržaja, i zbog toga što je novi format još u eksperimentalnoj fazi i još nije u potpunosti dovršen.
Navodimo kratke upute:- $ ... $ - inline LaTeX (ostaje kao $ ... $), na mjesto ... stavljate neki matematički izraz
- $$ ... $$ - block LaTex (pretvara se u \[ ... \]), prikazuje se u zasebnom retku, centrirano
- $$$ ... $$$ - za napredniji LaTeX, centrirano, bez automatskog $ $, \[ \] i sličnog.
- U slučaju da želite napisati samostalni znak $, pišite \$.
- Znak \ pišete kao \\.
- Znakove [ i ] pišete kao \[ i \].
- "BBCode"
- [b] [/b] - bold
- [i] [/i] - italic
- [s] [/s] -
strikethrough - [u] [/u] - underline
- [quote] [/quote] - Citiranje, tekst će se prikazan s plavkastom pozadinom
- [img attachment=x width=300px height=300px] - Prikazuje x-tu (brojeći od 1) datoteku kao sliku (gledaju se samo datoteke poslane za taj tekst, sortirane po redu kojim su poslane). Attachment je obavezan parametar. Molimo ne pretjerujte s veličinama.
- [url=http://www.example.org/]Primjer[/url] ili [url]http://www.example.org/[/url] - Primjer ili http://www.example.org/.
Napomena: Ne radi u LaTeX-u, odnosno PDF-u.
LaTeX
Neki korisni linkovi o LaTeX-u:http://en.wikibooks.org/wiki/LaTeX
http://en.wikibooks.org/wiki/LaTeX/Mathematics
https://www.facebook.com/TeX.LaTeX.savjeti
ftp://ftp.ams.org/ams/doc/amsmath/short-math-guide.pdf
Općenito možete pogledati kako su napisani postojeći zadaci.