Marginnote Large Fonts are Misaligned from Text
up vote
0
down vote
favorite
I am still in the process of making a similar style kind of book to https://fac.ksu.edu.sa/sites/default/files/numerical_analysis_9th.pdf. This mostly includes having section numbers as well as theorems and figure labels in the left margin.
Currently I am using the marginnote package to try and accomplish this however, when the font is large, say using the huge command or fontsize the margin notes are misaligned vertically from the text. I was wondering if someone could help me with this, or if I should even be using marginnotes to do this (maybe there is a different better way).
Anywho, here is my MWE class file and corresponding tex file. Thanks.
notes.cls
% notes.cls
NeedsTeXFormat{LaTeX2e}
ProvidesClass{notes}
LoadClass{article}
usepackage{geometry}
usepackage{marginnote}
usepackage{xcolor}
usepackage{layout}
usepackage{anyfontsize}
usepackage{mdframed}
usepackage{mathptmx}
geometry{
letterpaper,
left=2in,
right=1in,
marginparwidth=1.5in,
marginparsep=.25in
}
setlengthparindent{0pt}
reversemarginpar
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% setup counters for custom sections
newcounter{ChpCounter}
newcounter{SecCounter}[ChpCounter]
newcounter{SubCounter}[SecCounter]
newcounter{SubSubCounter}[SubCounter]
% Setup counters for side margins
newcounter{TheoremCounter}[SecCounter]
newcounter{DefinitionCounter}[SecCounter]
newcounter{ExampleCounter}[SecCounter]
newcounter{FigureCounter}[SecCounter]
newcounter{TableCounter}[SecCounter]
% Insert side margin notes
% Use side{param}
% param:
% Theorem
% Definition
% Example
% Figure
% Table
newcommand{side}[1]{{marginnote{
color[HTML]{156EC7} large textbf{#1 theSecCounter.thevalue{#1Counter}}}} stepcounter{#1Counter}}
% Section bar length
newlength{mylength}
setlength{mylength}{linewidth}
addtolength{mylength}{marginparwidth}
% addtolength{mylength}{marginparsep}
newcommand{zchp}[1]{
stepcounter{ChpCounter}
marginnote{{textbf {fontsize{40}{48}selectfont theChpCounter}}}
{textbf{fontsize{40}{48}selectfont #1}}
vspace{100px}
newline
}
newcommand{zsec}[1]{
stepcounter{SecCounter}
stepcounter{TheoremCounter}
stepcounter{DefinitionCounter}
stepcounter{ExampleCounter}
stepcounter{FigureCounter}
stepcounter{TableCounter}
noindent{color[HTML]{156EC7}makebox[linewidth][r]{rule{mylength}{3pt}}}
marginnote{textbf{{fontsize{30}{34}selectfont theChpCounter.theSecCounter}}}
{fontsize{30}{34}selectfont textbf{#1}}
}
newcommand{zsub}[1]{
stepcounter{SubCounter}
marginnote{theChpCounter.theSecCounter.theSubCounter}
#1
}
newcommand{zsubsub}[1]{
stepcounter{SubSubCounter}
marginnote{theChpCounter.theSecCounter.theSubCounter.theSubSubCounter}
#1
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
notes.tex
% notes.tex
documentclass{notes}
usepackage{showframe}
usepackage{tikz}
usepackage{hyperref}
usepackage{contour}
usepackage{ifthen}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
begin{document}
zchp{Chapter}
zsec{Section}
end{document}
fonts margins geometry marginnote
add a comment |
up vote
0
down vote
favorite
I am still in the process of making a similar style kind of book to https://fac.ksu.edu.sa/sites/default/files/numerical_analysis_9th.pdf. This mostly includes having section numbers as well as theorems and figure labels in the left margin.
Currently I am using the marginnote package to try and accomplish this however, when the font is large, say using the huge command or fontsize the margin notes are misaligned vertically from the text. I was wondering if someone could help me with this, or if I should even be using marginnotes to do this (maybe there is a different better way).
Anywho, here is my MWE class file and corresponding tex file. Thanks.
notes.cls
% notes.cls
NeedsTeXFormat{LaTeX2e}
ProvidesClass{notes}
LoadClass{article}
usepackage{geometry}
usepackage{marginnote}
usepackage{xcolor}
usepackage{layout}
usepackage{anyfontsize}
usepackage{mdframed}
usepackage{mathptmx}
geometry{
letterpaper,
left=2in,
right=1in,
marginparwidth=1.5in,
marginparsep=.25in
}
setlengthparindent{0pt}
reversemarginpar
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% setup counters for custom sections
newcounter{ChpCounter}
newcounter{SecCounter}[ChpCounter]
newcounter{SubCounter}[SecCounter]
newcounter{SubSubCounter}[SubCounter]
% Setup counters for side margins
newcounter{TheoremCounter}[SecCounter]
newcounter{DefinitionCounter}[SecCounter]
newcounter{ExampleCounter}[SecCounter]
newcounter{FigureCounter}[SecCounter]
newcounter{TableCounter}[SecCounter]
% Insert side margin notes
% Use side{param}
% param:
% Theorem
% Definition
% Example
% Figure
% Table
newcommand{side}[1]{{marginnote{
color[HTML]{156EC7} large textbf{#1 theSecCounter.thevalue{#1Counter}}}} stepcounter{#1Counter}}
% Section bar length
newlength{mylength}
setlength{mylength}{linewidth}
addtolength{mylength}{marginparwidth}
% addtolength{mylength}{marginparsep}
newcommand{zchp}[1]{
stepcounter{ChpCounter}
marginnote{{textbf {fontsize{40}{48}selectfont theChpCounter}}}
{textbf{fontsize{40}{48}selectfont #1}}
vspace{100px}
newline
}
newcommand{zsec}[1]{
stepcounter{SecCounter}
stepcounter{TheoremCounter}
stepcounter{DefinitionCounter}
stepcounter{ExampleCounter}
stepcounter{FigureCounter}
stepcounter{TableCounter}
noindent{color[HTML]{156EC7}makebox[linewidth][r]{rule{mylength}{3pt}}}
marginnote{textbf{{fontsize{30}{34}selectfont theChpCounter.theSecCounter}}}
{fontsize{30}{34}selectfont textbf{#1}}
}
newcommand{zsub}[1]{
stepcounter{SubCounter}
marginnote{theChpCounter.theSecCounter.theSubCounter}
#1
}
newcommand{zsubsub}[1]{
stepcounter{SubSubCounter}
marginnote{theChpCounter.theSecCounter.theSubCounter.theSubSubCounter}
#1
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
notes.tex
% notes.tex
documentclass{notes}
usepackage{showframe}
usepackage{tikz}
usepackage{hyperref}
usepackage{contour}
usepackage{ifthen}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
begin{document}
zchp{Chapter}
zsec{Section}
end{document}
fonts margins geometry marginnote
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I am still in the process of making a similar style kind of book to https://fac.ksu.edu.sa/sites/default/files/numerical_analysis_9th.pdf. This mostly includes having section numbers as well as theorems and figure labels in the left margin.
Currently I am using the marginnote package to try and accomplish this however, when the font is large, say using the huge command or fontsize the margin notes are misaligned vertically from the text. I was wondering if someone could help me with this, or if I should even be using marginnotes to do this (maybe there is a different better way).
Anywho, here is my MWE class file and corresponding tex file. Thanks.
notes.cls
% notes.cls
NeedsTeXFormat{LaTeX2e}
ProvidesClass{notes}
LoadClass{article}
usepackage{geometry}
usepackage{marginnote}
usepackage{xcolor}
usepackage{layout}
usepackage{anyfontsize}
usepackage{mdframed}
usepackage{mathptmx}
geometry{
letterpaper,
left=2in,
right=1in,
marginparwidth=1.5in,
marginparsep=.25in
}
setlengthparindent{0pt}
reversemarginpar
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% setup counters for custom sections
newcounter{ChpCounter}
newcounter{SecCounter}[ChpCounter]
newcounter{SubCounter}[SecCounter]
newcounter{SubSubCounter}[SubCounter]
% Setup counters for side margins
newcounter{TheoremCounter}[SecCounter]
newcounter{DefinitionCounter}[SecCounter]
newcounter{ExampleCounter}[SecCounter]
newcounter{FigureCounter}[SecCounter]
newcounter{TableCounter}[SecCounter]
% Insert side margin notes
% Use side{param}
% param:
% Theorem
% Definition
% Example
% Figure
% Table
newcommand{side}[1]{{marginnote{
color[HTML]{156EC7} large textbf{#1 theSecCounter.thevalue{#1Counter}}}} stepcounter{#1Counter}}
% Section bar length
newlength{mylength}
setlength{mylength}{linewidth}
addtolength{mylength}{marginparwidth}
% addtolength{mylength}{marginparsep}
newcommand{zchp}[1]{
stepcounter{ChpCounter}
marginnote{{textbf {fontsize{40}{48}selectfont theChpCounter}}}
{textbf{fontsize{40}{48}selectfont #1}}
vspace{100px}
newline
}
newcommand{zsec}[1]{
stepcounter{SecCounter}
stepcounter{TheoremCounter}
stepcounter{DefinitionCounter}
stepcounter{ExampleCounter}
stepcounter{FigureCounter}
stepcounter{TableCounter}
noindent{color[HTML]{156EC7}makebox[linewidth][r]{rule{mylength}{3pt}}}
marginnote{textbf{{fontsize{30}{34}selectfont theChpCounter.theSecCounter}}}
{fontsize{30}{34}selectfont textbf{#1}}
}
newcommand{zsub}[1]{
stepcounter{SubCounter}
marginnote{theChpCounter.theSecCounter.theSubCounter}
#1
}
newcommand{zsubsub}[1]{
stepcounter{SubSubCounter}
marginnote{theChpCounter.theSecCounter.theSubCounter.theSubSubCounter}
#1
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
notes.tex
% notes.tex
documentclass{notes}
usepackage{showframe}
usepackage{tikz}
usepackage{hyperref}
usepackage{contour}
usepackage{ifthen}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
begin{document}
zchp{Chapter}
zsec{Section}
end{document}
fonts margins geometry marginnote
I am still in the process of making a similar style kind of book to https://fac.ksu.edu.sa/sites/default/files/numerical_analysis_9th.pdf. This mostly includes having section numbers as well as theorems and figure labels in the left margin.
Currently I am using the marginnote package to try and accomplish this however, when the font is large, say using the huge command or fontsize the margin notes are misaligned vertically from the text. I was wondering if someone could help me with this, or if I should even be using marginnotes to do this (maybe there is a different better way).
Anywho, here is my MWE class file and corresponding tex file. Thanks.
notes.cls
% notes.cls
NeedsTeXFormat{LaTeX2e}
ProvidesClass{notes}
LoadClass{article}
usepackage{geometry}
usepackage{marginnote}
usepackage{xcolor}
usepackage{layout}
usepackage{anyfontsize}
usepackage{mdframed}
usepackage{mathptmx}
geometry{
letterpaper,
left=2in,
right=1in,
marginparwidth=1.5in,
marginparsep=.25in
}
setlengthparindent{0pt}
reversemarginpar
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% setup counters for custom sections
newcounter{ChpCounter}
newcounter{SecCounter}[ChpCounter]
newcounter{SubCounter}[SecCounter]
newcounter{SubSubCounter}[SubCounter]
% Setup counters for side margins
newcounter{TheoremCounter}[SecCounter]
newcounter{DefinitionCounter}[SecCounter]
newcounter{ExampleCounter}[SecCounter]
newcounter{FigureCounter}[SecCounter]
newcounter{TableCounter}[SecCounter]
% Insert side margin notes
% Use side{param}
% param:
% Theorem
% Definition
% Example
% Figure
% Table
newcommand{side}[1]{{marginnote{
color[HTML]{156EC7} large textbf{#1 theSecCounter.thevalue{#1Counter}}}} stepcounter{#1Counter}}
% Section bar length
newlength{mylength}
setlength{mylength}{linewidth}
addtolength{mylength}{marginparwidth}
% addtolength{mylength}{marginparsep}
newcommand{zchp}[1]{
stepcounter{ChpCounter}
marginnote{{textbf {fontsize{40}{48}selectfont theChpCounter}}}
{textbf{fontsize{40}{48}selectfont #1}}
vspace{100px}
newline
}
newcommand{zsec}[1]{
stepcounter{SecCounter}
stepcounter{TheoremCounter}
stepcounter{DefinitionCounter}
stepcounter{ExampleCounter}
stepcounter{FigureCounter}
stepcounter{TableCounter}
noindent{color[HTML]{156EC7}makebox[linewidth][r]{rule{mylength}{3pt}}}
marginnote{textbf{{fontsize{30}{34}selectfont theChpCounter.theSecCounter}}}
{fontsize{30}{34}selectfont textbf{#1}}
}
newcommand{zsub}[1]{
stepcounter{SubCounter}
marginnote{theChpCounter.theSecCounter.theSubCounter}
#1
}
newcommand{zsubsub}[1]{
stepcounter{SubSubCounter}
marginnote{theChpCounter.theSecCounter.theSubCounter.theSubSubCounter}
#1
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
notes.tex
% notes.tex
documentclass{notes}
usepackage{showframe}
usepackage{tikz}
usepackage{hyperref}
usepackage{contour}
usepackage{ifthen}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
begin{document}
zchp{Chapter}
zsec{Section}
end{document}
fonts margins geometry marginnote
fonts margins geometry marginnote
asked 6 mins ago
Nick
62
62
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f464059%2fmarginnote-large-fonts-are-misaligned-from-text%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown