Graphics, Figures & TablesHow i can stop text at right?

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
jimkaip
Posts: 13
Joined: Fri Oct 19, 2018 8:13 am

How i can stop text at right?

Post by jimkaip »

Hello.
I have at every page ...

Code: Select all

\AddEverypageHook{\begin{tikzpicture}[remember picture, overlay]
  \node[draw,minimum width=50mm,rotate=-90,fill=orange,text=blue,font=\LARGE]
  at ($(current page.north east) + (-5mm,-25mm)$) {\fontspec[Scale=1.3]{KSAntigone-Bold}THE PAGE};
\end{tikzpicture}}
How i can stop the text at the left of page.

Thank you
Jim.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Bartman
Posts: 369
Joined: Fri Jan 03, 2020 2:39 pm

How i can stop text at right?

Post by Bartman »

You have already been asked for a Infominimal working example in an older topic. Please also mark your code.

The everypage package must be loaded directly or indirectly in order to use the \AddEverypageHook command. In its description in source2e you will find a replacement for which you don't have to load another package since october 2020 (ltnews32).

You can also put the node in the top right corner with the help of the anchor option. Later shifting can be done with or without the calc library of TikZ.

At least I don't understand what you want to change.
jimkaip
Posts: 13
Joined: Fri Oct 19, 2018 8:13 am

How i can stop text at right?

Post by jimkaip »

After i use \AddEverypageHook the text is on every page.
I can not stop it for some pages and after.

Code: Select all

\documentclass{article}
\usepackage[top=15mm, bottom=15mm, left=15mm, right=15mm,textwidth=210mm,textheight=297mm]{geometry}
\usepackage{fontspec}
\usepackage{xunicode}
\usepackage{xltxtra}
\usepackage{setspace}
\usepackage{color,xesearch}
\usepackage{xcolor}
\usepackage[ancientgreek]{xgreek}
\usepackage{caption}
\usepackage[explicit]{titlesec}
\usepackage{tikz}
\usetikzlibrary{trees}
\usetikzlibrary{matrix,shapes,arrows,positioning,chains}
\usepackage{framed}
\usepackage{pdflscape}
\usepackage{pgfplots}
\usepackage{setspace}
\usepackage{makeidx}
\usepackage{hyperref}
\hypersetup{colorlinks,citecolor=black,filecolor=black,linkcolor=red,urlcolor=black}
\usepackage{graphicx}
\usepackage{setspace}
\usepackage{yfonts,color}
\usepackage{multicol}
\usepackage{rotating}
\usepackage{eso-pic}
\usepackage{svg}
\usepackage{float}
\usepackage{wrapfig}
\usepackage{pagecolor}
\usepackage{fancyhdr}
\usepackage{pdfpages}
\usepackage{lettrine}
\usepackage{ragged2e}
\usepackage{tcolorbox}
\usepackage{setspace}
\usepackage{textcomp}
\usepackage[bottom]{footmisc}
\usepackage{wallpaper}
\usepackage{lettrine}
\usepackage{adjustbox}
\usepackage{lipsum}
\usepackage{setspace}
\usepackage{tikz}
\usetikzlibrary{calc}

\usepackage{tikzpagenodes}
\usepackage{everypage}
%\usepackage{mwe}

\setmainfont[Mapping=tex-text,Ligatures=Common,Scale=2.1]{Courier New}

\begin{document}

\AddEverypageHook{\begin{tikzpicture}[remember picture, overlay] \node[draw,minimum width=50mm,rotate=-90,fill=orange,text=blue,font=\LARGE] at ($(current page.north east) + (-5mm,-25mm)$) {\fontspec[Scale=1.3]{KSAntigone-Bold}Ἑξάψαλμος};\end{tikzpicture}}
\input{an-input-tex-file}

..........
Thank you
Jim.
User avatar
MjK
Posts: 89
Joined: Fri Jan 28, 2022 6:09 pm

How i can stop text at right?

Post by MjK »

The default of article is a single sided document. So you do not have left and right pages, but all pages are right pages. However, if you want something only on pages with odd page numbers, you can do tests like \Ifthispageodd of package scrextend (see page 301 of the KOMA-Script Manual). Maybe inside a page hook even a simple \expandafter\ifodd\value{page} … \else … \fi could be used.

Note: I've not tested anything, because your example is not working (please test it using the Run LaTeX here button) and Graphics, Figures & Tables is no one of my topics. So I'm also not intended to do additional replies to this thread.
My main topics are KOMA-Script and other questions related to my packages. If I reply to any other topic or if you've not yet added a minimal working example, please do not expect any further response. And please don't forget to tag examples as code.
Post Reply