Reputation
3,098
Top tag
Next privilege 5,000 Rep.
Approve tag wiki edits
Badges
15 44
Impact
~580k people reached

Apr
20
comment TikZ: text along path as node
@PeterGrill I am just going to add that I use pos=.5 instead of midway for more precise alignment by percentage, because I often refer to this page and forget how to do that.
Apr
20
comment how to draw parallelepiped and cube with latex?
I used \node [draw,minimum width=\cubescale*\cubex,minimum height=\cubescale*\cubey] (\cubelabel) at ($ (a)!.5!(c) $) {\cubetextlabel}; for the front face, but the scale of the node is not the same as the front face. I am not sure why :(
Apr
20
comment how to draw parallelepiped and cube with latex?
Nevermind, I found my answer here: tex.stackexchange.com/questions/241719/… I added label/.store in=\cubelabel, So my next thing is centering a node in the shape. Your "center" is the front top right corner. Is there are way to put a node at the center of the shape \node (\cubelabel) at (whatever) {displayedtext}? I am not sure what to put in "whatever". Maybe you can help me out here. Something like at (o -| a)
Apr
20
comment how to draw parallelepiped and cube with latex?
Awesome! Can you position a \pic relatively? e.g. \pic [] (pic-2) at ($ (pic-1) + (5mm,0mm) $)
Apr
20
comment Is there a way to set colors of hyperref links and urls differently in headings / sections than in the body?
My comment is not within the context of my question, rather your answer and some comments to hooy's answer. Sorry for the confusion.
Apr
20
comment Is there a way to set colors of hyperref links and urls differently in headings / sections than in the body?
Thanks for the alternative way of defining colors! It is nice to remember \colorlet. Personally, I will stick with the macro way, because then I can associate colors with semantically relevant macro names like \seccolor, \subseccolor, \appname, \helpnotice etc.) and later have a quick way to change ALL of the members of a group (macro name).
Apr
19
comment Is there a way to set colors of hyperref links and urls differently in headings / sections than in the body?
@hooy This discussion is diverging from the question/solution into design schemes, but I can tell you that harmonious colors are often very attractive and help the eye to distinguish various sectioning levels (hence why inheritance within titlesec heading definitions would be nice). Note that we are talking about shades here, but nevertheless, they are different. Examples I that provide use striking, non-harmonious colors to ensure that the differences between them are obvious.
Apr
19
comment Is there a way to set colors of hyperref links and urls differently in headings / sections than in the body?
@hooy It should be noted that hidelinks affects all types of links not just linkcolor (url color, link color, etc.). This makes the color macro idea still viable. Good tip though!
Apr
19
comment Is there a way to set colors of hyperref links and urls differently in headings / sections than in the body?
@hooy No, you answered the question fine. You did not meet all parameters of the question (inheritance of color in surrounding scope), and I thought it would be useful to future readers to mention that and provide a solution (because I know how I would deal with that).
Apr
19
comment Is there a way to set colors of hyperref links and urls differently in headings / sections than in the body?
@HenriMenke I forgot the specific reason why, but \raggedright does not always work. I think it had something to do with the scope of \raggedright not affecting tikz's scope within my section definition (not in my minimal example). \hyphenchar\font=-1 has a much broader scope, which is why I needed to redefine it to \hyphenchar\font=1 just before finishing the heading code. This way it is not harmful to the rest of the body. A couple underfull/overfull boxes never hurt anybody :-p They actually look good in my setup (I have some fancy TikZ action going on with much whitespace)
Apr
19
comment Is there a way to set colors of hyperref links and urls differently in headings / sections than in the body?
@hooy Thanks! Note that your answer's hypersetup does not inherit section's color. It may be good design to create a macro containing the color for this purpose, unless there is a better way.
Apr
19
comment How can I keep everything within a variable/macro on the same line?
@hooy Please provide an answer and let's get this thing wrapped up then :)
Apr
19
comment How can I keep everything within a variable/macro on the same line?
@hooy Is \mbox{} not linebreakable? That would be easy.
Apr
18
comment How can I refer to user-defined keys within glossary style definitions?
@NicolaTalbot Yep, this was basically the problem. Actually, it caused by having the key only appear in subglosses. Because my injection was in \glossentry, it never appeared. However, once I added the injection to \subglossentry, it worked. This question should probably get closed up. Do you want to leave an answer or should I?
Apr
16
comment How can I refer to user-defined keys within glossary style definitions?
@NicolaTalbot It seems my code is working except for that mistake you pointed out. What idiot wrote that example code? I can't wait to try check my code on the real document. If this was my mistake I am going to kill myself (not literally).
Apr
16
comment How can I refer to user-defined keys within glossary style definitions?
@NicolaTalbot wait wait wait that can't be the problem....it can't be.....oh i hope not
Apr
15
comment How to define labels within a tcolorbox?
@GonzaloMedina This does not allow you to use \nameref with the correct name-the value of the title key, however. Is this correct? It did not work with my test. Maybe I am missing something.
Apr
14
comment How can I refer to user-defined keys within glossary style definitions?
@NicolaTalbot Thanks. Corrected. Also, another thanks for the tip to detect missing keys. That is potentially useful for me later.
Apr
12
comment hyperref and underscores
of course the two args must be the same if you expect the link to find the target. i will open a question with details. "just labels" is the best haha. they make or break the association between ref and target and should be unique. Better is to say arg2 is "just a caption". That has no special uniqueness criterion.
Apr
12
comment hyperref and underscores
@egreg My issue is with expansion of tokens in arg1. If you have arg1 in both \hypertarget and \hyperlink set to foo\_, then I would expect the link to work. hyperref should interpret the target as 5 chars AND the link as 5 chars. What I see happening is the total chars for target=5 and total chars for link=4 (because \_ in link gets interpreted as one char, but as two chars in the target).