Include tikz image in other text files of each chapter
up vote
1
down vote
favorite
I am working on a book which each chapter has an image .jpg or .png. The code that accomplishes this is:
newcommand{thechapterimage}{}
newcommand{chapterimage}[1]{renewcommand{thechapterimage}{#1}}
defthechapter{arabic{chapter}}
def@makechapterhead#1{
thispagestyle{empty}
{centering normalfontsffamily
ifnum c@secnumdepth >m@ne
if@mainmatter
startcontents
begin{tikzpicture}[remember picture,overlay]
node at (current page.north west)
{begin{tikzpicture}[remember picture,overlay]
node[anchor=north west,inner sep=0pt] at (0,0) {includegraphics[width=paperwidth]{thechapterimage}};
%Comentando las 3 líneas de abajo quita la caja de contenidos en el título del capítulo
draw[rounded corners=10pt, fill=white,opacity=0.5] (1cm,0cm) rectangle (8cm,-9.3cm); %%%%%%%%%%%%%%%%%%% minitabla
node[anchor=north west] at (1cm,.25cm) {parbox[t][8cm][t]{6.5cm}{hugebfseriesflushleft printcontents{l}{1}{setcounter{tocdepth}{2}}}};
draw[anchor=west] (5cm,-9cm) node [rounded corners=25pt,fill=white,fill opacity=.6,text opacity=1,draw=colordominante,draw opacity=1,line width=2pt,inner sep=15pt]{hugesffamilybfseriestextcolor{black}{thechapter --- #1vphantom{plPQq}makebox[22cm]{}}};
end{tikzpicture}};
end{tikzpicture}}parvspace*{230p@}
In the main document, you would call the name of a figure just before the chapter command:
chapterimage{imagen4.png}
chapter{Estadística y probabilidad}
Whose generated image is
The question is whether it is possible to modify the previous code where a .tex file that directly draws the image is inserted, something like chapterimage{input{pascal.tex}}
this because if only one image is included it loses quality.
macros sectioning chapters tikz-external
add a comment |
up vote
1
down vote
favorite
I am working on a book which each chapter has an image .jpg or .png. The code that accomplishes this is:
newcommand{thechapterimage}{}
newcommand{chapterimage}[1]{renewcommand{thechapterimage}{#1}}
defthechapter{arabic{chapter}}
def@makechapterhead#1{
thispagestyle{empty}
{centering normalfontsffamily
ifnum c@secnumdepth >m@ne
if@mainmatter
startcontents
begin{tikzpicture}[remember picture,overlay]
node at (current page.north west)
{begin{tikzpicture}[remember picture,overlay]
node[anchor=north west,inner sep=0pt] at (0,0) {includegraphics[width=paperwidth]{thechapterimage}};
%Comentando las 3 líneas de abajo quita la caja de contenidos en el título del capítulo
draw[rounded corners=10pt, fill=white,opacity=0.5] (1cm,0cm) rectangle (8cm,-9.3cm); %%%%%%%%%%%%%%%%%%% minitabla
node[anchor=north west] at (1cm,.25cm) {parbox[t][8cm][t]{6.5cm}{hugebfseriesflushleft printcontents{l}{1}{setcounter{tocdepth}{2}}}};
draw[anchor=west] (5cm,-9cm) node [rounded corners=25pt,fill=white,fill opacity=.6,text opacity=1,draw=colordominante,draw opacity=1,line width=2pt,inner sep=15pt]{hugesffamilybfseriestextcolor{black}{thechapter --- #1vphantom{plPQq}makebox[22cm]{}}};
end{tikzpicture}};
end{tikzpicture}}parvspace*{230p@}
In the main document, you would call the name of a figure just before the chapter command:
chapterimage{imagen4.png}
chapter{Estadística y probabilidad}
Whose generated image is
The question is whether it is possible to modify the previous code where a .tex file that directly draws the image is inserted, something like chapterimage{input{pascal.tex}}
this because if only one image is included it loses quality.
macros sectioning chapters tikz-external
Please provide us with a full compilable code. Note that you are nestingtikzpicture
s (by putting atikzpicture
into the node of anothertikzpicture
), which should be avoided. Also I am wondering why this is taggedtikz-external
(rather than justtikz-pgf
).
– marmot
5 hours ago
Sorry, many users here, including myself, do not follow external links. Please just edit your code such that it starts withdocumentclass
, ends withend{document}
, can be compiled and illustrates what you want. And if you want make your question read by TikZ users, avoid nestingtikzpicture
s as this has consequences that are hard to control.
– marmot
5 hours ago
I understand, thank you.
– Samuel Diaz
5 hours ago
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I am working on a book which each chapter has an image .jpg or .png. The code that accomplishes this is:
newcommand{thechapterimage}{}
newcommand{chapterimage}[1]{renewcommand{thechapterimage}{#1}}
defthechapter{arabic{chapter}}
def@makechapterhead#1{
thispagestyle{empty}
{centering normalfontsffamily
ifnum c@secnumdepth >m@ne
if@mainmatter
startcontents
begin{tikzpicture}[remember picture,overlay]
node at (current page.north west)
{begin{tikzpicture}[remember picture,overlay]
node[anchor=north west,inner sep=0pt] at (0,0) {includegraphics[width=paperwidth]{thechapterimage}};
%Comentando las 3 líneas de abajo quita la caja de contenidos en el título del capítulo
draw[rounded corners=10pt, fill=white,opacity=0.5] (1cm,0cm) rectangle (8cm,-9.3cm); %%%%%%%%%%%%%%%%%%% minitabla
node[anchor=north west] at (1cm,.25cm) {parbox[t][8cm][t]{6.5cm}{hugebfseriesflushleft printcontents{l}{1}{setcounter{tocdepth}{2}}}};
draw[anchor=west] (5cm,-9cm) node [rounded corners=25pt,fill=white,fill opacity=.6,text opacity=1,draw=colordominante,draw opacity=1,line width=2pt,inner sep=15pt]{hugesffamilybfseriestextcolor{black}{thechapter --- #1vphantom{plPQq}makebox[22cm]{}}};
end{tikzpicture}};
end{tikzpicture}}parvspace*{230p@}
In the main document, you would call the name of a figure just before the chapter command:
chapterimage{imagen4.png}
chapter{Estadística y probabilidad}
Whose generated image is
The question is whether it is possible to modify the previous code where a .tex file that directly draws the image is inserted, something like chapterimage{input{pascal.tex}}
this because if only one image is included it loses quality.
macros sectioning chapters tikz-external
I am working on a book which each chapter has an image .jpg or .png. The code that accomplishes this is:
newcommand{thechapterimage}{}
newcommand{chapterimage}[1]{renewcommand{thechapterimage}{#1}}
defthechapter{arabic{chapter}}
def@makechapterhead#1{
thispagestyle{empty}
{centering normalfontsffamily
ifnum c@secnumdepth >m@ne
if@mainmatter
startcontents
begin{tikzpicture}[remember picture,overlay]
node at (current page.north west)
{begin{tikzpicture}[remember picture,overlay]
node[anchor=north west,inner sep=0pt] at (0,0) {includegraphics[width=paperwidth]{thechapterimage}};
%Comentando las 3 líneas de abajo quita la caja de contenidos en el título del capítulo
draw[rounded corners=10pt, fill=white,opacity=0.5] (1cm,0cm) rectangle (8cm,-9.3cm); %%%%%%%%%%%%%%%%%%% minitabla
node[anchor=north west] at (1cm,.25cm) {parbox[t][8cm][t]{6.5cm}{hugebfseriesflushleft printcontents{l}{1}{setcounter{tocdepth}{2}}}};
draw[anchor=west] (5cm,-9cm) node [rounded corners=25pt,fill=white,fill opacity=.6,text opacity=1,draw=colordominante,draw opacity=1,line width=2pt,inner sep=15pt]{hugesffamilybfseriestextcolor{black}{thechapter --- #1vphantom{plPQq}makebox[22cm]{}}};
end{tikzpicture}};
end{tikzpicture}}parvspace*{230p@}
In the main document, you would call the name of a figure just before the chapter command:
chapterimage{imagen4.png}
chapter{Estadística y probabilidad}
Whose generated image is
The question is whether it is possible to modify the previous code where a .tex file that directly draws the image is inserted, something like chapterimage{input{pascal.tex}}
this because if only one image is included it loses quality.
macros sectioning chapters tikz-external
macros sectioning chapters tikz-external
edited 5 hours ago
asked 6 hours ago
Samuel Diaz
27418
27418
Please provide us with a full compilable code. Note that you are nestingtikzpicture
s (by putting atikzpicture
into the node of anothertikzpicture
), which should be avoided. Also I am wondering why this is taggedtikz-external
(rather than justtikz-pgf
).
– marmot
5 hours ago
Sorry, many users here, including myself, do not follow external links. Please just edit your code such that it starts withdocumentclass
, ends withend{document}
, can be compiled and illustrates what you want. And if you want make your question read by TikZ users, avoid nestingtikzpicture
s as this has consequences that are hard to control.
– marmot
5 hours ago
I understand, thank you.
– Samuel Diaz
5 hours ago
add a comment |
Please provide us with a full compilable code. Note that you are nestingtikzpicture
s (by putting atikzpicture
into the node of anothertikzpicture
), which should be avoided. Also I am wondering why this is taggedtikz-external
(rather than justtikz-pgf
).
– marmot
5 hours ago
Sorry, many users here, including myself, do not follow external links. Please just edit your code such that it starts withdocumentclass
, ends withend{document}
, can be compiled and illustrates what you want. And if you want make your question read by TikZ users, avoid nestingtikzpicture
s as this has consequences that are hard to control.
– marmot
5 hours ago
I understand, thank you.
– Samuel Diaz
5 hours ago
Please provide us with a full compilable code. Note that you are nesting
tikzpicture
s (by putting a tikzpicture
into the node of another tikzpicture
), which should be avoided. Also I am wondering why this is tagged tikz-external
(rather than just tikz-pgf
).– marmot
5 hours ago
Please provide us with a full compilable code. Note that you are nesting
tikzpicture
s (by putting a tikzpicture
into the node of another tikzpicture
), which should be avoided. Also I am wondering why this is tagged tikz-external
(rather than just tikz-pgf
).– marmot
5 hours ago
Sorry, many users here, including myself, do not follow external links. Please just edit your code such that it starts with
documentclass
, ends with end{document}
, can be compiled and illustrates what you want. And if you want make your question read by TikZ users, avoid nesting tikzpicture
s as this has consequences that are hard to control.– marmot
5 hours ago
Sorry, many users here, including myself, do not follow external links. Please just edit your code such that it starts with
documentclass
, ends with end{document}
, can be compiled and illustrates what you want. And if you want make your question read by TikZ users, avoid nesting tikzpicture
s as this has consequences that are hard to control.– marmot
5 hours ago
I understand, thank you.
– Samuel Diaz
5 hours ago
I understand, thank you.
– Samuel Diaz
5 hours ago
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f463061%2finclude-tikz-image-in-other-text-files-of-each-chapter%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Please provide us with a full compilable code. Note that you are nesting
tikzpicture
s (by putting atikzpicture
into the node of anothertikzpicture
), which should be avoided. Also I am wondering why this is taggedtikz-external
(rather than justtikz-pgf
).– marmot
5 hours ago
Sorry, many users here, including myself, do not follow external links. Please just edit your code such that it starts with
documentclass
, ends withend{document}
, can be compiled and illustrates what you want. And if you want make your question read by TikZ users, avoid nestingtikzpicture
s as this has consequences that are hard to control.– marmot
5 hours ago
I understand, thank you.
– Samuel Diaz
5 hours ago