Skip to content

Commit

Permalink
Stop using the interface package in infoBulle
Browse files Browse the repository at this point in the history
  • Loading branch information
HarveySheppard committed Nov 5, 2020
1 parent 2c40030 commit 9db6182
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
Binary file modified examples/infoBulle/infoBulleShowcase.pdf
Binary file not shown.
18 changes: 7 additions & 11 deletions yPackages/infoBulle/infoBulle.sty
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,9 @@
\RequirePackage{listings}
\RequirePackage{xparse}
\RequirePackage{ragged2e}
\RequirePackage{pgfkeys}
\RequirePackage{tikz}
\usetikzlibrary{calc}
\RequirePackage{interfaces-base}
\LoadInterface{pgfkeys}

\RequirePackage{yMainColor}

Expand All @@ -63,8 +62,7 @@
\newif\ifinfoBulleMath
\pgfkeys{
/infoBulle/.cd,
mathInfoBulle/.true = {\infoBulleMathtrue},
mathInfoBulle/.false = {\infoBulleMathfalse},
mathInfoBulle/.is if=infoBulleMath,
mathInfoBulle = true,
}

Expand All @@ -81,17 +79,15 @@
\newif\ifinfoBulleMarginIcons
\pgfkeys{
/infoBulle/.cd,
marginIcons/.true = {\infoBulleMarginIconstrue},
marginIcons/.false = {\infoBulleMarginIconsfalse},
marginIcons/.is if=infoBulleMarginIcons,
marginIcons = false,
}

% Icon Radius
%-------------------------------------------------------------------------------
\pgfkeys{
/infoBulle/icon/.cd,
radius/.store as dimen,
radius = 3.5mm,
radius/.initial=3.5mm,
}

% Icon Shape
Expand Down Expand Up @@ -196,7 +192,7 @@
\else
\@afterindentfalse\@afterheading%
\mbox{}%
\parbox[t][2\pgfkeysvalueof{/infoBulle/icon/radius}]{.75cm}{%
\parbox[t]{.75cm}{%
\@afterindentfalse\@afterheading%
\mbox{}%
#2%
Expand Down Expand Up @@ -229,8 +225,8 @@
\setlength{\parindent}{\tempparindent}%
\setlength{\parskip}{\tempparskip}%
\pgfkeys{/infoBulle/text alignment}%
}{%
\end{infoBulle}%
}{%
\end{infoBulle}%
}
\DeclareDocumentCommand{\@infoBulleSkeleton}{m m m +m}{
\begin{@infoBulleSkeletonEnv}{#1}{#2}{#3}
Expand Down

7 comments on commit 9db6182

@rbsingh13
Copy link

@rbsingh13 rbsingh13 commented on 9db6182 Nov 6, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello Harvey,

Should there also be a modification to your "Icon Shape" block??:

% Icon Shape
%-------------------------------------------------------------------------------
\pgfkeys{
	shape/.is choice,
	shape/round/.style = {radius = 3.5mm, /infoBulle/icon/shapeCommand/.code n args = {3}{\fill[##3] (##1) circle (##2);}},
	shape/hexagon/.style = {radius = 4mm, /infoBulle/icon/shapeCommand/.code n args = {3}{\infoBulle@hexagon{##1}{##2}[##3, rotate=90];}},
    shape/round,
}

@HarveySheppard
Copy link
Owner Author

@HarveySheppard HarveySheppard commented on 9db6182 Nov 8, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The is choice handler is defined by pgfkeys (see page 990 of the pgf/tikz documentation) and the rest of the syntax seems to match what they have in the documentation (doc).

Could you specify why you mean that there are some changes that should be applied to this block?

@rbsingh13
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello Harvey,

If I run your code as you have modified it, I get the error:

! Package pgfkeys Error: I do not know the key '/infoBulle/icon/radius', to whi ch you passed '3.5mm', and I am going to ignore it. Perhaps you misspelled it.

I have to modify infoBulle as that above to compile correctly.

I am using Windows 10, with WinEdt 10 and XeLaTeX.

Thanks.

@HarveySheppard
Copy link
Owner Author

@HarveySheppard HarveySheppard commented on 9db6182 Nov 9, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very weird, I just compiled the infoBulle example again by setting to option to have hexagonal icons and it worked fine. Are you sure you didn't modify something else in the file? If you have the same file as the one on this repo, then there might be a compatibility issue between your TeX distribution and mine (TeX live on Linux) but that seems rather unlikely to me...

On my computer, the following code:

\documentclass{article}

\usepackage{lipsum}

\usepackage{infoBulle}

\infoBulleConfiguration{icon/shape = hexagon}

\begin{document}
	
	\infoInfo{This is the title}{\lipsum[2]}
	
\end{document}

Produced a valid PDF without error with an infoBulle with hexagonal icon. Does the code above work on your machine?

@rbsingh13
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello Harvey, I copied your modified infoBulle.sty file and re-ran my document and it works great....Again! My initial attempt involved me manually modifying the existing infoBulle.sty file that I had, which, upon re-inspection, brought to light the errors I made.

I sincerely apologize for causing you extra work.

Thanks for your support in bringing your templates back up to a usable form.

@HarveySheppard
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem at all! I'm happy that your problem is solved

@rbsingh13
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

THANK YOU for sharing your phenomenal work of art! It is truly a masterpiece!

Please sign in to comment.