Tag Info

15

You can use eso-pic to place content in the ForeGround in the centre of every page: \documentclass{article} \usepackage{eso-pic,xcolor,lipsum} \AddToShipoutPictureFG{% \AtPageCenter{% \color{red}% \makebox[0pt]{\rule{250pt}{2pt}}% \makebox[0pt]{\rule[-250pt]{2pt}{500pt}}% }% } \begin{document} \lipsum[1-50] \end{document}

11

For example, there is a paragraph with four lines, two lines are at the bottom of the column A and two lines are at the top of the next column B. Then, one or more words are removed with the result that TeX breaks the paragraph in three lines instead of four. The document has set \clubpenalty and \widowpenalty to 10000 to prevent widows and orphans (page ...

10

Use pdfcrop: \documentclass{article} \usepackage{lipsum} % for mock text \pagestyle{empty} % no page ornaments \begin{document} \lipsum[1] \end{document} Save this as shortdoc.tex and run pdflatex shortdoc pdfcrop shortdoc This will produce shortdoc-crop.pdf, that you can include with \includegraphics.

9


8

You can almost never accurately reference the page counter from within the main document, only during the output routine where the page being shipped out is accurately known. Luatex does not change the basic model of the way TeX pages are output so the same applies in luatex. In your lua loop you can use mcount=mycount+1 tex.print('\\includegraphics{...

7

Welcome to TeX.SE.! As far as I know, a .pdf or .dvi file can not have such a functionality (for whole pages). But it can have it for comments... something that I suppose is not enough for you. If you open any pdf (or dvi) by using any viewer of your system, you will see that all the pages are visible. So, the I don't think you can do it with just a pdf or ...

7

One solution could be xr-hyper: curriculum.tex: \documentclass[twocolumn]{article} \usepackage{xr-hyper} \usepackage[colorlinks,allcolors=blue]{hyperref} \externaldocument{001} \externaldocument{002} \usepackage{nameref} \parindent0pt \begin{document} \section*{\em\centering Curriculum vitae} \ref{pub}. \nameref{pub} \dotfill \pageref{pub}\par \ref{books}...

7

Overview As noted elsewhere, columnsets cannot be mixed with regular text. As such, the given approach will not work as expected. Also, mixedcolumns do not provide the ability for unequal columns. The following changes resolve the issues: Use the newcolumnsets module, also known as page grids Ensure that the layout is using grids Remove the illustration ...

5

I suppose your MWE is something like \documentclass[10pt,b5paper,dvipdfmx]{jreport} \begin{document} foo \end{document} and typeset this using pLaTeX and dvipdfmx, which indeed produces an A4-sized PDF. The reason for this is that the b5paper option just tells jreport to lay out the content in a B5-sized domain but is not related to the actual page size of ...

5

\xpatchcmd (from xpatch) has the same format/interface than its counterpart \patchcmd (from etoolbox): \xpatchcmd{<cmd>}{<search>}{<replace>}{<success>}{<failure>} \xpatchcmd searches for <search> in <cmd> and replaces it with <replace>. If this search-and-replace is successful, it executes <success>, ...

5

You can rotate and displace the shipout box. But you can't rotate the "pdf background", the pdf reference allows only multiples of 90. \documentclass[a4paper,12pt]{article} \usepackage{lipsum} \usepackage{graphicx,atbegshi} \begin{document} \lipsum \AtBeginShipoutNext{% \setbox\AtBeginShipoutBox=\hbox{% \rotatebox{35}{\hspace{-4cm}\box\AtBeginShipoutBox}% ...

4

Note the use of the undocumented feature of \includegraphics. \documentclass{article} \usepackage{pdfpages} \newlength{\tempwidth} \begin{document} \settowidth{\tempwidth}{\includegraphics[page=1]{lipsum.pdf}} \includepdf[fitpaper,pages=1,trim={0 0 {.5\tempwidth} 0},clip]{lipsum.pdf} % *** \end{document}

4

Use \vspace*{\fill} instead of \vspace*{18cm} at the beginning of the titlepage environment. The 18cm are to high and so the (unneeded?) \\ results in a page break. \documentclass [paper=a4, % A4 twoside=off, % nicht doppelseitig setzen DIV=13, % Vordefinierte Seitenränder (15=min, 0=max) fontsize=12pt, % default font size BCOR=15.0mm, % ...

4

Page numbers are typically inserted as part of the page style. An empty page style removes both header and footer from your document, which is probably what happened here. Remove \pagestyle{empty} from your code in order to restore the page numbering.

4

If I understand you rightly, then you can use the standard memoir commands to change the document page layout. The only catch is that the size of the type set text block isn't automatically changed by memoir. Changing this mid-document can be a bit tricky, but you can copy what the geometry package does to do this provided you also surround things with a ...

4

There are two complications here. Firstly, every call to \directlua runs immediately, so if you want TeX's usual processing to happen, you need to relinquish control to TeX (and use coroutines or something). So when you have \directlua{for i = 1, 60 do tex.print(tex.count['c@page']) tex.print([[\par]]) end} } as in the question, this simply puts 60 ...

4

This is a very basic solution which just reads the value of the LaTeX counter page in Lua (printing is for testing, but the tex.count statement can be used at other places as well). \documentclass{article} \newcommand\printluapage{% \directlua{tex.print(tex.count['c@page'])} } \begin{document} \printluapage\clearpage\printluapage\clearpage\...

4

The problem of interleaving is partly solved in ConTeXt. You can access the page number from within Lua and it is updated at some point but the problem David described in his comment persists. \starttext \startluacode for i = 1, 60 do context(context.currentpage) context.par() end \stopluacode \stoptext

4

Here it goes :) I created two macros: \startpreview and \endpreview. Their behavior: Everything after a \startpreview will be written to the output pdf. Everything starting from the page after an \endpreview will be discarded, unless a \startpreview overrides this. How they work: I defined two counters (I couldn't make it work with a \newif, for some ...

4

I'm adding another answer because the previous one almost works and because it is a completely different approach. I defined the same two commands; \startpreview and \endpreview. Their behavior: The \startpreview macro defines a \prevpage macro that holds the current page number. The \endpreview macro will complete this page range crating a macro with ...

4

Following from @barbarabeeton in your MWE change \checkandfixthelayout to \checkandfixthelayout[lines] which will ensure that the text height is (slightly) adjusted such that an integral number of lines in the body font will fit exactly into the height. For further information on this see the memoir manual (> texdoc memoir).

4

The main drawback with this approach is that it puts the entire speech into a BF buffer. The showframe is just to check alignment. I played around with fancyhdr and \pagestyule{myheadings) but finally went with \afterpage. \documentclass[paper=a5]{article} \usepackage{blindtext} \usepackage{afterpage} \usepackage{showframe} \newsavebox{\BFbuffer} \...

4

The memoir class includes a command \leavespergathering{num} which will ensure that there will be the correct number of pages output to make a complete set of gatherings of num leaves (2num pages) each. Thus for a total of 16 pages (8 leaves 1 gathering) \leavespergathering{8} will produce sets of 16 pages. If there are only, say, 13 pages then three ...

4

Given the rather precise promises you make (only one index entry per item, only one page reference etc) you could just alter the \index command so that it automatically creates a label with the same name as well. Then you just use the ordinary \pageref command to cross-reference it. \documentclass{article} \usepackage{makeidx} \makeatletter \def\@wrindex#1{...

4

You could use ConTeXt's imposition mechanism. The examples have to be typeset using context --arrange. \setuparranging[2TOP] \definepapersize [card] [height=5in,width=8.5in] \setuppapersize [card] [letter] \definemakeup [custom] [align=middle,headerstate=start] \setupheadertexts[Header][] \showframe \starttext \startmakeup[...

4

I propose two solutions. Using tcolorbox's if odd page option tcolorbox has special options to run different code depending on whether the box is on an odd page or on an even page. Here, we use if odd page to set the width and height options in a page-dependent way. In case you have breakable boxes, read section Even and Odd Pages of the tcolorbox manual (...

4

I would use three separate table environments, with four separate tables, grouped by the subtitles. \documentclass[ openright, titlepage, numbers=noenddot, headinclude, %twoside, %1headlines, footinclude=true, cleardoublepage=empty, %abstractoff, % <--- obsolete, remove (todo) BCOR=5mm, paper=a4, fontsize=11pt ngerman, ...

Only top voted, non community-wiki answers of a minimum length are eligible