Forums » Using AMC (english) »
Where is defined the position of "global mark"?
Added by Rafael Rodriguez almost 6 years ago
Dear all,
AMC-annote.pl (now deprecated) define the position of the global mark at
- print global mark and name on the page
if($p->{'page'}==1 || $capture->zones_count(@spc,ZONE_NAME)) {
my $text=$subst->substitute($verdict,@spc[0,2]);
$lay->set_text($text);
$context->set_source_rgb(color_rgb('red'));
if($rtl) {
my ($tx,$ty)=$lay->get_pixel_size;
$context->move_to($page_width-$text_x-$tx,$text_y*.7);
} else {
$context->move_to($text_x,$text_y*.7);
}
Pango::Cairo::show_layout($context,$lay);
}
I am unable to find how is done in the current version of auto-multiple-choice (1.4.0).
Could somebody help me?
Thanks,
Rafael
Replies (9)
RE: Where is defined the position of "global mark"? - Added by Alexis Bienvenüe almost 6 years ago
sub page_header
from AMC/Annotate.pm
?
https://gitlab.com/jojo_boulix/auto-multiple-choice/blob/1.4.0/AMC-perl/AMC/Annotate.pm#L950
RE: Where is defined the position of "global mark"? - Added by Rafael Rodriguez almost 6 years ago
Thanks!
RE: Where is defined the position of "global mark"? - Added by Rafael Rodriguez almost 6 years ago
My intention is to lower a little the global mark to avoid collapsing onto the normal header. Is safe to change the line
965 in Annotate.pm from
.($self->{rtl}?"1.0":"0.0")." 0.0");
to
.($self->{rtl}?"1.0":"0.0")." -1.0");
?
Maybe it's overkill but I don't find an option in the GUI to chose the position, am I wrong?
Thanks again!
RE: Where is defined the position of "global mark"? - Added by Alexis Bienvenüe almost 6 years ago
My intention is to lower a little the global mark
Maybe you can start with one or two blank lines in Preferences/Project/papers annotation/Header text?
RE: Where is defined the position of "global mark"? - Added by Rafael Rodriguez almost 6 years ago
Putting CR or spaces doesn't work for me. I need to print some characters like dot, for instance,
.
.
%(ID)
Mark: %s/%m (total score: %S/%M)
It's a bit strange to have the dots on the printed page.
RE: Where is defined the position of "global mark"? - Added by Alexis Bienvenüe almost 6 years ago
And a non-breaking space?
RE: Where is defined the position of "global mark"? - Added by Rafael Rodriguez almost 6 years ago
I don't know how to write non-breaking space. Could you tell me how to do it?
Thanks
RE: Where is defined the position of "global mark"? - Added by Alexis Bienvenüe almost 6 years ago
I tried with my AMC install: adding space+CR multiple times does move the header downward (with a standard space).
You can copy-paste a non-breaking space from eg. https://unicode-table.com/en/00A0/
RE: Where is defined the position of "global mark"? - Added by Rafael Rodriguez almost 6 years ago
If I write to non-breaking spaces (taken from https://unicode-table.com/en/00A0/ copy&paste) + CR and
%(ID)
Mark: %s/%m (total score: %S/%M)
the position doesn't change.
If I write
.
%(ID)
Mark: %s/%m (total score: %S/%M)
the position is lowered one line (the one with the dot)
If I write
.
%(ID)
Mark: %s/%m (total score: %S/%M)
the position is lowered three lines (the two lines after the dot are the same as the first case).
The AMC 1.4.0 I have installed seems to eat blank lines at the beginning.
(1-9/9)