Search found 6 matches

by stridder
Mon Apr 04, 2016 11:39 pm
Forum: General
Topic: Difference between NewDocumentCommand and cs_new
Replies: 1
Views: 2661

Difference between NewDocumentCommand and cs_new

Hello,

What the difference between NewDocumentCommand (and relatives) and \cs_new:Npn (and relatives)?

As fas as I understood both macros are introduced in LaTeX3 and both for the purpose of creating new macros. I am not talking about different syntax.
Do they have different use cases?

Maybe \cs ...
by stridder
Mon Apr 04, 2016 11:28 pm
Forum: General
Topic: \ref with macro as parameter
Replies: 1
Views: 2360

\ref with macro as parameter

Hello,
I would like to write a macro (using Latex3/expl3) that can automatically refer to say plot using several key-value parameters. Here is what I currently have:


\keys_define:nn{label}{
Re .tl_set:N = \l_label_Re_tl,
DOF .tl_set:N = \l_label_DOF_tl,
statsName .tl_set:N = \l_label ...
by stridder
Mon Mar 21, 2016 6:45 pm
Forum: Graphics, Figures & Tables
Topic: Generate figure label with macro
Replies: 3
Views: 4658

Generate figure label with macro

Little word of warning: around page 66 of your document you will find the third exception of your macro, around page 82 you will be crying asking yourself why you generated that macro in the first place.

Can you give a particular example of what you mean?
Are you saying that macro will not ...
by stridder
Sun Mar 20, 2016 7:02 pm
Forum: Graphics, Figures & Tables
Topic: Generate figure label with macro
Replies: 3
Views: 4658

Generate figure label with macro

Hello,
I am trying to generate figure labels with macro like this:

\newcommand{\getLabel}[3]{
\newcommand{\Stat}{\StrLeft{#1}{3}}
fig:{\Stat}Re#2DOF#3 %1st 3 letters of #2
}


where \StrLeft comes from xstring package. I use above macro inside figure environment like this:

\label{\getLabel ...
by stridder
Sun Mar 13, 2016 7:48 pm
Forum: Graphics, Figures & Tables
Topic: width=\textwidth do not scale PNG image correctly
Replies: 3
Views: 8181

width=\textwidth do not scale PNG image correctly

Johannes_B wrote:Welcome, you could upload the picture file so we can investigate directly with the file.
Thanks. have attached the image.
by stridder
Sun Mar 13, 2016 10:16 am
Forum: Graphics, Figures & Tables
Topic: width=\textwidth do not scale PNG image correctly
Replies: 3
Views: 8181

width=\textwidth do not scale PNG image correctly

Hello,

I am including PNG plots that are obtained from MATLAB figures with 600dpi resolution.
I use
\includegraphics[width=\textwidth]{image}
command inside a figure.
The page where the image should be shows only figure caption, which is I believe due to image not being scaled and therefore too ...