Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
tex:triky [2010/06/24 15:35] stranak |
tex:triky [2019/09/09 16:37] (current) lauschmannova [pdf-a verification of theses] |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Central TeXLive distributions ====== | ||
| + | |||
| + | If you are using TeXLive on your linux workstations you may use texlive-full portable installed in: | ||
| + | |||
| + | / | ||
| + | | ||
| + | There are folders for several years backward up to the latest distribution. | ||
| + | |||
| + | In order to use the shared TeX binaries from the command line, you may want to add the following line to your .bashrc: | ||
| + | |||
| + | export PATH=/ | ||
| + | |||
| + | === Texstudio === | ||
| + | You may use {{ : | ||
| + | |||
| ====== Tips and Tricks for LaTeX ====== | ====== Tips and Tricks for LaTeX ====== | ||
| + | * see also [[:: | ||
| * For the redefining the **header**, you can use | * For the redefining the **header**, you can use | ||
| * '' | * '' | ||
| Line 10: | Line 26: | ||
| * Useful page (and a figure) for **lists**: | * Useful page (and a figure) for **lists**: | ||
| * http:// | * http:// | ||
| + | |||
| + | * The **if** condition in TeX: | ||
| + | * construction **if '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * **comparing** two strings:< | ||
| + | \newif\ifsame | ||
| + | \newcommand{\strcfstr}[2]{% | ||
| + | | ||
| + | | ||
| + | \def\1{# | ||
| + | \ifx\1\2\endgroup \sametrue | ||
| + | \else | ||
| + | \fi | ||
| + | }</ | ||
| + | * (The grouping is needed there to make ' | ||
| + | * [[http:// | ||
| + | * allocator **'' | ||
| * **foreach** in TeX < | * **foreach** in TeX < | ||
| Line 19: | Line 53: | ||
| * **Aligning an element** in the line according to whether it fits in the rest of the line (TeX) | * **Aligning an element** in the line according to whether it fits in the rest of the line (TeX) | ||
| - | * always right-aligned < | + | * always right-aligned < |
| - | < | + | |
| \nobreak\hfill\penalty71\hskip2em\hbox{}\nobreak\hfill | \nobreak\hfill\penalty71\hskip2em\hbox{}\nobreak\hfill | ||
| \hbox{# | \hbox{# | ||
| - | | + | |
| - | < | + | |
| \hbox{} \hskip 0pt plus 1fil \penalty0 | \hbox{} \hskip 0pt plus 1fil \penalty0 | ||
| \hbox{# | \hbox{# | ||
| - | * align to the right, if it fits, or to the left in the new line: | + | * align to the right, if it fits, or to the left in the new line:< |
| - | < | + | \def\alignelemrightorleft # |
| \nobreak\hfill\penalty71\hskip2em | \nobreak\hfill\penalty71\hskip2em | ||
| \hbox{# | \hbox{# | ||
| + | * Two **tables/ | ||
| + | \begin{figure} | ||
| + | | ||
| + | \centering \includegraphics[scale=1]{fn1} \caption{c} \label{f1} | ||
| + | | ||
| + | | ||
| + | | ||
| + | \centering \includegraphics[scale=1]{fn2} \caption{c} \label{f2} | ||
| + | | ||
| + | \end{figure}</ | ||
| + | * **Include completed PDF** and add page numbers and other headings: '' | ||
| + | % settings | ||
| + | \markright{Author Name} % or e.g. package fancyhdr | ||
| + | \setcounter{page}{13} | ||
| + | % inserting (first page with pagenumber in the foot, others in the head with author name) | ||
| + | \includepdf[pages=1, | ||
| + | \includepdf[pages=2-, | ||
| + | * '' | ||
| + | * Useful **packages**: | ||
| + | * Source printing: //'' | ||
| + | * //'' | ||
| + | * pseudocode //'' | ||
| + | * trees: //'' | ||
| + | * tables: //'' | ||
| + | * '' | ||
| + | * **Higher cells/rows in tables** can be achieved either by '' | ||
| + | \newcommand\toppadding{\rule{0pt}{2.6ex}} | ||
| + | \newcommand\bottompadding{\rule[-1.2ex]{0pt}{0pt}} | ||
| + | ... | ||
| + | \hline | ||
| + | \toppadding First cell\bottompadding & Second cell & Third one \\ | ||
| + | \hline | ||
| + | ...</ | ||
| + | * '' | ||
| + | * If some **links from ToC** point to **incorrect** objects (e.g. section III.2.5 points to the page where the section I.2.5 starts), then the problem is in internal hyperref naming convention (both section in the example are represented as ' | ||
| + | * '' | ||
| + | * '' | ||
| + | * **New** type of **float** and its **List of**< | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | % previous three lines alternatively (in pbmlbook class): \cfttitleset{grp} | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | % previous three lines alternatively (in pbmlbook class): \cftlineset{graph}{}{2em} | ||
| + | | ||
| + | | ||
| + | | ||
| + | ... | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | ... | ||
| + | | ||
| + | * **Crop** PDF **figure** by LaTeX< | ||
| + | | ||
| + | | ||
| + | * it't left bottom right top and crop '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * other useful: '' | ||
| + | * Special counter/ | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| ==== počítání slov (a dalších věcí) ==== | ==== počítání slov (a dalších věcí) ==== | ||
| Line 40: | Line 147: | ||
| Podrobnosti v dokumentaci: | Podrobnosti v dokumentaci: | ||
| + | |||
| + | ==== Fonts ==== | ||
| + | |||
| + | * '' | ||
| + | * '' | ||
| + | * any font in '' | ||
| + | * other font directories can be specified in '' | ||
| + | |||
| + | < | ||
| + | |||
| + | Some [[https:// | ||
| + | |||
| + | ====== pdf-a verification of theses ====== | ||
| + | All theses submitted at the Charles University must be in the pdf-a format, | ||
| + | following a specific set of requirements defined by a university profile. | ||
| + | `/ | ||
| + | https:// | ||
| + | |||
| + | [[vernerova@ufal.mff.cuni.cz|Anša' | ||
| + | I used Eda's LaTeX template (send me an e-mail if you want to get it) and no amount of tweaking would give me a valid pdf-a, even though I was using | ||
| + | \usepackage[a-2u]{pdfx} | ||
| + | and compiling with a wrapper script containing the line | ||
| + | LC_ALL=cs_CZ.UTF-8 xelatex -shell-escape -output-driver=" | ||
| + | I sent my pdf file to [[https:// | ||
