diff options
author | Karl Berry <karl@freefriends.org> | 2023-01-24 20:59:27 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-01-24 20:59:27 +0000 |
commit | c6ae2f8f2336c3703c19eb2b49e76bf4c38ef48e (patch) | |
tree | d1c975b688e29b51bc995fc185e19619548586fb /Master/texmf-dist/doc | |
parent | ee97f6dbd2e6acf46b912ba49ad1e59892892707 (diff) |
rm xput, replaced by pagelayout
git-svn-id: svn://tug.org/texlive/trunk@65624 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc')
23 files changed, 0 insertions, 1476 deletions
diff --git a/Master/texmf-dist/doc/latex/xput/1x1.pdf b/Master/texmf-dist/doc/latex/xput/1x1.pdf Binary files differdeleted file mode 100644 index 5c1a747af1d..00000000000 --- a/Master/texmf-dist/doc/latex/xput/1x1.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/xput/2x1.pdf b/Master/texmf-dist/doc/latex/xput/2x1.pdf Binary files differdeleted file mode 100644 index ebbd75abe9f..00000000000 --- a/Master/texmf-dist/doc/latex/xput/2x1.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/xput/3x2.pdf b/Master/texmf-dist/doc/latex/xput/3x2.pdf Binary files differdeleted file mode 100644 index a68c0354325..00000000000 --- a/Master/texmf-dist/doc/latex/xput/3x2.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/xput/LICENSE.txt b/Master/texmf-dist/doc/latex/xput/LICENSE.txt deleted file mode 100644 index 22443139013..00000000000 --- a/Master/texmf-dist/doc/latex/xput/LICENSE.txt +++ /dev/null @@ -1,416 +0,0 @@ -The LaTeX Project Public License -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- - -LPPL Version 1.3c 2008-05-04 - -Copyright 1999 2002-2008 LaTeX3 Project - Everyone is allowed to distribute verbatim copies of this - license document, but modification of it is not allowed. - - -PREAMBLE -======== - -The LaTeX Project Public License (LPPL) is the primary license under -which the LaTeX kernel and the base LaTeX packages are distributed. - -You may use this license for any work of which you hold the copyright -and which you wish to distribute. This license may be particularly -suitable if your work is TeX-related (such as a LaTeX package), but -it is written in such a way that you can use it even if your work is -unrelated to TeX. - -The section `WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE', -below, gives instructions, examples, and recommendations for authors -who are considering distributing their works under this license. - -This license gives conditions under which a work may be distributed -and modified, as well as conditions under which modified versions of -that work may be distributed. - -We, the LaTeX3 Project, believe that the conditions below give you -the freedom to make and distribute modified versions of your work -that conform with whatever technical specifications you wish while -maintaining the availability, integrity, and reliability of -that work. If you do not see how to achieve your goal while -meeting these conditions, then read the document `cfgguide.tex' -and `modguide.tex' in the base LaTeX distribution for suggestions. - - -DEFINITIONS -=========== - -In this license document the following terms are used: - - `Work' - Any work being distributed under this License. - - `Derived Work' - Any work that under any applicable law is derived from the Work. - - `Modification' - Any procedure that produces a Derived Work under any applicable - law -- for example, the production of a file containing an - original file associated with the Work or a significant portion of - such a file, either verbatim or with modifications and/or - translated into another language. - - `Modify' - To apply any procedure that produces a Derived Work under any - applicable law. - - `Distribution' - Making copies of the Work available from one person to another, in - whole or in part. Distribution includes (but is not limited to) - making any electronic components of the Work accessible by - file transfer protocols such as FTP or HTTP or by shared file - systems such as Sun's Network File System (NFS). - - `Compiled Work' - A version of the Work that has been processed into a form where it - is directly usable on a computer system. This processing may - include using installation facilities provided by the Work, - transformations of the Work, copying of components of the Work, or - other activities. Note that modification of any installation - facilities provided by the Work constitutes modification of the Work. - - `Current Maintainer' - A person or persons nominated as such within the Work. If there is - no such explicit nomination then it is the `Copyright Holder' under - any applicable law. - - `Base Interpreter' - A program or process that is normally needed for running or - interpreting a part or the whole of the Work. - - A Base Interpreter may depend on external components but these - are not considered part of the Base Interpreter provided that each - external component clearly identifies itself whenever it is used - interactively. Unless explicitly specified when applying the - license to the Work, the only applicable Base Interpreter is a - `LaTeX-Format' or in the case of files belonging to the - `LaTeX-format' a program implementing the `TeX language'. - - - -CONDITIONS ON DISTRIBUTION AND MODIFICATION -=========================================== - -1. Activities other than distribution and/or modification of the Work -are not covered by this license; they are outside its scope. In -particular, the act of running the Work is not restricted and no -requirements are made concerning any offers of support for the Work. - -2. You may distribute a complete, unmodified copy of the Work as you -received it. Distribution of only part of the Work is considered -modification of the Work, and no right to distribute such a Derived -Work may be assumed under the terms of this clause. - -3. You may distribute a Compiled Work that has been generated from a -complete, unmodified copy of the Work as distributed under Clause 2 -above, as long as that Compiled Work is distributed in such a way that -the recipients may install the Compiled Work on their system exactly -as it would have been installed if they generated a Compiled Work -directly from the Work. - -4. If you are the Current Maintainer of the Work, you may, without -restriction, modify the Work, thus creating a Derived Work. You may -also distribute the Derived Work without restriction, including -Compiled Works generated from the Derived Work. Derived Works -distributed in this manner by the Current Maintainer are considered to -be updated versions of the Work. - -5. If you are not the Current Maintainer of the Work, you may modify -your copy of the Work, thus creating a Derived Work based on the Work, -and compile this Derived Work, thus creating a Compiled Work based on -the Derived Work. - -6. If you are not the Current Maintainer of the Work, you may -distribute a Derived Work provided the following conditions are met -for every component of the Work unless that component clearly states -in the copyright notice that it is exempt from that condition. Only -the Current Maintainer is allowed to add such statements of exemption -to a component of the Work. - - a. If a component of this Derived Work can be a direct replacement - for a component of the Work when that component is used with the - Base Interpreter, then, wherever this component of the Work - identifies itself to the user when used interactively with that - Base Interpreter, the replacement component of this Derived Work - clearly and unambiguously identifies itself as a modified version - of this component to the user when used interactively with that - Base Interpreter. - - b. Every component of the Derived Work contains prominent notices - detailing the nature of the changes to that component, or a - prominent reference to another file that is distributed as part - of the Derived Work and that contains a complete and accurate log - of the changes. - - c. No information in the Derived Work implies that any persons, - including (but not limited to) the authors of the original version - of the Work, provide any support, including (but not limited to) - the reporting and handling of errors, to recipients of the - Derived Work unless those persons have stated explicitly that - they do provide such support for the Derived Work. - - d. You distribute at least one of the following with the Derived Work: - - 1. A complete, unmodified copy of the Work; - if your distribution of a modified component is made by - offering access to copy the modified component from a - designated place, then offering equivalent access to copy - the Work from the same or some similar place meets this - condition, even though third parties are not compelled to - copy the Work along with the modified component; - - 2. Information that is sufficient to obtain a complete, - unmodified copy of the Work. - -7. If you are not the Current Maintainer of the Work, you may -distribute a Compiled Work generated from a Derived Work, as long as -the Derived Work is distributed to all recipients of the Compiled -Work, and as long as the conditions of Clause 6, above, are met with -regard to the Derived Work. - -8. The conditions above are not intended to prohibit, and hence do not -apply to, the modification, by any method, of any component so that it -becomes identical to an updated version of that component of the Work as -it is distributed by the Current Maintainer under Clause 4, above. - -9. Distribution of the Work or any Derived Work in an alternative -format, where the Work or that Derived Work (in whole or in part) is -then produced by applying some process to that format, does not relax or -nullify any sections of this license as they pertain to the results of -applying that process. - -10. a. A Derived Work may be distributed under a different license - provided that license itself honors the conditions listed in - Clause 6 above, in regard to the Work, though it does not have - to honor the rest of the conditions in this license. - - b. If a Derived Work is distributed under a different license, that - Derived Work must provide sufficient documentation as part of - itself to allow each recipient of that Derived Work to honor the - restrictions in Clause 6 above, concerning changes from the Work. - -11. This license places no restrictions on works that are unrelated to -the Work, nor does this license place any restrictions on aggregating -such works with the Work by any means. - -12. Nothing in this license is intended to, or may be used to, prevent -complete compliance by all parties with all applicable laws. - - -NO WARRANTY -=========== - -There is no warranty for the Work. Except when otherwise stated in -writing, the Copyright Holder provides the Work `as is', without -warranty of any kind, either expressed or implied, including, but not -limited to, the implied warranties of merchantability and fitness for a -particular purpose. The entire risk as to the quality and performance -of the Work is with you. Should the Work prove defective, you assume -the cost of all necessary servicing, repair, or correction. - -In no event unless required by applicable law or agreed to in writing -will The Copyright Holder, or any author named in the components of the -Work, or any other party who may distribute and/or modify the Work as -permitted above, be liable to you for damages, including any general, -special, incidental or consequential damages arising out of any use of -the Work or out of inability to use the Work (including, but not limited -to, loss of data, data being rendered inaccurate, or losses sustained by -anyone as a result of any failure of the Work to operate with any other -programs), even if the Copyright Holder or said author or said other -party has been advised of the possibility of such damages. - - -MAINTENANCE OF THE WORK -======================= - -The Work has the status `author-maintained' if the Copyright Holder -explicitly and prominently states near the primary copyright notice in -the Work that the Work can only be maintained by the Copyright Holder -or simply that it is `author-maintained'. - -The Work has the status `maintained' if there is a Current Maintainer -who has indicated in the Work that they are willing to receive error -reports for the Work (for example, by supplying a valid e-mail -address). It is not required for the Current Maintainer to acknowledge -or act upon these error reports. - -The Work changes from status `maintained' to `unmaintained' if there -is no Current Maintainer, or the person stated to be Current -Maintainer of the work cannot be reached through the indicated means -of communication for a period of six months, and there are no other -significant signs of active maintenance. - -You can become the Current Maintainer of the Work by agreement with -any existing Current Maintainer to take over this role. - -If the Work is unmaintained, you can become the Current Maintainer of -the Work through the following steps: - - 1. Make a reasonable attempt to trace the Current Maintainer (and - the Copyright Holder, if the two differ) through the means of - an Internet or similar search. - - 2. If this search is successful, then enquire whether the Work - is still maintained. - - a. If it is being maintained, then ask the Current Maintainer - to update their communication data within one month. - - b. If the search is unsuccessful or no action to resume active - maintenance is taken by the Current Maintainer, then announce - within the pertinent community your intention to take over - maintenance. (If the Work is a LaTeX work, this could be - done, for example, by posting to comp.text.tex.) - - 3a. If the Current Maintainer is reachable and agrees to pass - maintenance of the Work to you, then this takes effect - immediately upon announcement. - - b. If the Current Maintainer is not reachable and the Copyright - Holder agrees that maintenance of the Work be passed to you, - then this takes effect immediately upon announcement. - - 4. If you make an `intention announcement' as described in 2b. above - and after three months your intention is challenged neither by - the Current Maintainer nor by the Copyright Holder nor by other - people, then you may arrange for the Work to be changed so as - to name you as the (new) Current Maintainer. - - 5. If the previously unreachable Current Maintainer becomes - reachable once more within three months of a change completed - under the terms of 3b) or 4), then that Current Maintainer must - become or remain the Current Maintainer upon request provided - they then update their communication data within one month. - -A change in the Current Maintainer does not, of itself, alter the fact -that the Work is distributed under the LPPL license. - -If you become the Current Maintainer of the Work, you should -immediately provide, within the Work, a prominent and unambiguous -statement of your status as Current Maintainer. You should also -announce your new status to the same pertinent community as -in 2b) above. - - -WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE -====================================================== - -This section contains important instructions, examples, and -recommendations for authors who are considering distributing their -works under this license. These authors are addressed as `you' in -this section. - -Choosing This License or Another License ----------------------------------------- - -If for any part of your work you want or need to use *distribution* -conditions that differ significantly from those in this license, then -do not refer to this license anywhere in your work but, instead, -distribute your work under a different license. You may use the text -of this license as a model for your own license, but your license -should not refer to the LPPL or otherwise give the impression that -your work is distributed under the LPPL. - -The document `modguide.tex' in the base LaTeX distribution explains -the motivation behind the conditions of this license. It explains, -for example, why distributing LaTeX under the GNU General Public -License (GPL) was considered inappropriate. Even if your work is -unrelated to LaTeX, the discussion in `modguide.tex' may still be -relevant, and authors intending to distribute their works under any -license are encouraged to read it. - -A Recommendation on Modification Without Distribution ------------------------------------------------------ - -It is wise never to modify a component of the Work, even for your own -personal use, without also meeting the above conditions for -distributing the modified component. While you might intend that such -modifications will never be distributed, often this will happen by -accident -- you may forget that you have modified that component; or -it may not occur to you when allowing others to access the modified -version that you are thus distributing it and violating the conditions -of this license in ways that could have legal implications and, worse, -cause problems for the community. It is therefore usually in your -best interest to keep your copy of the Work identical with the public -one. Many works provide ways to control the behavior of that work -without altering any of its licensed components. - -How to Use This License ------------------------ - -To use this license, place in each of the components of your work both -an explicit copyright notice including your name and the year the work -was authored and/or last substantially modified. Include also a -statement that the distribution and/or modification of that -component is constrained by the conditions in this license. - -Here is an example of such a notice and statement: - - %% pig.dtx - %% Copyright 2005 M. Y. Name - % - % This work may be distributed and/or modified under the - % conditions of the LaTeX Project Public License, either version 1.3 - % of this license or (at your option) any later version. - % The latest version of this license is in - % http://www.latex-project.org/lppl.txt - % and version 1.3 or later is part of all distributions of LaTeX - % version 2005/12/01 or later. - % - % This work has the LPPL maintenance status `maintained'. - % - % The Current Maintainer of this work is M. Y. Name. - % - % This work consists of the files pig.dtx and pig.ins - % and the derived file pig.sty. - -Given such a notice and statement in a file, the conditions -given in this license document would apply, with the `Work' referring -to the three files `pig.dtx', `pig.ins', and `pig.sty' (the last being -generated from `pig.dtx' using `pig.ins'), the `Base Interpreter' -referring to any `LaTeX-Format', and both `Copyright Holder' and -`Current Maintainer' referring to the person `M. Y. Name'. - -If you do not want the Maintenance section of LPPL to apply to your -Work, change `maintained' above into `author-maintained'. -However, we recommend that you use `maintained', as the Maintenance -section was added in order to ensure that your Work remains useful to -the community even when you can no longer maintain and support it -yourself. - -Derived Works That Are Not Replacements ---------------------------------------- - -Several clauses of the LPPL specify means to provide reliability and -stability for the user community. They therefore concern themselves -with the case that a Derived Work is intended to be used as a -(compatible or incompatible) replacement of the original Work. If -this is not the case (e.g., if a few lines of code are reused for a -completely different task), then clauses 6b and 6d shall not apply. - - -Important Recommendations -------------------------- - - Defining What Constitutes the Work - - The LPPL requires that distributions of the Work contain all the - files of the Work. It is therefore important that you provide a - way for the licensee to determine which files constitute the Work. - This could, for example, be achieved by explicitly listing all the - files of the Work near the copyright notice of each file or by - using a line such as: - - % This work consists of all files listed in manifest.txt. - - in that place. In the absence of an unequivocal list it might be - impossible for the licensee to determine what is considered by you - to comprise the Work and, in such a case, the licensee would be - entitled to make reasonable conjectures as to which files comprise - the Work. - diff --git a/Master/texmf-dist/doc/latex/xput/README.md b/Master/texmf-dist/doc/latex/xput/README.md deleted file mode 100644 index 6471ea45566..00000000000 --- a/Master/texmf-dist/doc/latex/xput/README.md +++ /dev/null @@ -1,99 +0,0 @@ -## What is Xput - -Xput is a LaTeX class to create graphic rich, layouted, perfectly typeset, and print ready PDFs just from a text file. It provides simple macros to put content on a page declaratively. Generic templates, automatic grid layout, and a simple and consistent user interface help you to create layouts with ease. - -The integration of Inkscape allows your to create beautiful box shadows. Text shadows and SVG filters are ideas for future releases. - -The integration of ImageMagick allows you to configure the PDF export to create web, print or preview versions of your document. Parallelized image optimization, caching and a draft mode enable fast PDF creation and a responsive workflow, even for large documents with lots of photos and graphics. - -Xput also integrates the TikZ and tcolorbox LaTeX packages. - -## Quick Start - -### Generic Templates - -Generic templates are the easiest way to put content on a page. The template name describes the layout. You can arrange [l]andscape, [p]ortrait, [s]quare, [w]ide, [g]olden ratio, g[o]lden upright ratio or [f]lexible placeholders in rows [-]. A valid template name for example is `sg-ff`. Notice you cannot combine flexible with fixed aspect ratio placeholders within a row. - -```latex -\template{sg}{ - \text{Hello Xput} - \graphic{IMG1234} -} -``` - -### Custom Templates and the Grid - -You can use the grid to layout content on a page. The grid has rows with cells. You can set width relations between cells and height relations between rows. You can give cells a explicit aspect ratio by adding a `!`. - -```latex -\newtemplate{my template}{ - \grid{ - {[2]{2!}{3!}} - {[2]{1}} - } - \placeholder{0 0 1 1} -} -``` - -You can set margin and gutter for a single grid or on document or page level. - -### Graphics - -Adding a graphic to a page is simple. You can scale, position and sharpen a graphic. - -```latex -\page{ - \graphic[ - scale=1.2, - hpos=0.3, - unsharp=3x1 - ]{filename} -} -``` - -### Borders and Shadows - -You can add borders and box shadows to graphics and text frames. - -```latex -\newborder{my border}{ - width=2mm, - color=magenta, - radius=5mm -} -\newshadow{my shadow}{ - size=5, - color=magenta, - opacity=1 -} - -\page{ - \graphic[ - shadow=my shadow, - border=my border, - border radius=10mm - ]{filename} -} -``` - -Have a look at the [examples](https://github.com/friedemannbartels/xput/tree/main/doc) and start playing with these. - -For a complete reference have a look at the [manual](https://github.com/friedemannbartels/xput/raw/main/doc/xputmanual.pdf). - -## Installation - -In general, you should use the package manager shipped with your TeX distribution to install Xput. Alternatively you can copy the contents of [xput.tds.zip](https://github.com/friedemannbartels/xput/releases/download/v1.0.2/xput.tds.zip) to your local TeX directory tree. - -### Command Line Tools - -For image optimization, shadow creation and preflight perform these installation steps: - -- Add the directory _tex/latex/xput/scripts_ in your local TeX file tree to your `$PATH`. - -- Add `xputserver` to the list of `shell_escape_commands` in your top level _texmf.cnf_. Find your _texmf.cnf_ with the command `kpsewhich texmf.cnf`. - -- Install ImageMagick 7.0 or newer and Inkscape 1.0 or newer. - -## Development - -Run visual regression tests inside the _tests_ directory with the command `xput test` diff --git a/Master/texmf-dist/doc/latex/xput/example-book.pdf b/Master/texmf-dist/doc/latex/xput/example-book.pdf Binary files differdeleted file mode 100644 index 26a78856c10..00000000000 --- a/Master/texmf-dist/doc/latex/xput/example-book.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/xput/example-book.tex b/Master/texmf-dist/doc/latex/xput/example-book.tex deleted file mode 100644 index d318eba5822..00000000000 --- a/Master/texmf-dist/doc/latex/xput/example-book.tex +++ /dev/null @@ -1,111 +0,0 @@ -%% -%% Copyright (C) 2022 by Friedemann Bartels -%% -%% This file may be distributed and/or modified under the -%% conditions of the LaTeX Project Public License, either -%% version 1.3c of this license or (at your option) any later -%% version. The latest version of this license is in: -%% -%% http://www.latex-project.org/lppl.txt -%% -%% and version 1.3c or later is part of all distributions of -%% LaTeX version 2008/05/04 or later. -%% - -\documentclass[ - draft, - twoside, - beginright, - % fanfold, - import, - optimize={quality=50, density=144} -]{xput} - -\usepackage{lipsum} -\usepackage{tgheros} -\usepackage[T1]{fontenc} -\renewcommand*\familydefault{\sfdefault} - -\pagewidth=200mm -\pageheight=200mm -\margin=20mm -\innermargin=40mm -\gutter=10mm -\bleed=3mm -\safetymargin=5mm -\spinewidth=7mm - -\safezone - -\newbeforepage{primary}{ - \setgrid[height=\margin, y=0mm]{{{}}} - - \leftpage{ - \text[center]{\thepage} - } - - \rightpage{ - \text[center]{\hspace*{\fill}\thepage} - } -} -\setbeforepage{primary} - -\begin{document} - \Large - \pagenumbering{roman} - - \template[back cover,margin=0mm, inner margin=0mm]{f}{} - - \page[front cover,color=white,page graphic=koepi, inner margin=\margin]{ - \setgrid[width=100mm]{{{1}}} - - \text[bottom]{ - \fontsize{41.3mm}{46mm}\selectfont - \hskip -3mm - Berlin - \fontsize{7.5mm}{13mm}\selectfont% - \mbox{Photos by Friedemann Bartels} - } - - \ifspine{ - \setgrid[width=\spinewidth,x=-\spinewidth]{{{1}}} - \place{0 0 1 1} - \tikzgraphic{ - \node[rotate=90] at (0.5\width,0.5\height){ - \fontsize{4mm}{8mm}\selectfont - Xput\ \ - }; - } - } - } - - \page{ - \text{ - \strut - \tableofcontents - } - } - - \pagenumbering{arabic} - - \setcounter{page}{0} - \page[before page=]{} - - \page{ - \text{ - \strut - \section{Introduction} - \lipsum[1][1-7] - } - } - - \newgraphic{koepi wide}{vpos=0.43, file=koepi} - \page[double, page graphic=koepi wide, before page=, color=white]{ - \rightpage{ - \text[bottom]{ - \lipsum[1][8-10] - } - } - } - -\end{document}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/xput/example-borders-and-shadows.pdf b/Master/texmf-dist/doc/latex/xput/example-borders-and-shadows.pdf Binary files differdeleted file mode 100644 index 41096e77a30..00000000000 --- a/Master/texmf-dist/doc/latex/xput/example-borders-and-shadows.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/xput/example-borders-and-shadows.tex b/Master/texmf-dist/doc/latex/xput/example-borders-and-shadows.tex deleted file mode 100644 index 7c555a65075..00000000000 --- a/Master/texmf-dist/doc/latex/xput/example-borders-and-shadows.tex +++ /dev/null @@ -1,52 +0,0 @@ -%% -%% Copyright (C) 2022 by Friedemann Bartels -%% -%% This file may be distributed and/or modified under the -%% conditions of the LaTeX Project Public License, either -%% version 1.3c of this license or (at your option) any later -%% version. The latest version of this license is in: -%% -%% http://www.latex-project.org/lppl.txt -%% -%% and version 1.3c or later is part of all distributions of -%% LaTeX version 2008/05/04 or later. -%% - -\documentclass[draft]{xput} -\usepackage{lipsum} - -\pagewidth=15cm -\pageheight=15cm -\gutter=10mm - -\newborder{my border}{width=2mm, color=magenta, radius=5mm} -\newshadow{my shadow}{size=5, color=magenta, opacity=1} - -\begin{document} - - \template{ff-ff}{ - \graphic[ - border=my border, - border radius=10mm - ]{1x1} - - \graphic[ - border=my border, - shadow=my shadow - ]{1x1} - - \text[ - shadow=my shadow, - shadow color=black, - shadow opacity=0.2 - ]{\lipsum[1][1-5]} - - \graphic[ - shadow size=5, - shadow opacity=0.6, - shadow xshift=1mm, - shadow yshift=1mm - ]{1x1} - } - -\end{document} diff --git a/Master/texmf-dist/doc/latex/xput/example-graphic.pdf b/Master/texmf-dist/doc/latex/xput/example-graphic.pdf Binary files differdeleted file mode 100644 index 8c662249001..00000000000 --- a/Master/texmf-dist/doc/latex/xput/example-graphic.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/xput/example-graphic.tex b/Master/texmf-dist/doc/latex/xput/example-graphic.tex deleted file mode 100644 index dcfa7b3a65f..00000000000 --- a/Master/texmf-dist/doc/latex/xput/example-graphic.tex +++ /dev/null @@ -1,35 +0,0 @@ -%% -%% Copyright (C) 2022 by Friedemann Bartels -%% -%% This file may be distributed and/or modified under the -%% conditions of the LaTeX Project Public License, either -%% version 1.3c of this license or (at your option) any later -%% version. The latest version of this license is in: -%% -%% http://www.latex-project.org/lppl.txt -%% -%% and version 1.3c or later is part of all distributions of -%% LaTeX version 2008/05/04 or later. -%% - -\documentclass{xput} - -\pagewidth=20cm -\pageheight=20cm -\bleed=3mm - -\optimize[quality=50, density=144] -\preflight -\safezone - -\newgraphic{koepi scaled}{scale=1.02, hpos=0.2, vpos=1, file=koepi} - -\begin{document} - - \page{ - \graphic[hpos=0, scale=1.2]{3x2} - } - - \page[page graphic=koepi scaled]{} - -\end{document} diff --git a/Master/texmf-dist/doc/latex/xput/example-grid.pdf b/Master/texmf-dist/doc/latex/xput/example-grid.pdf Binary files differdeleted file mode 100644 index 1263d4883fd..00000000000 --- a/Master/texmf-dist/doc/latex/xput/example-grid.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/xput/example-grid.tex b/Master/texmf-dist/doc/latex/xput/example-grid.tex deleted file mode 100644 index a1c341cd668..00000000000 --- a/Master/texmf-dist/doc/latex/xput/example-grid.tex +++ /dev/null @@ -1,150 +0,0 @@ -%% -%% Copyright (C) 2022 by Friedemann Bartels -%% -%% This file may be distributed and/or modified under the -%% conditions of the LaTeX Project Public License, either -%% version 1.3c of this license or (at your option) any later -%% version. The latest version of this license is in: -%% -%% http://www.latex-project.org/lppl.txt -%% -%% and version 1.3c or later is part of all distributions of -%% LaTeX version 2008/05/04 or later. -%% - -\documentclass{xput} -\usepackage{lipsum} - -\pagewidth=20cm -\pageheight=20cm -\gutter=10mm - -\grid - -\begin{document} - - \page{ - \setgrid{ - {{1}{1}} - {{1}{1}} - } - - \text{ - A grid with two rows and two cells in each row. - } - } - - \page{ - \setgrid{ - {{3}{2}} - {{2}{3}} - } - - \text{ - A grid with a width relation between cells. - } - } - - \page{ - \setgrid{ - {[3]{1}{1}} - {[1]{1}{1}} - } - - \text{ - A grid with a height relation between rows. - } - } - - \page{ - \setgrid{ - {[2]{1}{3!}} - {[2]{1}{2!}} - } - - \text{ - A grid with a fixed aspect ratio of some cells. - } - - \graphic{3x2} - - \place{1 1 2 2} - \graphic{1x1} - } - - \page{ - \setgrid{ - {[1]{1!}{1!}{1!}} - {[2]{4!}{3!}} - } - - \text{ - A grid with a fixed aspect ratio of all cells. - } - - \place{0 0 1 1} - \graphic{1x1} - - \graphic{1x1} - - \graphic{1x1} - - \graphic{2x1} - - \graphic{3x2} - } - - \page{ - \setgrid{ - {[2]{2!}{2!}{2!}} - {[2!]{4!}{3}} - } - - \graphic{1x1} - - \graphic{1x1} - - \graphic{1x1} - - \graphic{2x1} - - \text{ - A grid with a fixed height relation between rows. - } - } - - \page[gutter=10mm]{ - \setgrid[ - width=0.5\width, - x=\margin - ]{ - {{1}} - } - \text{ - Multiple grids on one page. - } - \setgrid[ - width=0.5\width-\gutter, - x=\margin+0.5\width+\gutter - ]{ - {{1}} - {{1}} - {{1}} - } - } - - \page{ - \setgrid[width=\height]{ - {{1}{1}} - {{1}{1}} - } - \text{ - A grid with free positioned content. The gutter is preserved. - } - \place{0.5 0.5 1.5 1.5} - \graphic{1x1} - \place{1.5 1.5 2 2} - \graphic{1x1} - } - -\end{document} diff --git a/Master/texmf-dist/doc/latex/xput/example-template.pdf b/Master/texmf-dist/doc/latex/xput/example-template.pdf Binary files differdeleted file mode 100644 index def352592fb..00000000000 --- a/Master/texmf-dist/doc/latex/xput/example-template.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/xput/example-template.tex b/Master/texmf-dist/doc/latex/xput/example-template.tex deleted file mode 100644 index eb0b7736014..00000000000 --- a/Master/texmf-dist/doc/latex/xput/example-template.tex +++ /dev/null @@ -1,46 +0,0 @@ -%% -%% Copyright (C) 2022 by Friedemann Bartels -%% -%% This file may be distributed and/or modified under the -%% conditions of the LaTeX Project Public License, either -%% version 1.3c of this license or (at your option) any later -%% version. The latest version of this license is in: -%% -%% http://www.latex-project.org/lppl.txt -%% -%% and version 1.3c or later is part of all distributions of -%% LaTeX version 2008/05/04 or later. -%% - -\documentclass[draft]{xput} -\usepackage{lipsum} - -\pagewidth=15cm -\pageheight=15cm -\gutter=10mm - -\begin{document} - - \template[gutter=5mm]{so-gs}{ - \text{ - This is a generic template. - } - } - - \newtemplate{my template}{ - \setgrid[height=\height-20mm]{ - {[1]{1!}{1}} - {[1]{1!}{1}} - } - \placeholder{0 0 1 1} - \placeholder{1 0 2 1} - \placeholder{0 1 2 2} - } - - \template[outer margin=10mm]{my template}{ - \text{ - This is a custom template. - } - } - -\end{document} diff --git a/Master/texmf-dist/doc/latex/xput/example-text.pdf b/Master/texmf-dist/doc/latex/xput/example-text.pdf Binary files differdeleted file mode 100644 index 34212cb021e..00000000000 --- a/Master/texmf-dist/doc/latex/xput/example-text.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/xput/example-text.tex b/Master/texmf-dist/doc/latex/xput/example-text.tex deleted file mode 100644 index 9be397a0421..00000000000 --- a/Master/texmf-dist/doc/latex/xput/example-text.tex +++ /dev/null @@ -1,53 +0,0 @@ -%% -%% Copyright (C) 2022 by Friedemann Bartels -%% -%% This file may be distributed and/or modified under the -%% conditions of the LaTeX Project Public License, either -%% version 1.3c of this license or (at your option) any later -%% version. The latest version of this license is in: -%% -%% http://www.latex-project.org/lppl.txt -%% -%% and version 1.3c or later is part of all distributions of -%% LaTeX version 2008/05/04 or later. -%% - -\documentclass{xput} -\usepackage{lipsum} - -\pagewidth=15cm -\pageheight=15cm -\gutter=10mm - -\setgrid{ - {{1}{1}} -} - -\begin{document} - - \page{ - \text[breakable, name=lorem]{ - \lipsum[2-3] - \par - \lipsum[4] - } - \usetext[lorem] - } - - \page{ - \usetext[lorem] - \tcbset{ - boxrule=1mm, - boxsep=1mm,left=2mm,right=2mm,top=2mm,bottom=2mm, - colback=yellow, - colframe=red!75!black, - opacityframe=1, - opacityback=1, - arc=1mm - } - \text{ - Text boxes use the package tcolorbox, so you can style these with the tcolorbox macro \texttt{tcbset} - } - } - -\end{document} diff --git a/Master/texmf-dist/doc/latex/xput/koepi.jpg b/Master/texmf-dist/doc/latex/xput/koepi.jpg Binary files differdeleted file mode 100644 index 148819751d6..00000000000 --- a/Master/texmf-dist/doc/latex/xput/koepi.jpg +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/xput/tests.zip b/Master/texmf-dist/doc/latex/xput/tests.zip Binary files differdeleted file mode 100644 index cf12d90fcd4..00000000000 --- a/Master/texmf-dist/doc/latex/xput/tests.zip +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/xput/xputmanual-layout-guides.pdf b/Master/texmf-dist/doc/latex/xput/xputmanual-layout-guides.pdf Binary files differdeleted file mode 100644 index 0ec732a859d..00000000000 --- a/Master/texmf-dist/doc/latex/xput/xputmanual-layout-guides.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/xput/xputmanual-layout-guides.tex b/Master/texmf-dist/doc/latex/xput/xputmanual-layout-guides.tex deleted file mode 100644 index 023858736af..00000000000 --- a/Master/texmf-dist/doc/latex/xput/xputmanual-layout-guides.tex +++ /dev/null @@ -1,41 +0,0 @@ -%% -%% Copyright (C) 2022 by Friedemann Bartels -%% -%% This file may be distributed and/or modified under the -%% conditions of the LaTeX Project Public License, either -%% version 1.3c of this license or (at your option) any later -%% version. The latest version of this license is in: -%% -%% http://www.latex-project.org/lppl.txt -%% -%% and version 1.3c or later is part of all distributions of -%% LaTeX version 2008/05/04 or later. -%% - -\documentclass[ - bleed=3mm, - margin=10mm, - gutter=5mm, - page width=20cm, - page height=20cm, - safety margin=2mm, - draft, - safezone, - grid, - graphpaper -]{xput} - -\begin{document} - - \newtemplate{layoutguidesexample}{ - \setgrid{ - {{6}{1}} - } - \placeholder{0 1 1 2} - \placeholder{0 0 1 1} - } - \template{layoutguidesexample}{ - - } - -\end{document} diff --git a/Master/texmf-dist/doc/latex/xput/xputmanual.pdf b/Master/texmf-dist/doc/latex/xput/xputmanual.pdf Binary files differdeleted file mode 100644 index ccb1e39f442..00000000000 --- a/Master/texmf-dist/doc/latex/xput/xputmanual.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/xput/xputmanual.tex b/Master/texmf-dist/doc/latex/xput/xputmanual.tex deleted file mode 100644 index ff75b4eecf6..00000000000 --- a/Master/texmf-dist/doc/latex/xput/xputmanual.tex +++ /dev/null @@ -1,473 +0,0 @@ -%% -%% Copyright (C) 2022 by Friedemann Bartels -%% -%% This file may be distributed and/or modified under the -%% conditions of the LaTeX Project Public License, either -%% version 1.3c of this license or (at your option) any later -%% version. The latest version of this license is in: -%% -%% http://www.latex-project.org/lppl.txt -%% -%% and version 1.3c or later is part of all distributions of -%% LaTeX version 2008/05/04 or later. -%% - -\documentclass[a4paper]{ltxdoc} -\usepackage{microtype} -\usepackage{hyperref} -\usepackage{tikz} -\OnlyDescription -\hypersetup{pdfborder={0 0 0}} -\def\Xputversion{1.0.2} - -\begin{document} - -\title{ - \Huge The \textsf{Xput} class\\ - \Large\url{https://github.com/friedemannbartels/xput}\\ - \Large Manual for Version \Xputversion -} - -\author{\href{mailto:mail@friedemannbartels.de}{Friedemann Bartels}} - -\maketitle - -\tableofcontents - -\newpage - -\section{Introduction} - -When Apple discontinued its photo book feature in Apple Photos, I was missing an easy-to-use photo book application. -In 2020, I started to develop my own solution. -What started with some SVG templates and shell scripts ended up in the Xput class, a declarative desktop publishing approach. -\par -With Xput you can create single- and double-sided documents, create pages with margins, safety margins, and bleed, use templates, align text and graphics in a grid, wrap text across multiple pages and use before pages. -Generic templates, automatic grid layout and a simple and consistent user interface make it easier than ever to create graphics-rich documents with \LaTeX. -Under the hood Xput uses the TikZ and tcolorbox packages, ImageMagick and Inkscape. - -\section{Document}\label{sec:document} - -The document options described in the following can be either set as a document option (|\documentclass[twoside]{xput}|) or with a macro (|\twoside|) in the preamble. - -\DescribeMacro {\documentclass} -Use the class and define your options with the |\documentclass|\oarg{options}|{xput}| macro. -A single sided document is the default. -\begin{figure}[h!] -\begin{tikzpicture} - \draw[black, thin] (0,0) rectangle (1,1); - \draw[black, line width=1.5pt,line cap=round] (0,0) -- (0,1); - \draw[black, thin] (1.25,0) rectangle (2.25,1); - \draw[black, line width=1.5pt,line cap=round] (1.25,0) -- (1.25,1); - \draw[black, thin] (2.5,0) rectangle (3.5,1); - \draw[black, line width=1.5pt,line cap=round] (2.5,0) -- (2.5,1); -\end{tikzpicture} -\end{figure} - -\DescribeMacro {\twoside} -Using the document option |twoside| results in a document with left and right pages. -When you create a two-sided document, your document always has an even number of pages. -If you create a document with an odd number of pages, an additional page is automatically inserted. -Two-sided documents start with a right page by default. -\begin{figure}[h!] -\begin{tikzpicture} - \draw[black, thin] (0,0) rectangle (1,1); - \draw[black, line width=1.5pt,line cap=round] (0,0) -- (0,1); - \draw[black, thin] (1.25,0) rectangle (2.25,1); - \draw[black, line width=1.5pt,line cap=round] (2.25,0) -- (2.25,1); - \draw[black, thin] (2.35,0) rectangle (3.35,1); - \draw[black, line width=1.5pt,line cap=round] (2.35,0) -- (2.35,1); - \draw[black, thin] (3.6,0) rectangle (4.6,1); - \draw[black, line width=1.5pt,line cap=round] (4.6,0) -- (4.6,1); -\end{tikzpicture} -\end{figure} - -\DescribeMacro {\beginleft} -Use the option |beginleft| to begin with a left page. -\begin{figure}[h!] -\begin{tikzpicture} - \draw[black, thin] (0,0) rectangle (1,1); - \draw[black, line width=1.5pt,line cap=round] (1,0) -- (1,1); - \draw[black, thin] (1.1,0) rectangle (2.1,1); - \draw[black, line width=1.5pt,line cap=round] (1.1,0) -- (1.1,1); - \draw[black, thin] (2.35,0) rectangle (3.35,1); - \draw[black, line width=1.5pt,line cap=round] (3.35,0) -- (3.35,1); - \draw[black, thin] (3.45,0) rectangle (4.45,1); - \draw[black, line width=1.5pt,line cap=round] (3.45,0) -- (3.45,1); -\end{tikzpicture} -\end{figure} - -By default, each page is placed on one paper. -\DescribeMacro {\fanfold} -With the |fanfold| option you can change this behavior so that a left and a right page are placed on one paper. -In this case, the first page is a left one by default. -\begin{figure}[h!] -\begin{tikzpicture} - \draw[black, thin] (0,0) rectangle (1,1); - \draw[black, thin] (1,0) rectangle (2,1); - \draw[black, line width=1.5pt,line cap=round] (1,0) -- (1,1); - \draw[black, thin] (2.25,0) rectangle (3.25,1); - \draw[black, thin] (3.25,0) rectangle (4.25,1); - \draw[black, line width=1.5pt,line cap=round] (3.25,0) -- (3.25,1); -\end{tikzpicture} -\end{figure} - -\DescribeMacro {\cover} -The |cover| option is similar to the |fanfold| option, but only applied to cover pages. -Read more about cover pages in section~\ref{sec:pages}. -\begin{figure}[h!] -\begin{tikzpicture} - \draw[black, thin] (0,0) rectangle (2.3,1); - \draw[black, line width=1.5pt,line cap=round] (1,0) -- (1,1); -(3.25,1); - \draw[black, line width=1.5pt,line cap=round] (1.3,0) -- (1.3,1); -(3.25,1); -\end{tikzpicture} -\end{figure} - -\DescribeMacro {\beginright} -If you want your fanfold document to start with a right hand page, you can use the option |beginright|. -\begin{figure}[h!] -\begin{tikzpicture} - \draw[black, thin] (0,0) rectangle (1,1); - \draw[black, thin] (0,0) -- (1,1); - \draw[black, thin] (0,1) -- (1,0); - \draw[black, thin] (1,0) rectangle (2,1); - \draw[black, line width=1.5pt,line cap=round] (1,0) -- (1,1); - \draw[black, thin] (2.25,0) rectangle (3.25,1); - \draw[black, thin] (3.25,0) rectangle (4.25,1); - \draw[black, line width=1.5pt,line cap=round] (3.25,0) -- (3.25,1); - \draw[black, thin] (4.5,0) rectangle (5.5,1); - \draw[black, thin] (5.5,0) rectangle (6.5,1); - \draw[black, thin] (5.5,0) -- (6.5,1); - \draw[black, thin] (5.5,1) -- (6.5,0); - \draw[black, line width=1.5pt,line cap=round] (5.5,0) -- (5.5,1); -\end{tikzpicture} -\end{figure} - -\subsection{Lengths}\label{subsec:size} - -The document lengths described below can be set either as a document option (|\documentclass[page width=21cm]{xput}|) or by assigning the dimension directly (|\pagewidth=21cm|) in the preamble or in the document. - -\DescribeMacro {\pagewidth} -\DescribeMacro {\pageheight} -You can set the lengths |page width| and |page height|. -The default page size is |210mm| by |297mm|. - -\DescribeMacro {\bleed} -You can set the |bleed| length. -It applies to all paper edges. -The default bleed is |0mm|. -You can override the bleed for each edge separately by defining the lengths |top bleed|, |inner bleed|, |bottom bleed|, |outer bleed|. -The paper size results from the page size and the bleed. - -\DescribeMacro {\safetymargin} -The |safety margin| is the only length that has no influence on the final result. -Its only purpose is to control the safe zone during editing. -It is |0mm| by default and can be configured for each edge by defining |top safety margin|, |inner safety margin|, |bottom safety margin| and |outer safety margin|. - -\DescribeMacro {\margin} -\DescribeMacro {\gutter} -You can set the lengths |margin| and |gutter| for the document, for a page (see section~\ref{sec:pages}) or for a grid (see section~\ref{sec:grid}). -The default margin is |20mm|, the default gutter is |0mm|. -Similar to bleed and safety margin, the margin can be defined for each edge individually by setting |top margin|, |outer margin|, |bottom margin| and |inner margin|. - -You can create documents with cover pages. -\DescribeMacro {\coverwidth} -\DescribeMacro {\coverheight} -Read more about creating cover pages in section~\ref{sec:pages}. -You can set the lengths |coverwidth| and |coverheight|. -By default, the cover pages are the same size as the inside pages. -If you want to create a cover with a spine, use the |fanfold| or |cover| option described in section~\ref{sec:document}. -In this case the length |spinewidth| takes effect. -The default spine width is |3mm|. -\par -You can overwrite the bleed and the safety margin for cover pages. -To do this, prefix the respective lengths described above. -For example, define |cover inner bleed| or |cover safety margin|. - -\subsection{Page Graphics and Colors}\label{subsec:colors} - -You can define a page graphic and a page color with the options |page graphic| and |page color|. -Set the option |color| to define the text color. -These options can be defined for the document or for each page (see section~\ref{sec:pages}). -\par -Read how to set the scale and crop of a page graphic with the |\newgraphic| macro in section~\ref{sec:content}. - -\subsection{Layout Guides} - -The layout guides described in the following can be either set as a document option (|\documentclass[grid]{xput}|) or using a macro (|\grid|) in the preamble or the document. -Layout guides can be switched on (|\safezone|) or off (|\nosafezone|). - -\DescribeMacro {\grid} -The |grid| option visualizes the margin and the grid gutters with green lines. -Read more about the grid in section~\ref{sec:grid}. -\DescribeMacro {\safezone} -The |safezone| layout guide shows a red border for the bleed and a thin pink line to indicate the safety margin. -\DescribeMacro {\cuttingmarks} -As an alternative to |safezone|, you can also use |cutting marks| to display cutting marks. -\DescribeMacro {\graphpaper} -Show a graph paper with the |graph paper| option. - -\begin{figure}[h] -\begin{tikzpicture} - \node[anchor=south west,inner sep=0] (image) at (0,0) {\includegraphics[trim={15cm 16.5cm 0cm 0},clip,scale=1,page=1]{xputmanual-layout-guides.pdf}}; - \node[anchor=south west,text depth=0mm,text width=4cm] (bleed) at (65mm,33mm) {Bleed}; - \draw (bleed) -- ++(-32mm,0); - \node[anchor=south west,text depth=0mm,text width=4cm] (bleed) at (65mm,27mm) {Safety margin}; - \draw (bleed) -- ++(-35mm,0.0); - \node[anchor=south west,text depth=0mm,text width=4cm] (margin) at (65mm,21mm) {Margin}; - \draw (margin) -- ++(-43mm,0.0); - \node[anchor=south west,text depth=0mm,text width=4cm] (gutter) at (65mm,15mm) {Gutter}; - \draw (gutter) -- ++(-70mm,0.0); - \node[anchor=south west,text depth=0mm,text width=4cm] (placeholder) at (65mm,9mm) {Placeholder}; - \draw (placeholder) -- ++(-50mm,0.0); - \node[anchor=south west,text depth=0mm,text width=4cm] (graphpaper) at (65mm,3mm) {Graph paper}; - \draw (graphpaper) -- ++(-40mm,0.0); -\end{tikzpicture}% -\end{figure} - -\DescribeMacro {\placeholders} -The |placeholders| option shows template placeholders. -Read more about templates in section~\ref{sec:templates}. -\DescribeMacro {\fillpages} -If you create a document with a cover and a first right hand page, use the |fill pages| option during editing to add blank pages to get a better impression of the final result. - -\subsection{Draft Mode}\label{subsec:draftmode} - -The |draft| option is a shortcut to enable the options |placeholders|, |cutting marks| and |fill pages|. -It also speeds up rebuilding the PDF when changing the document. - -\section{Pages}\label{sec:pages} - -\DescribeMacro {\page} -Create a page with the macro |\page|\oarg{options}\marg{content}. -You can overwrite the document options |margin|, |top margin|, |bottom margin|, |inner margin|, |outer margin|, |gutter|, |page color|, |page graphic| and |color| for each page. - -Use the option |double| to create a double page. -When creating a double page after a left page, a right page is automatically inserted before the double page. -The option |double| is only recognized for double sided documents. -\par -Use the options |front cover| or |back cover| to create a front or back cover. -If you have a back cover and a front cover, the back cover page must be defined first. -If no option is active, the front cover is placed as the first page and the back cover as the last page of the document. -In this case, the only difference from normal pages is that the cover pages are not counted in the page numbering. -\par -If the option |fanfold| or |cover| is selected, the back and front covers are laid out on one paper so that the cover is suitable for a book with a hard or soft cover (see section~\ref{sec:document}). -Space is reserved between the back and front covers for the spine. -Set the |spine width| document option as described in section~\ref{subsec:size}. -\par -With the options |hpos| and |vpos| you can set the default grid alignment for a page. -Read more about the grid in the next section. - -\DescribeMacro {\setpagecolor}Alternativly to the option you can use the macro |\setpagecolor|\marg{color} to set the page color for all following pages. - -\DescribeMacro {\setpagegraphic}With the macro |\setpagegraphic|\oarg{options}\marg{name} you can define a page graphic for all following pages. -The name references a graphic version created with the |\newgraphic| macro (see section~\ref{sec:content}). -If no graphic version with the given name exists, the macro uses the name as the file name. -You can change the clipping by defining relative decimal values for the options |scale| (>1), |hpos| and |vpos| (0-1). - -\DescribeMacro {\newbeforepage}With the macro |\newbeforepage|\marg{name}\marg{content} you can create a reusable page layer, that can be set before pages. -\DescribeMacro {\setbeforepage} -Use the macro |\setbeforepage|\marg{name} to define a before page for all following pages or use the page option |before page| to specify a before page for a individual page. - -\DescribeMacro {\ifleftpage} -\DescribeMacro {\ifrightpage} -Use the condition |\ifleftpage|\marg{content} and |\ifrightpage|\marg{content} to check for the current page alignment. - -\DescribeMacro {\leftpage} -Within a page scope you can use the |\leftpage|\marg{content} macro to place content only on a left page. -In comparison to the |\ifleftpage|\marg{content} condition, the macro sets a grid for a single page. -That way you can combine single with double page layouts. -\DescribeMacro {\rightpage} -Accordingly you can use the |\rightpage|\marg{content} macro. - -\section{Grid}\label{sec:grid} - -The grid allows you to create rows with cells. -You can define width and height relations between rows and cells. -All definitions are relative. -The size and position results from these relations and the configured dimensions page width, page height, margin and gutter. - -\DescribeMacro{\setgrid} -Create a grid with the macro |\setgrid|\oarg{options}\marg{config}. -The grid configuration is a nested list of rows and cells. -A cell is defined by a number that describes the width ratio to the other cells in the row. -The default grid describes a row with one cell: - -\begin{verbatim} - \setgrid{ - {{}}} -\end{verbatim} - -You can define a width relation between cells by adding a integer value for each cell: - -\begin{verbatim} - \setgrid{ - {{1}{2}}} -\end{verbatim} - -With an optional integer value for each row you can set a height relation between rows: - -\begin{verbatim} - \setgrid{ - {[2]{1}{2}} - {[1]{1}{2}}} -\end{verbatim} - -You can set an aspect ratio for a cell by adding a |!| to the width. -This way the aspect ratio is defined by the width of the cell and the height of the row. -If all cells in a row have a fixed aspect ratio, the aspect ratio of the row is fixed too. -In the following, a row with only fixed cells is named a fixed row. -Because the height of a fixed row is determined by the aspect ratios of the cells, the height relation to the flexible rows is broken. -In this case, you can force a height relation between flexible and fixed rows by adding a |!| to the height of the flexible row. -In the following, a row with a forced height is named a forced row. - -The example defines a first fixed row with one cell and an aspect ratio of 3:2. -The height of the second row is forced half of the height of the first row. -The cells in the second row share the available width in the ratio one to two: - -\begin{verbatim} - \setgrid{ - {[2]{3!}} - {[1!]{1}{2}}} -\end{verbatim} - -If the height of fixed and forced rows exceeds the available height, the grid shrinks to fit the available space. -The defined aspect ratios of the cells are preserved and the grid is centered horizontally. -In this case you can define the |hpos| option to align the grid horizontally. -A value of |0| aligns the grid to the left, a value of |1| aligns the grid to the right. -The default is a value of |0.5|. - -If the height of fixed and forced rows is less than the available height, all flexible rows share the excess height. -If there are no flexible rows, the grid is centered vertically. -In this case you can define the |vpos| option to align the grid vertically. -A value of |0| aligns the grid to the top, a value of |1| aligns the grid to the bottom. -The default is a value of |0.5|. - -As for a document or a page you can set |margin| and |gutter| options for a specific grid. -With the options |width|, |height|, |x| and |y| you can override the intrinsic grid size and position. -When overriding the grid size and position, you can calculate with the intrinsic values, for example |x=\x-1cm|. - -\subsection{Placing Content} - -The grid aligns content (see section~\ref{sec:content}) automatically in the given grid cells. -To set the position of a content box manually use the macro |\place|\marg{fromrow fromcell torow tocell}. -\DescribeMacro{\place} -To place content in the first row and first cell use the macro |\place{0 0 1 1}| before the content. -The definded place applies only for the following content box. -The next boxes are then again placed with auto layout. -\par -The macro accepts decimals. -That allows you to place content everywhere within the grid. -The |gutter| is taken into account when calculating the positions. - -\section{Content}\label{sec:content} - -\subsection{Text} - -\DescribeMacro{\text} -With the macro |\text|\oarg{options}\marg{text} you can place text. -Align the text vertically with the |center| and |bottom| options. -\par -The |\text| macro uses the package tcolorbox and accepts tcolorbox options, for example to set text, frame or background color and transparency. -The tcolorbox behaves slightly diffenrent then the standalone version: spacings, rules and background are removed by default. -You can change the behaviour with the tcolorbox macro |\tcbset|\marg{options}. -Also the |arc| options behaves different: if you set the |arc| to |0pt| the |outer arc| is also set to |0pt|. -\par -Add the option |breakable| to break text over multiple boxes and pages. -\DescribeMacro{\usetext} -Use the macro |\usetext|\oarg{name} to place the following text boxes in the grid. -If you want to use multiple breakable text boxes you can initialize the text with the |name| option and define a name that you then can pass to the |\usetext| option. -\par -The |\text| macro accepts the options |shadow|, |shadow size|, |shadow color|, |shadow opacity|, |shadow xshift|, |shadow yshift|, |border|, |border width|,\break |border color| and |border radius|. -Read more about shadows and borders in section~\ref{subsec:borders}. - -\subsection{Graphics} - -\DescribeMacro{\newgraphic} -Create a reusable graphic version with the |\newgraphic|\marg{name}\marg{options} macro. -Define the options |scale| (>1), |hpos| and |vpos| (0-1) to set the clipping of the graphic. -With the option |file| you can link a file. -If no file is defined, the name is used as the file name. - -\DescribeMacro{\graphic} -The |\graphic|\oarg{options}\marg{name} macro places a graphic. -The name references a graphic version created with the |\newgraphic| macro. -If no graphic version with the given name exists, the macro uses the name as the file name. - -The graphic is scaled to fit in the content box. -If the aspect ratio of the graphic differs from that of the defined content box, the graphic is cropped. -You can change the cropping by defining relative decimal values for the options |scale| (>1), |hpos| and |vpos| (0-1). -Same as the |\text| macro, the |\graphic| macro accepts the |border| and |shadow| options described in section~\ref{subsec:borders}. - -\DescribeMacro{\graphicspath} -You can use the macro |\graphicspath|\marg{dir-list} of the graphics package to specify a list of directories in which to search for graphic files. - -\subsection{Other} - -\DescribeMacro{\xput} -The macro |\xput|\marg{code} is an easy way to place arbitrary content in the grid. -Within the code block the dimensions |\width| and |\height| represent the size of the content area and can be used to create graphics, that fit and adapt to the available size. -\par -\DescribeMacro{\tikzgraphic} -The macro |\tikzgraphic|\marg{tikz code} works like the |\xput| macro, but wraps your input in a |tikzpicture|. - -\subsection{Shadows and Borders}\label{subsec:borders} - -Text and graphic content can be placed with a border or a shadow. -You can define a border or shadow for a specific content box by using the options |border width|, |border color|, |border radius| to add a border or |shadow size|, |shadow color|, |shadow opacity|, |shadow xshift|, |shadow yshift| to add a shadow. -\par -\DescribeMacro{\newborder} -\DescribeMacro{\newshadow} -Define a reusable border or shadow with the macros |\newborder|\marg{name}\marg{options} or |\newshadow|\marg{name}\marg{options}. -Apply the border or shadow to |\text| or |\graphic| with the option |border| or |shadow|. -\par -\DescribeMacro{\setborder} -\DescribeMacro{\setshadow} -To set a border or shadow within a page or document scope, use the macros |\setborder|\oarg{options}\marg{name} or |\setshadow|\oarg{options}\marg{name}. - -\section{Templates}\label{sec:templates} - -\DescribeMacro{\newtemplate} -With the macro |\newtemplate|\marg{name}\marg{layout} you can create a reusable layout. -Creating a template works the same way as creating a page. -In addition to graphics and text you can define placeholders. -\DescribeMacro{\placeholder} -Use the macro |\placeholder|\marg{fromrow fromcell torow tocell} to define a content area that can later be filled with a text or a graphic. - -\DescribeMacro{\template} -To use a template use the macro |\template|\oarg{options}\marg{name}\marg{content}. -The available options are the same as for pages. - -The macro |\template| comes with an easy way to generate templates by using a name pattern. -For example the template name \textit{sp} creates a template with a square and a portrait format placeholder. -In this case the letter |s| specifies a square (1:1) and the letter |p| a portrait (2:3) format placeholder. -Use the letter |l| to define a landscape ratio (3:2), |g| for golden ratio (5:3), |o| for golden upright ratio (3:5), |w| for wide ratio (2:1) or |f| for a flexible ratio. -With the character |-| you can start a new row. -Within a row you can mix the fixed placeholders (|s|, |p|, |l|, |g|, |o|, |w|) or use only flexible placeholders~(|f|). - -\section{Image Optimization}\label{sec:optimization} - -\DescribeMacro{\optimize} -With the macro |\optimize|\oarg{options} you can enable image optimization. -When enabled, JPG and PNG images are croped, resized and cached. -This results in fast rebuilds when changing the document. -You can set the options |density|, |quality|, |unsharp| and |downsample threshold|. -The |density| option takes a number of the pixels per inch (default |300|), the |quality| option takes numbers between 1 and 100, the |unsharp| option an ImageMagick unsharp configuration (default |2x1|) and the |downsample threshold| a decimal value greater or equal 1 (default |1.2|). -The |unsharp| option can also be applied for individual graphics. -\par -If you use image optimization and change the original graphics files, you must delete the cached versions so that the cache will update. -\DescribeMacro{\import} -The |\import| macro helps you to streamline this process. -When enabled, you need an import directory in which to place the modified files. -When the document is created, the files are moved to your image directory and the corresponding cached versions are automatically regenerated. -The import directory is either the directory \emph{import} in your working directory. -Or you can set a system wide import directory by defining the shell variable |XPUT_IMPORT_DIRECTORY|. -\par -\DescribeMacro{\preflight} -Use the |\preflight| macro to proof the image resolution. -If images have a final resolution less then 300 ppi you get a warning, if less then 200 ppi you get an error. -With preflight enabled the maximum possible resolution is shown next to each graphic. - -\end{document} |