Questions tagged [comparison]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
2 answers
82 views

Why does Linux Libertine in Latex look different than a local copy of the font?

Consider this short latex document: \documentclass[12pt, a4paper]{article} \usepackage{libertine} \usepackage[margin=20pt]{geometry} \begin{document} \makeatletter \noindent \normalsize The quick ...
Victor Nordam Suadicani's user avatar
3 votes
0 answers
94 views

What is better? KOMA script or memoir in 2023? [closed]

To make a professional book layout, many people suggest to use either KOMA-Script or memoir. It has been 13 years since the last question comparing them. What is better? KOMA or memoir. Has KOMA ...
Adrik Ivanov's user avatar
1 vote
1 answer
2k views

TeXLive vs. MikTeX - an updated comparison [duplicate]

What are the current differences between MikTeX and TeXLive? This question has many answers, but most of them are quite old, and it isn't clear what is still relevant, especially since MikTeX has ...
Ur Ya'ar's user avatar
  • 306
4 votes
1 answer
97 views

Expl3 equivalent to greater than

What is the expl3 equivalent of the operation > (and also <). What I want is something similar to: \ifnum\foo>\@ne <true code> \else <false code> \fi I know the expl3 for =: \...
Vebjorn's user avatar
  • 1,758
2 votes
2 answers
63 views

How to compare an argument to a given string, within a 'newenvironment' definition?

Problem description I am trying to create an environment that produces boxed paragraphs with different styles. So I tried to implement some "if"-"elif"-"else" blocks, ...
Mycroft_47's user avatar
0 votes
1 answer
29 views

How to achieve this 'regional two-column' effect (specific case)?

I'm making a comparison in my essay and met a difficulty which I have trouble in typesetting. The deisred effect is like below (the red lines are auxilary and are not displayed in the final result). I'...
erpxyr2001's user avatar
3 votes
2 answers
151 views

Automatically highlighting name in bibliography doesn't work with middle initial

I've been trying to figure out a way to automatically highlight my name in the bibliography. I thought that I could just compare first name and \namepartgiven and last name with \namepartfamily, but ...
George Wei's user avatar
0 votes
2 answers
339 views

How to get the maximum/minimum of two or more values for variable assignment

I want to assign a variable dynamically, based on the maximum of two values. I have seen a max function used here: https://tex.stackexchange.com/a/505352/194783. I cannot see how it is used, though. ...
clel's user avatar
  • 185
1 vote
0 answers
200 views

String equality check [closed]

