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



enter image description here



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.










share|improve this question
























  • Please provide us with a full compilable code. Note that you are nesting tikzpictures (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 tikzpictures as this has consequences that are hard to control.
    – marmot
    5 hours ago










  • I understand, thank you.
    – Samuel Diaz
    5 hours ago















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



enter image description here



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.










share|improve this question
























  • Please provide us with a full compilable code. Note that you are nesting tikzpictures (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 tikzpictures as this has consequences that are hard to control.
    – marmot
    5 hours ago










  • I understand, thank you.
    – Samuel Diaz
    5 hours ago













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



enter image description here



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.










share|improve this question















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



enter image description here



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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 5 hours ago

























asked 6 hours ago









Samuel Diaz

27418




27418












  • Please provide us with a full compilable code. Note that you are nesting tikzpictures (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 tikzpictures 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 tikzpictures (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 tikzpictures 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 tikzpictures (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 tikzpictures (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 tikzpictures 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 tikzpictures 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















active

oldest

votes











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















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






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks

Calculate evaluation metrics using cross_val_predict sklearn

Insert data from modal to MySQL (multiple modal on website)