Tag Info

Hot answers tagged

10

Here is one way to do this. The interesting part is the use of pic to draw your little squares by defining a new "picture" called mysquare. These squares take two arguments: the colour and the label. The arguments MUST be given as {#1, #2} or tikz will complain with cryptic error messages. In particular, note that there needs to be a space after the comma! ...


9

Here's a modified version of piano.sty that adds also the function you ask for. Also the syntax is changed, but I believe it's better than adding a bunch of optional arguments. xpiano.sty \ProvidesPackage{xpiano}[2015/05/21 from piano.sty by Émile Daneault] \RequirePackage{xcolor} \usepackage{xparse} \definecolor{pianodefault}{RGB}{255,127,0} ...


8

Package adjustbox Your preamble already contains package adjustbox. It provides the features you need for trimming and clipping I am not sure, which spacing is needed around the image. The following example lets the image behave as it would have the height of the upper case letter H and the depth of g. \documentclass[12pt,a4paper]{article} ...


7

Here is a suggestion using scrlayer to define a new pagestyle. \documentclass[12pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[english]{babel} \usepackage{tikz}% loads also graphicx, xcolor \usepackage{lmodern} \usepackage[top=1.25in, bottom=1.25in, left=1.25in, right=1.25in]{geometry} ...


6

My first choice would be pgfplots and tikz. It lets you draw right in Latex. You can try something like this: \documentclass[a4paper]{article} \usepackage{pgfplots} \usepackage{tikz} \tikzset{>=stealth} % arrowheads \begin{document} \begin{tikzpicture} \draw [->] (12,4)node[above]{24} -- (8,0)node[below]{42}; \draw [->] ...


6

I also suggest Tikz, but more specifically the Tikz trees. Probably you could automatise this but I can't think of a way so the solution is manual. I was going to provide a small sample for you to complete, but I had already finished it on my own, so here it is. Basically the level distance is 2cm but the middle child is shifted down of 1cm so it's midway ...


6

You can try using pgfplots and tikz. It's quite easy. The figure might look something like this. \documentclass{article} \usepackage[english]{babel} \usepackage{amsmath} \usepackage{pgfplots} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw [<->] (0,4) node[left]{$ \text{Im} (z) $} -- (0,0) -- (4,0) node[below]{$ \text{Re} (z) $}; \draw ...


6

Converting .jpg photographs to .png isn't a great idea in general. LaTex will be showing the file as it is and I think ignores the orientation tag. When you view the file elsewhere it may be rotated (or might not) depending on how the viewer uses the tag, and it can all get very confusing. I suggest removing the orientation tag altogether. This is best ...


5

Here's a slightly different approach using TikZ that uses the vector arithmetic of the calc library to place some of the arrows. \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{calc} \usetikzlibrary{arrows.meta} \begin{document} \begin{tikzpicture}[>=Stealth] \coordinate (Q) at (0,0); \coordinate (RE) at (4,0); \coordinate (IM) at ...


5

Since you deal with vectors I suggest to use polar coordinate system instead Cartesian: \documentclass[tikz,border=3mm]{standalone} \usetikzlibrary{arrows.meta} \usepackage{amsmath} \begin{document} \begin{tikzpicture}[>={Straight Barb[]}] \draw[very thin,<->] (0,4) node[below left] {$\Im(z)$} -- (0,0) -- ...


5

With \pstricks (can be compiled under conditions with pdflatex): \documentclass[pdf]{standalone} \usepackage{pstricks-add} \usepackage{amsmath} \DeclareMathOperator\re{Re} \DeclareMathOperator\im{Im} \begin{document} $ begin{pspicture} \psset{ticks=none, labels=none, arrowinset=0.2,arrows =c->, labelsep=3pt} \psaxes{c->}(0,0)(5,5)[$\re ...


5

Here's a solution in asymptote using recursion. Just change the first five lines of the code to modify the output. Make sure the number of initial values is a power of 2 or it will probably throw an error. unitsize(1inch); real xspacing = 0.5; real yspacing = 0.5; pair[] values = { (1,1), (7,9), (2,8), (8,6) }; string[] labels = { "$y_i$", "$d_2$", ...


4

Starting with Ben's tikzpicture module, and turning it into a macro \blivet[supress top #]{top-left #}{top-right #}{width} has allowed me a start on it. More automation remains to be done. The height of the blivets are defined with \def\blivetheight{3}. \documentclass[a4paper]{article} \usepackage{pgfplots,stackengine} ...


4

I don't know circuittex, but here is a solution utilizing the tikz library circuits. \documentclass{article} \usepackage{tikz} \usetikzlibrary{circuits.ee.IEC} \begin{document} \begin{tikzpicture}[circuit ee IEC] \path node [contact] (A) {} ++(right:2) node [contact] (B) {} ++(right:2) node [contact] (D) {} ...


3

Your image makes it look smaller than I expect. and smaller than I get with pdflatex, but you have the arguments the wrong way round, they are read left to right so you need \documentclass{memoir} \usepackage{graphicx} \begin{document} \begin{figure} \centering \includegraphics[width=\textheight,height=\textwidth,keepaspectratio,angle=90]{bhuta1.JPG} ...


3

Filenames with spaces and percent :( You could \@percentchar instead of % if @ is a letter at that point, or locally put \catcode`\%=12 before the \includegraphics, to make % a normal character. You need " .. " around the filename as well because of the spaces.


3

Forcing a float in-place can be obtained using float's [H] float specification (see How to influence the position of float environments like figure and table?). In order to replicate the style of the given table, I'd suggest using a combination of array (for column definition/alignment), tabularx (for ease of specifying a stretchable column) and booktabs ...


2

Best here would be to define group-specific key-value options. This would allow you to set a single option associated with the group, while LaTeX manages the back-end setting for the option. As an example of this, add the following to your Document > Settings... > LaTeX Preamble: \usepackage{xkeyval} \define@boolkey{Gin}{groupAoptions}[true]{% ...


2

Here is a circuitikz solution. You may like the circuitikz input format but not like the shapes/sizes of the components; in that case, there are many options described in the package manual and in the code if you wish to explore and do some tweaking for your own circuit diagrams. \documentclass{standalone} \usepackage[ europeanresistors, ...


1

You could try with \usepackage{grffile} \begingroup\catcode`\%=12 \def\x{\def\strangepath{Q:/2014 - 2015/Change (%)}} \expandafter\endgroup\x in your document preamble and \includegraphics{\strangepath/Graphic Name.png} in the document.


1

Define this command with the ulem package: \newcommand{\waveout}[1]{\raisebox{4pt}{\uwave{\phantom{#1}}}\llap{#1}} and use it as \waveout{word} \documentclass{article} \usepackage{pict2e} \usepackage[normalem]{ulem} \pagestyle{empty} \makeatletter \newcommand{\crossout}[1]{% \begingroup \settowidth{\dimen@}{#1}% \setlength{\unitlength}{0.05\dimen@}% ...


1

REVISED ANSWER based on OP reply to "original answer". This produces squiggly x-shaped crossout through individual words. Rather than perform the trigonometry to calculate the squiggle angle, I set up a series of dimensional comparisons. More can be added if needed. \documentclass{article} \usepackage{stackengine,graphicx,xcolor,ulem} \def\crossout#1{% ...


1

Do you want something like this? \documentclass[12, twoside]{report} \usepackage{graphicx} \usepackage[a4paper,margin=1in]{geometry} \usepackage{lscape} \usepackage{rotating} \usepackage{pdflscape} \begin{document} \begin{landscape} \begin{figure}[htbp] \centering \fbox{\includegraphics[width=\linewidth, height=\textheight,keepaspectratio]{results.png}} ...


1

Here's how to position figures across the columns of multicol: \documentclass{article} \usepackage{multicol} \usepackage{lipsum} \usepackage{mwe} \begin{document} \begin{multicols}{2} \begin{figure*}[ht!] \includegraphics[width=.3\textwidth]{example-image-a}\hfill ...


1

You can include the image in the background, setting it in a tikzpicture that takes up no vertical space and where we can move objects as we please. The important thing is to draw the background picture before any other thing is printed. I assume that the three images have the same height. In the third \subfloat, I just place a couple of invisible rules to ...



Only top voted, non community-wiki answers of a minimum length are eligible