I want to compare 2 strings and perform different tasks based on their results(using if-else loop) My code is here: \tab• \hyperlink{new}{New Features, Enhancements, and Changes}\linebreak \begin{...
Shanthi's user avatar
  • 23
3 votes
1 answer
164 views

Check if at least one substring in a list can be found in a string

There are several solutions both integrated in TeX and proposed on this side for checking if a substring can be found in a given string (such as IfSubStr, IfStringInList and others). As for example, \...
arc_lupus's user avatar
  • 1,751
3 votes
1 answer
40 views

Detection if image path contains string fails

For a project I would like to check if my included image is located in the sub-folder graphs or not. To check that I wrote a small MWE: \documentclass[% reprint, amsfonts, floatfix, amsmath,amssymb, ...
arc_lupus's user avatar
  • 1,751
0 votes
1 answer
839 views

Change not equal sign shape Overleaf [closed]

I'm using Overleaf. I want to use ≠ the way it is. A / passign in the middle of =. I checked various links same as their documentation in my document, the / sign starts in the very beginning of = and ...
m0ss's user avatar
  • 103
1 vote
1 answer
34 views

File name string comparison

Need to show compilation error if "\filename{XYZ-2100011}" and "\include{XYZ-2100011}" input filename mismatch. For example, if \filename{ABC-2100012} and \include{XYZ-2100011} ...
Rajesh N's user avatar
  • 839
2 votes
1 answer
123 views

pdfstrcmp problem with newest miktex

I am in need of an string compare function which can be used in various ways. simple compare nested using multicolumn in it as the last line in a tabular, without creating a new line simple compare ...
Carsten's user avatar
  • 55
0 votes
1 answer
473 views

Literature comparison table in Miktex using TexStudio

How do I remove the horizontal 1st-row border, and secondly, how do I make the horizontal line borders bold? Also, any suggestion on moving the caption on the left and changing it in bold with some ...
FRQ's user avatar
  • 23
0 votes
2 answers
190 views

How do I compare a specific string to strings from a group using a loop?

I want to compare members of a group of strings to an specific string. Why is this not working ? \documentclass{beamer} \usepackage{tikz} \begin{document} \foreach \n in {x,Enu}{ \begin{frame} \...
Gian's user avatar
  • 1
2 votes
2 answers
218 views

TikZ: Dot-comparison table

perhaps I am using the wrong terms in my searchings. Can anybody give me a clue/link/idea how such a dot comparison matrix/grid would be possible? I am not very good in TikZ, so bear with me if my ...
byteSamurai's user avatar
0 votes
1 answer
278 views

Compiling speed and output: \includegraphics vs \includepdf - what are the differences?

I made a .tex file and compiled it via pdfLatex in two scenarios: 1. (1200 pages long) \includegraphics*[scale=1]{example.pdf} added some text here and there \newpage (repeating this with example2....
Bilal Yilmaz's user avatar
2 votes
1 answer
274 views

Am I using etoolbox correctly for string comparison?

I have a little environment to enumerate question statements. Sometimes, I want the label to not be a number but some string instead. In that case, I do not want the counter to be incremented. % ...
scribe's user avatar
  • 269
2 votes
0 answers
1k views

Which are the essential differences between LaTeX and ConTeXt? [duplicate]

I know that LaTeX and ConTeXt are extensions of TeX but each is based in a different philosophy. Beyond of its tex engines (ConTeXt works with LuaTeX for example) this question is focused to ...
skpblack's user avatar
  • 8,774
2 votes
2 answers
427 views

How to typeset a two column parallel poem?

I got this double column poem written by some friends that is meant to be typeset with the stanzas in parallel. Here is a sample: Tiempos en pausa. ...
wpkzz's user avatar
  • 153
1 vote
2 answers
85 views

how to do a horizontal line with "=" between it?

i can not find how to connect 2 variables with a horizontal line with a "=" inbetween.
wowowo's user avatar
  • 11
2 votes
1 answer
814 views

LaTeX Tikz: Compare two \def arguments

I am writing a macro definition that draws dimensions in the style of technical drawing. I need to perform an inequality of two of the arguments to know which is coordinate is higher up, but the ...
Erick Saldaña's user avatar
2 votes
1 answer
156 views

Why is comparison between number and numeric argument not working in \ifnum and \ifdim conditionals?

I was modifying \@ssect command to edit \section* appearance. First I passed a further argument to \@ssect \def\@ssect#1#2#3#4#5#6{%... then I edited the dependencies in \@startsection by modifying \...
GiuTeX's user avatar
  • 1,309
65 votes
4 answers
9k views

When is TeX better than LaTeX? [duplicate]

Is there any situation where it is preferable to use TeX (or perhaps plain TeX) rather than LaTeX to write a document?
oz1cz's user avatar
  • 1,556
4 votes
1 answer
503 views

Expandable case insensitive switch case for string comparison

I have spent the last few hours trying to come up with a good solution for my problem, but alas all solutions falls short. I want to create a switchcase for a function (In reality I need many ...
N3buchadnezzar's user avatar
6 votes
2 answers
627 views

Checking if an integer is a member of an integer list

Is there any way to check whether an integer is a member of a list of integer numbers and return a boolean? I found this neat solution, here that does a great job. It checks whether a string exists ...
afp_2008's user avatar
  • 5,330
39 votes
3 answers
6k views

Decide between Polyglossia and Babel for LuaLaTeX in 2019

Which are the key questions one has to ask to decide between Polyglossia and Babel for a LuaLaTeX project in 2019? There has been a similar, more general question in 2012, but the packages have ...
Jonas Stein's user avatar
  • 8,649
4 votes
2 answers
685 views

Looking for characters within a string

I'm looking for a solution that checks if "alien characters" are contained in a string. I found Check if a string contains a given character, which looks for one character only. However, I can't ...
StringChecker's user avatar
5 votes
1 answer
394 views

Comparison line chart

I want to produce a comparison graph chart like this: I have found information about bar graphs, but not about line comparison graphs as I am trying to do. Any help?. Thanks.
Alfredo's user avatar
  • 353
3 votes
2 answers
192 views

Add tocline depending on string compare

!! Attention !! Because this topic developed some amount of complexity, I tried to restructure the topic considering the newly gathered information. Please see this post to find the latest detail: ...
Michael Schmid's user avatar
1 vote
0 answers
32 views

Consecutive Comparisons

When I try to do compound comparisons the use of the braces don't seem to work correctly, as tried below? \documentclass [letterpaper, 12pt]{article} \usepackage{etoolbox} \begin {document} \def\...
Paul Hill's user avatar
4 votes
1 answer
202 views

comparing substrings

I would like to get the following code running, but the second test fails with ! Argument of \@secondoftwo has an extra }. What do I miss? \documentclass{article} \usepackage{xstring,ifthen} \...
Malte's user avatar
  • 41
2 votes
2 answers
181 views

How to compare first letter of a word with other char both defined in macros (case-insensitively)?

The following MWE shows that how I get the first letter of a word and compare it with other character both defined in macros. In my case I need to perform it case-insensitively so I used \uppercase ...
javadr's user avatar
  • 2,372
5 votes
3 answers
629 views

Why can't I compare a string read from a file with a predefined one?

I want to read a line of file and compare it to a predefined macro with the aid of \ifx. The following MWE shows my problem, I was expected to get Equal, but I get Not Equal. \documentclass{article} ...
javadr's user avatar
  • 2,372
17 votes
6 answers
951 views

check that two tex sources generate the same pdf

I have a problem which is in my opinion quite reasonable and common, still I cannot find an answer anywhere. I have two .tex files and I just want to check whether pdflatex will produce exactly the ...
Giulio's user avatar
  • 327
1 vote
0 answers
297 views

How to add a little space between comparators and a number using siunitx?

I'm using siunitx package for the numbers and units. When I use a comparator, like \sim, the symbol is placed without any space. I'd like to set siunitx to add a little space like in inline math mode, ...
Daniel Valencia C.'s user avatar
16 votes
2 answers
14k views

What is the difference between ~ (tilde) and \, (backslash comma) for a nonbreaking space? [duplicate]

Regarding tiny nonbreaking spaces, is there a difference between using a ~ (tilde) and using \, (backslash comma)? If so, what is the difference, in terms of length, properties, situations where you ...
Nicholas Wong's user avatar
0 votes
1 answer
101 views

Color in header based on section name

I'm trying to swich color in the header based on what will be typeset in the header (\rightmark or \lastrightmark), but I just can't get it work, the comparison fails everytime. I tried it first with \...
Daniel Bak's user avatar
52 votes
2 answers
14k views

minted vs. listings: pros and cons

While I'm switching from minted to listings, I would like to ask you for this comparison. The following is what it comes to my mind till now: minted needs Pygments to work, listings does not (this ...
CarLaTeX's user avatar
  • 61.1k
1 vote
0 answers
103 views

pgfkey as integer for ifnum

I'm sure this has something to do with expansion, and I am quite new to using the pgfkeys package so I'm possibly missing some sort of basic practice, but I cannot find anything that remotely looks ...
James's user avatar
  • 81
1 vote
1 answer
731 views

Compare two macros as strings in LaTeX (e-TeX)

How do I compare two macros that are one-expansion away from being strings? \def\A{ICT} \newgetenv[\ICT]{\A} % `\newgetenv` from https://tex.stackexchange.com/a/184924 Now I want to check if ...
A T's user avatar
  • 4,023
13 votes
0 answers
354 views

Environment for comparing algorithms [closed]

I am aware of different environments to type algorithms in pseudocode (see f.i. algorithm, algorithmic, algorithmicx, algorithm2e, algpseudocode = confused) Is there any environment that would ...
smihael's user avatar
  • 408
1 vote
1 answer
671 views

Correct way to compare macro definitions that contain protected macros, e.g., bibnamedelima

I'm trying to compare the content of \partnamefamily of an author's name in biblatex against a manual definition that is stored in another macro, lets call it \family, using \ifdefequal. So, I have ...
adn's user avatar
  • 11.1k
6 votes
2 answers
925 views

How can I check if the value of a variable is the same as what another variable?

My question is simple but I don't know any simple solution for it. I have an unknown variable namely \unknown and a variable which I want to compare \unknown with it, namely \test. I want a command ...
Omid Ghayour's user avatar
3 votes
1 answer
98 views

Class: Definition of an empty variable: etoolbox: problems of comparison

I'm writing my first class and I'm a bit in trouble with a behaviour of etoolbox macros that I don't understand at all. I tried to read response on the forum but I didn't get a clue. I would like to, ...
Forhan Gérald's user avatar
4 votes
2 answers
93 views

Detect first character in list with macros

I have a comma separated list that I process with \foreach. This has been working for quite some time. Decided to make a minor tweak and that is to allow for an optional leading * in which case I want ...
Peter Grill's user avatar
2 votes
2 answers
449 views

Conditional test inside command parameter

I want to call \includegraphics with parameter width= #1\textwidth if the number i have provided thru \mycmd is >= 1 and scale= #1 otherwise. I already saw this: Can I conditionally scale an image ...
Cfun's user avatar
  • 1,800
4 votes
0 answers
3k views

MikTeX - 64bit vs. 32bit

i have a question concerning the difference between the 64bit and 32bit. Years ago everybody said “use the 32bit, the 64bit is still experimental”, but what changed so far? My “last” update is that ...
Ben's user avatar
  • 41
13 votes
4 answers
670 views

How to implement \ifxcase: case equivalent of \ifx

I am looking for a case equivalent of \ifx. So, when I have nested uses of \ifx it would be cleaner to specify it in some sort of syntax similar to: \newcommand*{\ColorSymbol}[1]{% \ifxcase#1{% ...
Peter Grill's user avatar